Cancel a scheduled retry
Cancels an upcoming retry, if there is one scheduled
Cancellation requests are processed asynchronously. You can use workflows to be notified if the cancellation is successful.
Path Parameters
- Type: stringid
Pattern: ^(pay)_(\w{26})$requiredThe unique payment identifier.
Headers
- Type: stringCko
- Idempotency - Key An optional idempotency key for safely retrying payment requests
Body·
application/json
- Type: stringreferencemax length:80
A reference you can later use to identify this cancellation request. You can use this value to identify the cancellation request later.
Responses
- application/json
- 401
Unauthorized
- 403
Cancellation not allowed
- 404
Payment not found
- application/json
- 429
Too Many Requests
- 502
Bad gateway
Request Example for post/payments/{id}/cancellations
curl 'https://{prefix}.api.sandbox.checkout.com/payments/pay_mbabizu24mvu3mela5njyhpit4/cancellations' \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"reference": "ORD-5023-4E89"
}'
{
"action_id": "act_y3oqhf46pyzuxjbcn2giaqnb44",
"reference": "ORD-5023-4E89",
"_links": {
"payment": {
"href": "https://{prefix}.api.checkout.com/payments/pay_y3oqhf46pyzuxjbcn2giaqnb44"
}
}
}