Cancel Transaction
API Documentation: Cancel Transaction
Overview
This API endpoint allows you to cancel transaction from a blockchain network
- HTTP Method: POST
- Endpoint:
/api/<VERSION>/wallet/cancel-transaction
Request Body Parameters
network
(required if chainId empty): The network used for transactions. You can see Networks Reference to get the network code.chainId
(required if network empty): The chain ID of the network used for transactions.nonce
(required): This is a number that must be unique for each transaction, please provide the nonce of the transaction you want to cancel.
Example Request Body
{
"network": "ethereum",
"chainId": "1",
"nonce": 12
}
Request
Request Headers
Authorization
(required): JWT token which was generated when user login and do not have an MPC wallet.x-client-secret
(required): Client secret which was generated when register in Xellar Embedded Wallet API Service Dashboard.
Example Request Syntax
curl -X POST -H "Content-Type: application/json" -H "x-client-secret: $YOUR_CLIENT_SECRET" -H "Authorization: Bearer $YOUR_ACCESS_TOKEN" -d '{
"network": "ethereum",
"chainId": "1",
"nonce": 12
}' <BASE_URL>/api/<VERSION>/wallet/send-coin
Response
The response will include a JSON object with the following properties:
status
(number): The HTTP status code of the response (e.g., 200 for success).message
(string): A message providing additional information about the operation.data
(object): An object containing the transaction receipt data.
Example Response
{
"status": 200,
"message": "Cancellation is in progress",
"data": {
"hash": "0x4ec81ca3d6a112bdf991a220ed83458f061f1f818273c93546ea91a4e1d675"
}
}