API reference / Checkouts
Cancel a checkout
/v1/checkouts/{reference_id}/cancel Cancels an OPEN checkout, and the payment in progress with it. 409 4090301 when it isn't open; 409 4090302 when the provider can't cancel the payment in progress yet (retry shortly).
Path parameters
reference_idstringRequired
Headers
AuthorizationstringRequiredBearerplus your API key. See Authentication.
Responses
200 OK
Checkout canceled (code 2000301).
What data holds
checkoutobject23 fields in
checkoutreference_idstringexternal_reference_idstring | nulltypestringOne of:ORDERAMOUNTstatusstringOne of:OPENCOMPLETEDEXPIREDCANCELLEDcurrencystringISO 4217. PHP today; more as they're enabled for your account.One of:PHPamountnumberThe total, in pesos.descriptionstring | nullitemsarray of objects4 fields in
itemsnamestringRequiredUp to 255 charactersquantityintegerRequiredAt least 1At most 9999unit_amountnumberRequiredPesos, as a JSON number.amountnumberquantity×unit_amount.
channelsarray of strings | nullOne of:QR_PHGCASHMAYACARDPAY_AND_GOPALAWANPAYBAYADqr_ph_appsarray of strings | nullcustomerobject4 fields in
customeridstring | nullYour ID for the customer, withsave_payment_method.namestring | nullemailstring | nullmobile_nostring | null
save_payment_methodbooleanA card payment also saves the card (the payment'spayment_method_id).checkout_urlstring (uri)success_urlstring | nullcancel_urlstring | nullwebhook_urlstring | nullpaymentanyThe payment that paid it.expires_atstring (date-time)completed_atstring (date-time) | nullexpired_atstring (date-time) | nullcancelled_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
401 Unauthorized
Missing, malformed or unknown API key (code 4010000).
403 Forbidden
The key can't make this request (code 4030000): an address outside the key's IP allowlist, a live key before your live mode is on, or an account that isn't active. A live key sent from a browser is refused (code 4030001): keep live keys on your server.
404 Not Found
Not found in this mode for your account (code 4040000).
409 Conflict
The request conflicts with the current state, e.g. an Idempotency-Key reused with a different body (4090001), a request still in progress (4090002), a payment that can't be canceled (4090101) or can't be canceled at the provider yet (4090102, retry shortly), or a webhook still being sent (4090201).