Skip to main content
POST
/
wallets
/
{walletId}
/
transfers
/
{transferId}
/
cancel
Cancel Transfer
curl --request POST \
  --url https://api.dfns.io/wallets/{walletId}/transfers/{transferId}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'X-DFNS-USERACTION: <api-key>'
{
  "id": "<string>",
  "walletId": "<string>",
  "network": "Algorand",
  "requester": {
    "userId": "<string>",
    "tokenId": "<string>"
  },
  "requestBody": {
    "kind": "Transaction",
    "transaction": "<string>",
    "externalId": "<string>"
  },
  "status": "Pending",
  "dateRequested": "<string>",
  "reason": "<string>",
  "txHash": "<string>",
  "fee": "<string>",
  "approvalId": "<string>",
  "datePolicyResolved": "<string>",
  "dateBroadcasted": "<string>",
  "dateConfirmed": "<string>",
  "externalId": "<string>"
}

Authentication

✅ Organization User (CustomerEmployee)
✅ Delegated User (EndUser)
✅ Service Account

Required Permissions

Wallets:Transactions:Create: Always required.
Wallets:Transfers:Read: Always required.

Authorizations

Authorization
string
header
required

Bearer Token: Used to authenticate API requests. More details how to generate the token: Authentication flows

X-DFNS-USERACTION
string
header
required

User Action Signature: Used to sign the change-inducing API requests. More details how to generate the token: User Action Signing flows

Path Parameters

walletId
string
required

Wallet id.

Required string length: 1 - 64
transferId
string
required

Transfer id.

Required string length: 1 - 64

Response

200 - application/json

Success

id
string
required
walletId
string
required
network
enum<string>
required
Available options:
Algorand,
AlgorandTestnet,
Aptos,
AptosTestnet,
ArbitrumOne,
ArbitrumSepolia,
ArcTestnet,
AvalancheC,
AvalancheCFuji,
BabylonGenesis,
BabylonTestnet5,
Base,
BaseSepolia,
Berachain,
BerachainBepolia,
Bitcoin,
BitcoinSignet,
BitcoinTestnet3,
BitcoinCash,
Bob,
BobSepolia,
Bsc,
BscTestnet,
Canton,
CantonTestnet,
Cardano,
CardanoPreprod,
Concordium,
ConcordiumTestnet,
Celo,
CeloAlfajores,
Codex,
CodexSepolia,
CosmosHub4,
CosmosIcsTestnet,
Dogecoin,
Ethereum,
EthereumClassic,
EthereumClassicMordor,
EthereumGoerli,
EthereumSepolia,
EthereumHolesky,
EthereumHoodi,
FantomOpera,
FantomTestnet,
FlareC,
FlareCCoston2,
FlowEvm,
FlowEvmTestnet,
Hedera,
HederaTestnet,
Ink,
InkSepolia,
InternetComputer,
Ion,
IonTestnet,
Iota,
IotaTestnet,
Kaspa,
Kusama,
KusamaAssetHub,
Litecoin,
Near,
NearTestnet,
Optimism,
OptimismSepolia,
Origyn,
Plasma,
PlasmaTestnet,
Plume,
PlumeSepolia,
Paseo,
PaseoAssetHub,
Polkadot,
PolkadotAssetHub,
Polygon,
PolygonAmoy,
Polymesh,
PolymeshTestnet,
Race,
RaceSepolia,
SeiAtlantic2,
SeiPacific1,
Solana,
SolanaDevnet,
Starknet,
StarknetSepolia,
Stellar,
StellarTestnet,
Sui,
SuiTestnet,
Tezos,
TezosGhostnet,
TempoAndantino,
Tsc,
TscTestnet1,
Ton,
TonTestnet,
Tron,
TronNile,
Westend,
WestendAssetHub,
XrpLedger,
XrpLedgerTestnet
requester
object
required
requestBody
Transaction · object
required

Signs an unsigned transaction and broadcasts it to chain. For EVM transactions, you may use JSON objects:

FieldDescriptionType - Optional
typeEthereum transaction type. 0 for legacy transaction; 2 for EIP-1559 transaction; 4 for EIP-7702 transaction. Default is 2 if undefined.Integer (optional)
toThe destination address or target contract. Leave undefined when the transaction is a contract deployment.String (optional)
valueThe amount of native tokens to transfer in minimum denomination.String (optional)
dataABI encoded function call data in hex format. Can also be the encoded smart contract data when the transaction is a contract deployment.String (optional)
nonceThe transaction number to guarantee idempotency. If omitted, it will be provided automatically. Note the same nonce can be submitted multiple times with a higher maxFeePerGas to "overwrite" existing transactions in the mempool.Integer or String (optional)
gasLimitThe maximum amount of gas that can be spent for executing the transaction. If omitted, it will be calculated automatically.String (optional)
gasPriceThe amount of per unit gas. Only valid for a type 0 legacy transaction. If omitted, it will be calculated automatically.String (optional)
maxFeePerGasThe maximum amount of per unit gas willing to be paid for the transaction. Valid for type 2 and type 4 transactions. If omitted, it will be calculated automatically.String (optional)
maxPriorityFeePerGasThe maximum amount of per unit gas to be included as a tip to the validator. Valid for type 2 and type 4 transactions. If omitted, it will be calculated automatically.String (optional)
authorizationListA list that indicates what code the signer of each authorization desires to execute in the context of their EOA. Only valid for type 4 transaction.Authorization (optional)

For Starknet transactions, you may use invocation request objects:

FieldDescriptionType - Optional
callsArray of contract calls to execute. Each element contains:Array (required)
↳ calls[0].contractAddressThe target contract addressString (required)
↳ calls[0].entrypointThe function name to callString (required)
↳ calls[0].calldataParameters for the function callArray of Strings (optional)
nonceTransaction nonce. If omitted, will be determined automatically.String/Number/BigInt (optional)
resourceBoundsGas bounds for L1 and L2. If omitted, will be estimated automatically.Object (optional)
↳ resourceBounds.l1GasL1 gas configuration with maxAmount and maxPricePerUnitObject (optional)
↳ resourceBounds.l2GasL2 gas configuration with maxAmount and maxPricePerUnitObject (optional)
↳ resourceBounds.l1DataGasL1 data gas configuration with maxAmount and maxPricePerUnitObject (optional)
tipTransaction tip. Defaults to 0 if omitted.String/Number/BigInt (optional)

For Concordium transactions, you may use JSON objects (from https://github.com/Concordium/concordium-node-sdk-js/blob/sdk/12.0.0-alpha.3/packages/sdk/src/transactions/Transaction.ts#L102)

FieldDescriptionType - Optional
HeaderTransaction header for the intermediary state of account transactions, i.e. prior to being signing.Object (required)
↳ Header.executionEnergyAmountThe destination address or target contract. Leave undefined when the transaction is a contract deployment.String/Number/BigInt (required)
↳ Header.numSignaturesThe number of signatures the transaction can hold. If "undefined", this will be defined at the time of signingInteger (optional)
↳ Header.senderThe account address that is source of this transactionString (optional)
↳ Header.nonceThe account nonceString/Number/BigInt (optional)
↳ Header.expiryexpiration of the transactionInteger (optional)
PayloadThe transaction account payload in JSON format (https://github.com/Concordium/concordium-node-sdk-js/blob/main/packages/sdk/src/accountTransactions.ts#L646)Object (required)
{
"kind": "Transaction",
"transaction": {
"to": "0x00fb58432ef9d418bf6688bcf0a226d2fcaa18e2",
"data": "0x40d097c3000000000000000000000000d2f77f85a50cdd650ca562f3a180284e1d5b4934",
"maxFeePerGas": "1626000000000",
"maxPriorityFeePerGas": "1332000000000"
}
}
{
"kind": "Transaction",
"transaction": {
"calls": [
{
"contractAddress": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
"entrypoint": "transfer",
"calldata": ["0x123...", "0x1000000000000000000", "0x0"]
}
],
"nonce": "0x3a",
"resourceBounds": {
"l2Gas": {
"maxAmount": "0x1694a0",
"maxPricePerUnit": "0x10c388d00"
},
"l1Gas": {
"maxAmount": "0x0",
"maxPricePerUnit": "0x2e83a3bfd70a"
},
"l1DataGas": {
"maxAmount": "0x120",
"maxPricePerUnit": "0xc7c6"
}
},
"tip": 0,
}
}
{
"kind": "Transaction",
"transaction": {
"to": "0x00fb58432ef9d418bf6688bcf0a226d2fcaa18e2",
"data": "0x40d097c3000000000000000000000000d2f77f85a50cdd650ca562f3a180284e1d5b4934",
"maxFeePerGas": "1626000000000",
"maxPriorityFeePerGas": "1332000000000"
}
}
status
enum<string>
required
Available options:
Pending,
Executing,
Broadcasted,
Confirmed,
Failed,
Rejected
dateRequested
string
required
reason
string
txHash
string
fee
string
approvalId
string
datePolicyResolved
string
dateBroadcasted
string
dateConfirmed
string
externalId
string