Cancel Transaction

Cancel (Void) transaction API is used to cancel (void) the transaction with PG. Usually, this API can get the transaction cancelled (voided) when transaction is still in non-terminal state i.e. PROCESSING, AUTHORIZED, CAPTURED, PROCESSING. It supports cancellation of AUTH, PURCHASE, CAPTURE and REFUND transactions. Based on the transactionUtr provided in the request, checkout will identify which transaction needs to be cancelled.

HTTP Status and Response Status Matrix

HTTP
Status
Response StatusResponse Message
200CANCELLEDSuccessfully cancelled (voided).
200ALREADY_CANCELLEDProvided transaction is already cancelled(voided)
200FAILEDThis will be populated by processor
400VALIDATION_ERRORIn case of VALIDATION_ERROR, field specific validation details will be returned.
400REJECTEDNo transaction found to initiate cancel(void). Please provide valid transactionUtr.
400REJECTEDProvided transaction is already settled
400ERROR_FROM_PGThis will be populated by processor
400REJECTEDCancel (Void) transaction not allowed as the original transaction is already processed
400ERROR_FROM_PGThis will be populated by processor
500ERROR_FROM_PGThis will be populated by processor
500ERROR_FROM_PGError in processing gateway response
500INTERNALPROCESSING ERRORSomething went wrong at our end, try again after some time
502ERROR_CONNECTING_PGGateway connectivity unavailable
503ERROR_CONNECTING_PGGateway connectivity unavailable
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required
length ≤ 45
^(txn|cptr|rfnd)[_0-9A-Za-z]+$

Unique transaction reference (UTR) number generated by checkout for original transaction/ capture transaction/refund transaction.

string
required
length ≤ 20
^[0-9]+$

Amount to be refunded/voided. Amount is always considered in the smallest currency sub-unit i.e. to do a transaction of 100 USD, provide 10000 as value. In the case of three decimal currencies, such as KWD, BHD and OMR, pass the value as 100000.

Headers
string
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json