curl --request POST \
--url https://sandbox.hyperswitch.io/v2/recovery/invoice_mbabizu24mvu3mela5njyh/cancel \
--header 'Authorization: api-key=<API_KEY>' \
--header 'X-Profile-Id: pro_abcdefghijklmnop'
{
"id": "12_pay_01a3868d94a471219b5c4bc71638e2zc",
"intent_status": "cancelled",
"merchant_reference_id": "invoice_mbabizu24mvu3mela5njyh"
}{
"error_type": "invalid_request",
"message": "Missing required param: {param}",
"code": "IR_04"
}Revenue Recovery - Cancel
Cancel the revenue recovery workflow of an invoice that is still in recovery: its scheduled
retries are stopped and no further recovery attempts are made. A failed payment moves to
cancelled, and a partially captured payment moves to cancelled_post_capture. The request
is refused with 400 when the payment is in any other state, when a retry is in progress,
or when recovery already reached a terminal status. The invoice is looked up by its merchant
reference id within the business profile given in the X-Profile-Id header.
curl --request POST \
--url https://sandbox.hyperswitch.io/v2/recovery/invoice_mbabizu24mvu3mela5njyh/cancel \
--header 'Authorization: api-key=<API_KEY>' \
--header 'X-Profile-Id: pro_abcdefghijklmnop'
{
"id": "12_pay_01a3868d94a471219b5c4bc71638e2zc",
"intent_status": "cancelled",
"merchant_reference_id": "invoice_mbabizu24mvu3mela5njyh"
}{
"error_type": "invalid_request",
"message": "Missing required param: {param}",
"code": "IR_04"
}curl --request POST \
--url https://sandbox.hyperswitch.io/v2/recovery/invoice_mbabizu24mvu3mela5njyh/cancel \
--header 'Authorization: api-key=<API_KEY>' \
--header 'X-Profile-Id: pro_abcdefghijklmnop'
Authorizations
Headers
Path Parameters
Response
Revenue Recovery workflow cancelled successfully
Represents the overall status of a payment intent. The status transitions through various states depending on the payment method, confirmation, capture method, and any subsequent actions (like customer authentication or manual capture).
succeeded, failed, cancelled, cancelled_post_capture, processing, requires_customer_action, requires_merchant_action, requires_payment_method, requires_confirmation, requires_capture, partially_captured, partially_captured_and_capturable, partially_authorized_and_requires_capture, partially_captured_and_processing, conflicted, expired, review Was this page helpful?