Cancel Transfer

Cancels an EVM transfer by creating a replacement transaction with the same nonce.

The new transaction sends 0 value to the same address, effectively invalidating the original transfer.This endpoint can cancel transfers that meet all of the following conditions:
  • The network is EVM compatible (Ethereum, Polygon, BSC, and similar chains).
  • The transfer is in Broadcasted status and pending inclusion in a block.
  • The transfer is in Failed status because it failed off chain (before broadcast).
How the cancellation works?
  1. The system extracts the nonce from the original transfer’s signed transaction.
  2. A new transaction with the same nonce is created.
    • It sends 0 value
    • It targets the same destination address
  3. The new transaction replaces or consumes the nonce:
    • If the original was broadcasted: The new transaction replaces it in the mempool.
    • If the original failed off‑chain: The new transaction consumes the unused nonce.
Note: For transactions already broadcasted, cancellation is not guaranteed because it depends on network conditions and whether the original transaction has already been mined.
HTTP request
POST /wallets/{walletId}/transfers/{transferId}/cancel
Authorization requirements
Header Type Required Description
Authorization string Yes Bearer token used to authenticate the request. See Authentication flows for instructions on generating this token.
X-DFNS-USERACTION string Yes User action signature used to authorize change-inducing requests. See User Action Signing flows for instructions on generating this signature.
Path parameter
Parameter Type Required Description
walletId string Yes ID of the wallet. Length: 1 to 64.
transferId string Yes ID of the transfer to cancel. Length: 1 to 64.
Request body
curl --request POST \
  --url https://api.digitalassets.ibm.com/wallets/{walletId}/transfers/{transferId}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'X-DFNS-USERACTION: <api-key>'
Response
200: Success

Example response:

{
  "id": "tx-583hu-sp2p7-slvb9nqpa3hd8bus",
  "walletId": "wa-5pfuu-9euek-h0odgb6snva8ph3k",
  "network": "Algorand",
  "requester": {
    "userId": "us-6b58p-r53sr-rlrd3l5cj3uc4ome",
    "tokenId": "to-202a0-cdo33-o65mbt6q758lvvnt"
  },
  "requestBody": {
    "kind": "Transaction",
    "transaction": "<string>",
    "externalId": "<string>"
  },
  "status": "Pending",
  "dateRequested": "2023-04-14T20:41:28.715Z",
  "reason": "<string>",
  "txHash": "<string>",
  "fee": "<string>",
  "approvalId": "ap-2a9in-tt2a1-983lho480p35ejd0",
  "datePolicyResolved": "2023-04-14T20:41:28.715Z",
  "dateBroadcasted": "2023-04-14T20:41:28.715Z",
  "dateConfirmed": "2023-04-14T20:41:28.715Z",
  "externalId": "<string>"
}