Cancel transaction

Cancels a transaction that has not been submitted yet. Only a PENDING transaction can be cancelled, and only by whoever created it or by someone who can sign for its source wallet. Anything already settled, failed or cancelled is refused, as is a parent transaction that groups several others.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The transaction id, as returned in transactionId by the call that created it, such as POST /trades/buy, POST /trades/sell, POST /assets/trustlines or POST /bank-accounts/withdraw, or in id by GET /transactions. A value that is not a well-formed id is reported as not found rather than rejected.

Headers
string
required

Bearer JWT obtained from POST /mfa/login. Send as "Bearer ". Expires after 5 minutes.

Responses

400

The transaction cannot be cancelled. The messageKey says why: transaction.only_pending_tx_allowed when it is not PENDING, transaction.action_not_allowed_on_parent_tx when it groups other transactions, transaction.tx_in_progress when it is already being submitted, transaction.only_creator_can_cancel when you neither created it nor can sign for it, and transaction.cannot_cancel_transaction_of_type_cancel when it is itself a cancellation.

401

Unauthorized. The bearer token is missing, expired or invalid. The response body is empty.

404

No transaction exists with that id, with messageKey transaction.tx_not_found. Also returned for a value that is not a well-formed id.

500

Internal server error

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