Cancel Transaction
This endpoint allows you to cancel an active transaction by its transaction reference. When a transaction is cancelled, the checkout link will be expired and no further payment attempts will be possible.
How to Cancel a Transaction
Endpoint https://api.chapa.co/v1/transaction/cancel/<tx_ref>
<tx_ref>is the transaction reference that you provided when the transaction was initialized.
Method PUT
Authorization: Pass your secret key as a bearer token in the request header to authorize this call.
Important Notes
- Only active transactions can be cancelled
- Once cancelled, the transaction cannot be reactivated
- The checkout link will be expired immediately
- This action is irreversible
1import requests23 url = "https://api.chapa.co/v1/transaction/cancel/chewatatest-6669"45 headers = {6 'Authorization': 'Bearer CHASECK-xxxxxxxxxxxxxxxx'7 }89 response = requests.request("PUT", url, headers=headers)1011 print(response.text) ℹ️
Refer to our Error Codes page for all responses for this request.