curl --request POST \
--url https://sandbox.birrpay.io/payments/{payment_id}/cancel_post_capture \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"cancellation_reason": "requested_by_customer"
}
'{
"error_type": "invalid_request",
"message": "Missing required param: {param}",
"code": "IR_04"
}Payments
Payments - Cancel Post Capture
A Payment could can be cancelled when it is in one of these statuses: succeeded, partially_captured, partially_captured_and_capturable.
POST
/
payments
/
{payment_id}
/
cancel_post_capture
curl --request POST \
--url https://sandbox.birrpay.io/payments/{payment_id}/cancel_post_capture \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"cancellation_reason": "requested_by_customer"
}
'{
"error_type": "invalid_request",
"message": "Missing required param: {param}",
"code": "IR_04"
}Authorizations
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. Don't expose this key on a website or embed it in a mobile application.
Path Parameters
The identifier for payment
Body
application/json
Request to cancel a payment when the payment is already captured
The reason for the payment cancel
Response
Payment canceled post capture