# Linking source: https://developer.mastercard.com/mastercard-supplier-payment-agent/documentation/use_cases/linking/index.md ## How linking works {#how-linking-works} Linking allows trading partners to establish relationships in Business Payment Service, further ensuring the right Suppliers get paid. An approved link between trading partners reduces the probability that a payment instruction fails during the lifecycle of the payment instruction due to incorrect Supplier or Supplier Payment Agent data. By sending a link request, Supplier Payment Agents are able to approve that the given Buyer is a customer of their Supplier and should be able to pay the Supplier. To integrate with the linking APIs, refer to the [linking tutorial](https://developer.mastercard.com/mastercard-supplier-payment-agent/documentation/tutorials-and-guides/linking-tutorial/index.md). Diagram linking2 The linking overview diagram displays the main steps for the linking process. Note: With the April 2023 release, the previously required `supplierRegistrationId` field is now optional. Additionally with the April 2023 release, an approved linking request is required when the Supplier payment preference flag is set to `NO`. The flag default state is set to `NO`. If the display options for Supplier payment preferences are set to `YES`, then the available Supplier payment preferences are displayed. Payment Preferences are only exposed to Buyer Payment Agents to send electronic card spend to Suppliers. These Buyer Payment Agents must be a part of the Track BPS network.Contact your Mastercard representative to set the Supplier payment preferences flag. **Step 1**: Supplier Payment Agent Sends nudge linking request. **Step 2** : Buyer Payment Agent initiates the linking request by calling the POST linking API. **Step 3** : Business Payment Service notifies the Supplier Payment Agent of the linking request. **Step 4** : Supplier Payment Agent either accepts or rejects the linking request. **Step 5** : Business Payment Service notifies the Buyer Payment Agent of the approval. **NOTE: If the linking request is rejected, the process ends once the Buyer Payment Agent receives the even notification with the linking rejection.** **Step 6**: Business Payment Service notifies the Buyer Payment Agent if the Supplier has any Supplier payment preferences in place. **Step 7 - optional** : Supplier Payment Agent submits the delete linking request by calling the DELETE linking API. **Step 8 and 9**: Business Payment Service notifies both the Buyer Payment Agent and the Supplier Payment Agents of the link removal. **Step 10 - optional**: Supplier Payment Agent submits the search and filter link request by calling the GET linking API. **Step 11**: Business Payment Service returns linking information. *** ** * ** *** ## Linking nudge request {#linking-nudge-request} Note: If a Supplier Payment Agent nudges a Buyer Payment Agent with a linking request, the Buyer Payment agent receives the SUPPLIER_SUGGESTING_LINK_REQUEST event notification. The Buyer Payment Agent can respond to the nudge request by initiating a link. However, the Buyer Payment Agent can initiate a linking request without a nudge from the Supplier Payment Agent. ![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/suggestlink.png) Note: The Mastercard assigned ICA is used for agent identification in all service requests for core operations. A customer service provider can use their API credentials to transact on behalf of a customer by providing their customer's ICA number in the request. Direct payment agents can still transact by entering their own ICA when sending a transaction to Mastercard Track Business Payment Service. API Reference: `POST /supplier-payment-agents/{ica}/supplier-payment-profiles/{spa_profile}/suggested-buyer-links` ## Updating a link request with authorization status {#updating-a-link-request-with-authorization-status} ![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/updatelink.png) API Reference: `PUT /supplier-payment-agents/{ica}/supplier-payment-profiles/{spa_profile}/buyer-links/{bpa_profile}` API Reference: `PUT /supplier-payment-agents/{ica}/buyer-links` ## Send locally stored payment preferences directly to a linked Buyer {#send-locally-stored-payment-preferences-directly-to-a-linked-buyer} ![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/external-preferences.png) API Reference: `PUT /supplier-payment-agents/{ica}/supplier-payment-profiles/{spa_profile}/buyer-links/{bpa_profile}/payment-preferences` ## Delete an existing link {#delete-an-existing-link} ![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/deletelink.png) Note: If a Buyer or Supplier Payment Agent deletes a link, both agents receive the LINK_REMOVED event notification. API Reference: `DELETE /supplier-payment-agents/{ica}/supplier-payment-profiles/{spa_profile}/buyer-links/{bpa_profile}` ## Search for an approved link {#search-for-an-approved-link} ![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/getlink.png) API Reference: `GET /supplier-payment-agents/{ica}/buyer-supplier-links`