Additional configurations that may be useful in different cases.
In the post request to pl/create-session-token you can add certain optional fields that allow a certain degree of customization in the payment session that the client receives.
A structure with rules for merchants is implemented. This structure is optional, it is part of each merchant in the collection within the database and consists for now of 2 rules oriented to return URLs, but with the possibility of incorporating additional ones in the future:
General validation of return URLs:.
Expected parameters:
StartSession URL:pl/create-session-token: call.
The pl/create-session-token call does not undergo any change in the response structure, only that when the call is made the mentioned parameters can be incorporated.
Headers:
{
"x-api-key": "{MERCHANT_API_TOKEN}"
}
Body:
{
"merchant_code": "{MERCHANT_CODE}",
"merchant_order_id": "{ORDER_ID}",
"order_amount": 500,
"customer_email": "[email protected]",
"payment_completed_url": "{URL_SUCCESS}",
"payment_cancellation_url": "{URL_CANCEL}",
"concat":"{“&”}",
"metadata":[{
"name": "Title",
"value": "subtitle",
"show": true
}]
}
Rules