# Supplier payment preferences
source: https://developer.mastercard.com/mastercard-supplier-payment-agent/documentation/use_cases/commercial-direct-payments/payment-controls/index.md

## How payment preferences work {#how-payment-preferences-work}

Supplier Payment Agents can enforce their Suppliers' payment preferences by implementing the Payment Preference endpoints. Payment Preferences allow Supplier Payment Agents to restrict payments on behalf of their Suppliers. To integrate with the Supplier payment preference APIs, refer to the [preferences tutorial](https://developer.mastercard.com/mastercard-supplier-payment-agent/tutorial/preferences/index.md). Supplier Payment Agents can implement:

* **Time preferences:** allows Supplier Payment Agents to enforce the duration of payment acceptance between a Buyer and their Supplier.
* **Relationship preferences:** allows Supplier Payment Agents to set a restriction for a given Supplier based on the Buyer making the payment.
* **Amount preferences:** allows Supplier Payment Agents to set a restriction for a given Supplier based on the total amount of a payment.
* **Fee preferences:** allows Supplier Payment Agents to set a restriction for a given Supplier in order to require an additional fee when making a payment.

![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/cdpcontroloverview.png)

The Payment Preference Overview diagram displays the main steps for the Supplier Payment Preferences process.
Note: With the April 2023 release, an approved linking request is required when the Supplier payment preference flag is set to `NO`. If the display options for Supplier payment preferences are set to `YES`, then the available Supplier payment preferences are displayed. Contact your Mastercard representative to set the Supplier payment preferences flag.

**Step 1:** The Supplier Payment Agent submits the Payment Preference request by calling the Supplier Payment Preference APIs. You can create, update, delete, retrieve a single preference or all preferences.

**Step 2:** Commercial Direct Payments validates the Payment Preference.

**Step 3:** Commercial Direct Payments completes the request.

**Step 4:** Commercial Direct Payments notifies the Supplier Payment Agent of the completed Payment Preference.

*** ** * ** ***

## Create a Supplier payment preference {#create-a-supplier-payment-preference}

![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/cdpspacreatenewcontrol.png)

### JSON Example {#json-example}


API Reference: `POST /supplier-payment-agents/{ica}/suppliers/{supplier_id}/payment-preferences/payment-controls`

*** ** * ** ***

## Update a Supplier payment preference {#update-a-supplier-payment-preference}

This endpoint allows a Supplier Payment Agent to make changes to an existing Supplier Payment Preference.

![alt text](https://static.developer.mastercard.com/content/mastercard-supplier-payment-agent/uploads/cdpspaupdatepaymentcontrol.png)

API Reference: `PUT /supplier-payment-agents/{ica}/suppliers/{supplier_id}/payment-preferences/payment-controls/{payment_control_id}`

*** ** * ** ***

## Delete a Supplier payment preference {#delete-a-supplier-payment-preference}

### Delete a single Supplier payment preference {#delete-a-single-supplier-payment-preference}

This endpoint allows a Supplier Payment Agent to delete a single existing Payment Preference.
Diagram cdpspadeletecontrol
API Reference: `DELETE /supplier-payment-agents/{ica}/suppliers/{supplier_id}/payment-preferences/payment-controls/{payment_control_id}`

### Delete all Supplier payment preferences {#delete-all-supplier-payment-preferences}

This endpoint allows a Supplier Payment Agent to delete all existing Payment Preference for a Supplier Profile.
Diagram cdpspadeleteallcontrols
API Reference: `DELETE /supplier-payment-agents/{ica}/suppliers/{supplier_id}/payment-preferences/payment-controls`

*** ** * ** ***

## Retrieve a Supplier payment preference {#retrieve-a-supplier-payment-preference}

### Retrieve a single Supplier payment preference {#retrieve-a-single-supplier-payment-preference}

This endpoint allows a Supplier Payment Agent to retrieve details about a single existing Supplier Payment Preference for a given Supplier.
Diagram cdpspagetsinglecontrol
API Reference: `GET /supplier-payment-agents/{ica}/suppliers/{supplier_id}/payment-preferences/payment-controls/{payment_control_id}`

## Retrieve a Supplier payment preference {#retrieve-a-supplier-payment-preference-1}

This endpoint allows a Supplier Payment Agent to retrieve details about all existing Payment Preferences for a given Supplier.
Diagram cdpspagetallcontrol
API Reference: `GET /supplier-payment-agents/{ica}/suppliers/{supplier_id}/payment-preferences/payment-controls`

*** ** * ** ***

