Exchange calls
When and how do we send exchange calls
Transaction Operations on a TGU
Starting with the new Order V1 API's created on one of Pay.'s Transaction Gateway Unit (TGU) the format of how we exchange the status of an object to your system is changing, how you respond to our exchange remains the same.
This exchange will provide a more detailed overview of the order and the exchange process.
An exchange includes all essential data in its body to process the request. It contains the following key elements:
- Event: The event that triggered the exchange to your system.
- Type: The type of the object being exchanged.
- Version: The version of the object being exchanged.
- This allows you to dynamically change your exchange handling logic without altering the exchange URL.
- ID: The unique identifier of the object being exchanged.
- Object: The complete object in its current state, which triggered an action resulting in the exchange being sent.
If we put all the keys together, the exchange will look as follows:
{
"event": "status_changed",
"type": "order",
"version": 1,
"id": "4f82bbef-9f8c-4db1-8e49-fb7d38bd3ebc",
"object": {
"id": "4f82bbef-9f8c-4db1-8e49-fb7d38bd3ebc",
"type": "sale",
"serviceId": "SL-1234-1234",
"description": "Order description",
"reference": "REF1234",
"manualTransferCode": "6000 0510 0440 0025",
"orderId": "00000000000X0000",
"uuid": "4f82bbef-9f8c-4db1-8e49-fb7d38bd3ebc",
"status": {
"code": 100,
"action": "PAID"
},
"receipt": null,
"integration": {
"test": false
},
"amount": {
"value": 3,
"currency": "EUR"
},
"authorizedAmount": {
"value": 0,
"currency": "EUR"
},
"capturedAmount": {
"value": 100,
"currency": "EUR"
},
"payments": [
{
"id": "67aa80e6-cc8f-4861-940c-b104d8b73c6d",
"status": {
"action": "PAID",
"code": 100
},
"paymentMethod": {
"id": 10,
"subId": "4"
},
"amount": {
"currency": "EUR",
"value": 1
},
"currencyAmount": {
"currency": "EUR",
"value": 1
},
"authorizedAmount": {
"value": 0,
"currency": "EUR"
},
"capturedAmount": {
"value": 100,
"currency": "EUR"
},
"customerId": "<customer_id>",
"customerKey": "<customer_key>",
"customerName": "<customer_name>",
"customerType": "<customer_type>",
"ipAddress": "127.0.0.1",
"paymentVerificationMethod": 0,
"secureStatus": false
}
],
"stats": {
"info": "info",
"tool": "tool",
"extra1": "extra1",
"extra2": "extra2",
"extra3": "extra3",
"object": "object",
"domainId": "WU-1234-1234",
"promotorId": 1
},
"transferData": {
"newKey": "newValue"
},
"createdAt": "2023-11-23T11:43:13+01:00",
"createdBy": "SL-1234-1234",
"modifiedAt": "2023-11-23T11:43:13+01:00",
"modifiedBy": "TGU 123456",
"expiresAt": "2023-12-21T11:43:13+01:00",
"completedAt": "2023-12-21T11:45:13+01:00",
"links": {
"cancel": "<cancel_url>",
"status": "<status_url>",
"redirect": "<redirect_url>"
}
}
}Post Transaction Operations on the GMS
For operations done on the GMS the exchange follows the "legacy" format as displayed below:
{
"website_id": "0",
"website_location_id": "01",
"program_id": "0",
"payment_profile_id": "10",
"payment_method_id": "4",
"payment_session_id": "0",
"promotor_id": "1",
"tool": "Tool",
"info": "Info",
"object": "Object",
"domain_id": "0",
"ip_address": "127.0.0.1",
"pincode": "0",
"amount": "0.01",
"extra1": "Extra1",
"extra2": "Extra2",
"extra3": "Extra3",
"product_id": "0",
"secret": "0",
"order_id": "000000000X14ce",
"enduser_id": "0",
"refundId": "RF-0000-0000-0000",
"action": "refund:add"
}Updated 2 months ago
Verify that this exchange comes from a TGU by implementing our exchange signing https://developer.pay.nl/docs/signing