Skip to main content

Integración de un MarketPlace

To integrate a MarketPlace merchant, you must first send the initial request indicated in Generate payment order on your server within the Simple Integration section. In addition to the fields explained there, the following section explains the specific fields for the marketplace to indicate amounts and commissions associated to each merchant involved in the transaction.

This is an example of what the final request would look like:

curl --request POST 'https://api.paylands.com/v1/sandbox/payment' \
--header 'Authorization: pk_test_3c140607778e1217f56ccb8b50540e00' \
--header 'Content-Type: application/json' \
--data-raw '{
"signature": "341f7de8e6fc49da8d8736473af6b03a",
"amount": 10000,
"operative": "AUTHORIZATION",
"secure": false,
"customer_ext_id": "test",
"service": "9A1BDCC8-DB30-4ED2-8523-62B330A67873",
"description": "Payment #1",
"additional": null,
"url_post": "https://my.website.com/process",
"url_ok": "https://my.website.com/ok",
"url_ko": "https://my.website.com/ko",
"template_uuid": "6412549E-933E-4DFE-A225-2E87FBF7623E",
"dcc_template_uuid": "BF418CA6-7043-4864-B36F-F02C2CF2B76B",
"source_uuid": null,
"save_card": true,
"reference": "50620",
"dynamic_descriptor": "PNP*MerchantName",
"expires_in": 3600,
"extra_data": {
"marketplace":{
{
"merchant_location_id": 123,
"amount":0,
"description": "MarketPlace1",
"net_amount": 150
},
{
"merchant_location_id": 4487,
"amount":10000,
"description": "Commerce1",
"net_amount": 9850
}
}
}'

A new field has been added to the request called extra_data. Here the relevant information must be added so that the settlements are properly processed for both the marketplace and to the merchants involved.

The merchant_location_id are ids that Paylands will provide you for both the marketplace and the merchants once you are registered in our marketplace system.

Taking into account this example request, it's a 100€ transaction (the amount will always be indicated in cents, so it would be 10000). The gross amount of €100 corresponds to commerce1 with id 4487. In this case, the merchant will be transferred 98.5€ and the remaining 1.5€ will go to the MarketPlace as a commission.

In this way it is indicated for each merchant, which part of the total amount corresponds to him. And from this part, with the net_amount you can know which part has to be paid to the MarketPlace and to the commerce.

Refunds

curl --request POST 'https://api.paylands.com/v1/sandbox/payment/refund' \
--header 'Authorization: pk_test_3c140607778e1217f56ccb8b50540e00' \
--header 'Content-Type: application/json' \
--data-raw '{
"signature": "121149a0ba5361191d740fa898784a8b",
"order_uuid": "1f405ea3-9798-42a6-9e87-bd347ef67f55",
"amount": 5000,
"extra_data": {
"marketplace_refunds":{
{
"merchant_location_id": 123,
"amount":0,
"description": "MarketPlace1",
"net_amount": 10
},
{
"merchant_location_id": 4487,
"amount":5000,
"description": "Comercio1",
"net_amount": 4990
}
}
}
}'

In the same way, when a refund is made, we must add the extra_data field and within it marketplace_refunds. It will only be necessary to indicate the amount and the marketplace_refunds in the case of partial returns. This new element follows the same operation as the previous one described