Requirements
Before you begin, take into account the following requirements and limitations.Methods to add sub-merchant data
Adyen automatically adds certain sub-merchant data to transactions that you facilitate. The remaining sub-merchant data must be supplied by you. There are two methods to add sub-merchant data:- Through the configuration of the store. This is mainly intended for standalone terminals, but can also be used for integrated terminals.
- By adding fields in the Terminal API requests.
Add to the store configuration
If your sub-merchant uses standalone terminals, you must add sub-merchant data to the sub-merchant’s store through the Management API. Adyen then adds this data before sending requests for authorization. If your sub-merchant uses a POS system with integrated terminals or a Mobile solution, you can also add sub-merchant data to the sub-merchant’s store. When necessary, you can override the data specified for the store by adding sub-merchant data to individual Terminal API requests. To add sub-merchant data to an existing store:-
Make sure you have the
idof the sub-merchant’s store.
To find that value, you can make a GET /stores request (or a GET /merchants/{merchantId}/stores request). -
Make a PATCH /stores/{storeId} request with:
-
A subMerchantData object with the following parameters.
curl
Java
PHP
C#
NodeJS (JavaScript)
Go
Python
Ruby
NodeJS (TypeScript)
You can also make a PATCH request to the /merchants/{merchantId}/stores/{storeId} endpoint using the samesubMerchantDataobject. -
A subMerchantData object with the following parameters.
-
In the response note that this contains the full details of the store, including the
subMerchantDatayou submitted.
Add to the Terminal API request
To add data about your sub-merchant in your Terminal API request:-
Create an
additionalDataJSON object with the following parameters:additionalData JSON object -
Encode the
additionalDataJSON object to Base64. You will pass the resulting string inSaleData.SaleToAcquirerData. Converted to a Base64-encoded string -
Make a Terminal API payment request with the Base64-encoded string as the SaleToAcquirerData value.
Add sub-merchant data to a Terminal API request
