Refund Webhook
Refund Webhook
Endpoint: Merchant-Specified Webhook URL
Introduction
The Refund Webhook
notifies merchants about the status of refund transactions in real time. Paylink triggers this webhook to inform your system of the outcome when a refund is processed, ensuring your records are updated accordingly.
HTTP Method
- Method:
POST
Request Headers
X-API-KEY
(string, required): The API key provided to the merchant for authentication.
Request Body
The webhook sends a JSON object with details about the refund:
Request Body Fields
transactionNo
(string, required): The unique transaction number associated with the refund.refundStatus
(string, required): The status of the refund ("Refunded"
or"Failed"
).refundAmount
(number, required): The amount that was refunded.currency
(string, required): The currency of the refund (e.g.,"SAR"
).merchantOrderNumber
(string, optional): The order number assigned by the merchant.apiVersion
(string, optional): The API version being used (e.g.,"v2"
).
Example Webhook Payload
{
"transactionNo": "1234567890ABC",
"refundStatus": "Refunded",
"refundAmount": 250.00,
"currency": "SAR",
"merchantOrderNumber": "ORD789012",
"apiVersion": "v2"
}
Expected Response
Merchants should respond with an HTTP 200 OK
status code to acknowledge receipt of the webhook.
Response:
{
"status": "success"
}
Error Handling
If the webhook is not acknowledged with a 200 OK
status, Paylink will retry sending the webhook up to ten times.
Updated 4 months ago