curl --request POST \
--url https://api.test.switch.vaultera.co/payments/{payment_id}/cancel \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"cancellation_reason": "requested_by_customer"
}
'Payments
Payments - Cancel
A Payment could can be cancelled when it is in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_customer_action.
POST
/
payments
/
{payment_id}
/
cancel
curl --request POST \
--url https://api.test.switch.vaultera.co/payments/{payment_id}/cancel \
--header 'Content-Type: application/json' \
--header 'api-key: <api-key>' \
--data '
{
"cancellation_reason": "requested_by_customer"
}
'Authorizations
Body
application/json
Response
Payment canceled