Cancelling a Transaction

DEVELOPER GUIDE

Cancel a Payment Request or Payout

Learn when a transaction can be cancelled, how to cancel it via API or the Zepto dashboard, and what to do if the transaction has already progressed too far.

There may come a time when you wish to cancel a transaction that has already been created, this could be due to a customer requesting a change to their Debit amount or simply a transaction made in error that you wish to stop processing. Whatever the reason, this article will explain when you are able to and how you can cancel a Payment Request or Payment.

Important

A Payment Request or Payout can only be cancelled before the associated debit reaches matured status. Once it reaches that stage, it has already been sent to the bank and can no longer be stopped.

When you can cancel

  • Only before matured
  • After this stage, bank processing has started
  • Cancellation is no longer possible

Cancel via API

  • DELETE /payment_requests/{id}
  • DELETE /payouts/{debit_id}
  • Returns 204 on success

If cancellation fails

  • Returns 400 error
  • Usually already processing or matured
  • Proceed with refund instead

Cancellation Flow

1

Locate the Payment Request or Payout

2

Check if debit status is before matured

3

Send the appropriate DELETE request

4

If too late → allow processing and issue refund

API Endpoints

Payment Request
DELETE /payment_requests/PR.1234

Cancels a pending payment request.

Payout
DELETE /payouts/D.1234

Cancels a payout using the debit reference.

1

Confirm transaction is cancellable

2

Send DELETE request

3

Expect 204 on success

4

Expect 400 if already processing


If cancellation is no longer possible, allow the transaction to complete and issue a refund.