order_finished
order_finished
You receive this webhook when an order is completed and the payment link is no longer valid. The webhook contains the order identifier and status. If the status is succeeded, the payment was successful. If the status is failed, the payment failed for the reason returned in the webhook.
Parameters
| Name | Mandatory | Type | Description |
|---|---|---|---|
type | + | string | Webhook type: order_finished |
order | + | object | Order details |
Examples
- Successful payment
- Link expired
- Too many attempts
- Link disabled by the merchant
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "order_finished",
"order": {
"order_id": "bYGR1PLkQ45Z7Vm9zJQx9G",
"status": "success",
"reason": null
}
}'
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "order_finished",
"order": {
"order_id": "bYGR1PLkQ45Z7Vm9zJQx9G",
"status": "failed",
"reason": "timeout"
}
}'
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "order_finished",
"order": {
"order_id": "eiq1mbMiZF1ABIbL0ES0qK",
"status": "failed",
"reason": "attempts_exhausted"
}
}'
curl -X POST \
https://partner.com \
-H 'content-type: application/json' \
-H 'X-PARTNER-SIGN: signature' \
-d '{
"type": "order_finished",
"order": {
"order_id": "bTB6IoIqATD6OEdY4X1BVt",
"status": "failed",
"reason": "canceled_by_merchant"
}
}'