Settlement Webhook
The webhook is triggered after each settlement by Paylink to the merchant.
Prerequisites
Merchant has to register to this webhook service to use it. Call customer service to enable this service, or call your account manager to enable this service.
Request Type:
- Method: POST
Endpoint Setup
Merchants need to set up the webhook endpoint in the My Paylink Portal. This can be done on the settings page, as shown in the following screenshot:
Authorization
If any special authorization is required for the webhook request, the developer can include it in the header fields. For example:
{
"Authorization": "Bearer [token]"
}
Paylink will include the authorization header in the webhook call.
Request Body:
- The Webhook object contains information about the settlement, including the settlement number, settlement bank, settlement amount, and settlement IBAN.
- It also includes a list of Reconciled Order objects representing the orders in the settlement.
- Each Reconciled Order object contains details about an individual order, such as the order.
The request will contain the JSON object that includes all relevant information for the settlement. For example:
{
"settlementNumber": "SETTLE123",
"settlementBank": "AlRajhi",
"settlementAmount": 1000.0,
"settlementIban": "SA2342323423234234234234234",
"reconciledOrders": [
{
"orderNumber": "ORDER123",
"transactionNo": "TRANS456",
"orderDate": "2023-06-12T15:30:00Z",
"orderAmount": 500.0,
"orderStatus": "COMPLETED",
"paylinkFees": 10.0,
"paylinkVat": 2.0,
"note": "Example note",
"clientName": "John Doe",
"clientMobile": "+123456789",
"isReconciled": true
},
{
"orderNumber": "ORDER456",
"transactionNo": "TRANS789",
"orderDate": "2023-06-13T09:45:00Z",
"orderAmount": 500.0,
"orderStatus": "COMPLETED",
"paylinkFees": 14.0,
"paylinkVat": 2.8,
"note": "",
"clientName": "Jane Smith",
"clientMobile": "+987654321",
"isReconciled": true
}
]
}
Expected Response
- HTTP Status Code: 200
The merchant's system is expected to respond with a 200 HTTP status code to acknowledge the receipt of the webhook.
Error Handling
If the webhook is not acknowledged with a 200 HTTP status code, Paylink will retry sending the webhook ten times at intervals.
Suppose Paylink reaches ten times failure for the specific settlement webhook call. In that case, an email will be sent to the merchant's email notifying that the webhook call failed in that particular settlement.
Updated 6 months ago