Payments - Cancel Post Capture
Cancel a payment after it has been captured by providing a cancellation reason.
POST /payments/{payment_id}/cancel_post_capture
cURL
curl --request POST \
--url https://sandbox.hyperswitch.io/payments/{payment_id}/cancel_post_capture \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"cancellation_reason": "requested_by_customer"
}
'Authorizations
Header: api-key (string) — required
Use the API key created under your merchant account from the HyperSwitch dashboard. API key is used to authenticate API requests from your merchant server only. Do not expose this key on a website or embed it in a mobile application.
Path parameters
payment_id (string, required) — The identifier for the payment.
Body (application/json)
Request to cancel a payment when the payment is already captured.
cancellation_reason (string | null) — The reason for the payment cancel.
Example body:
Responses
200 — Payment canceled post capture
Error example (400)
Links
Suggest edits: https://github.com/juspay/hyperswitch/edit/main/api-reference/v1/payments/payments--cancel-post-capture.mdx
Raise issue: https://github.com/juspay/hyperswitch/issues/new?title=Issue%20on%20docs&body=Path:%20/v1/payments/payments--cancel-post-capture
Related:
Payments - Cancel: https://api-reference.hyperswitch.io/v1/payments/payments--cancel
Payments - Capture: https://api-reference.hyperswitch.io/v1/payments/payments--capture