{"templateId":"markdown","versions":[{"version":"v1.39","label":"v1.39 STS","link":"/products/custody/transactions/cancel-and-replace","default":true,"active":true,"folderId":"c15a2701"},{"version":"v1.38","label":"v1.38 STS","link":"/products/custody/v1.38/transactions/cancel-and-replace","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.34","label":"v1.34 LTS","link":"/products/custody/v1.34/transactions/cancel-and-replace","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.26","label":"v1.26 LTS","link":"/products/custody/v1.26/transactions/cancel-and-replace","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.19","label":"v1.19 LTS","link":"/products/custody/v1.19/transactions/cancel-and-replace","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.15","label":"v1.15 LTS","link":"/products/custody/v1.15/transactions/cancel-and-replace","default":false,"active":false,"folderId":"c15a2701"}],"sharedDataIds":{"sidebar":"sidebar-products/custody/@v1.15/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["partial","admonition"]},"type":"markdown"},"seo":{"title":"Cancel or replace a transaction","description":"User guides, API reference, and support resources.","siteUrl":"https://docs.ripple.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cancel-or-replace-a-transaction","__idx":0},"children":["Cancel or replace a transaction"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If a transaction cannot be fully posted on chain, for example, if the transaction order has insufficient fees, you can attempt to fix the issue in one of the following ways:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cancel the transaction order: If the transaction processing workflow has not fully allocated the transaction resources, you can cancel it with an intent type of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_AttemptTransactionOrderCancellation"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#cancel-transactions"},"children":["Cancel transactions"]},"."]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Replace the transaction order: If the transaction processing workflow has fully allocated the transaction resources, a straight cancellation is no longer possible and you need to replace the transaction order instead. You can replace the transaction order in one of the following ways:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Replace the order through cancellation: If successful, ","Ripple Custody"," automatically creates a new transaction order to replace the previous one."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new transaction order manually to replace the previous transaction order."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#replace-transactions"},"children":["Replace transactions"]},"."]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"cancel-transactions","__idx":1},"children":["Cancel transactions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["These steps describe how to attempt transaction order cancellation. You can cancel transactions that are currently in any status up to and including ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Preparing"]}," on all ledgers."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/processing#ripple-custody-statuses"},"children":["Learn more about transaction statuses"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"prerequisites","__idx":2},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To attempt transaction order cancellation, you need the following:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Prerequisite"},"children":["Prerequisite"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Additional information"},"children":["Additional information"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ID of the transaction order to cancel"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/viewing-assets/view-and-audit-api"},"children":["View transactions"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A replacement transaction order ID, in a standard UUID format"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"attempt-transaction-order-cancellation","__idx":3},"children":["Attempt transaction order cancellation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can attempt transaction order cancellation through creation of an intent with a type of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_AttemptTransactionOrderCancellation"]},"."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"System change process"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All new requests to change the system state follow the same process. To familiarize yourself with this process first, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To attempt transaction order cancellation, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", with a payload similar to the following example."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"payload-example","__idx":4},"children":["Payload example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"\"payload\": {\n    \"targetTransactionOrderId\": \"a945fe8a-dcb0-43d7-8440-60fe42aaefbf\",\n    \"replacementTransactionOrderId\": \"18c6ff37-f896-4a69-8f75-c877fb4283c3\",\n    \"reason\": \"fee too small\",\n    \"maximumFee\": \"12500\",\n    \"type\": \"v0_AttemptTransactionOrderCancellation\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["targetTransactionOrderId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The transaction order to cancel."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["replacementTransactionOrderId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A new ID to use for a replacement transaction."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["reason"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Reason for cancellation of this operation."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["maximumFee"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["An optional fee to cap the cost of the transaction."]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"success"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the intent is successfully approved and executed, the transaction order is cancelled and the status of the transaction changes to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Interrupted"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/transactions/processing#ripple-custody-statuses"},"children":["Learn more about transaction statuses"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"replace-transactions","__idx":5},"children":["Replace transactions"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can only replace transactions on Bitcoin and Ethereum ledgers."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the transaction is in any status between ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Reserved"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Broadcasting"]},", you can no longer cancel the transaction order, you can only replace it. You can create a replacement transaction order using one of the following methods:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create an intent of type ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_AttemptTransactionOrderCancellation"]},": With this method, ","Ripple Custody"," automatically creates the replacement transaction order for you and sets the fee strategy to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["High"]},". The only value you can set is the maximum fee. For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#replace-through-transaction-order-cancellation"},"children":["Replace through transaction order cancellation"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Create a new transaction order with a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceStrategy.type"]}," of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OrderReplacement"]},": With this method, you manually create the replacement transaction order, so you can change other fields of the transaction order as needed. For more information, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#replace-through-transaction-order-creation"},"children":["Replace through transaction order creation"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"replace-through-transaction-order-cancellation","__idx":6},"children":["Replace through transaction order cancellation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can replace a transaction order through cancellation of the previous one."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To replace the transaction order in this way, follow the instructions in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#attempt-transaction-order-cancellation"},"children":["Attempt transaction order cancellation"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["When the intent is successfully approved, if the transaction is still not mined, ","Ripple Custody"," automatically creates a replacement transaction order and updates the replaced transaction order as described below."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"replacement-transaction-order","__idx":7},"children":["Replacement transaction order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ripple Custody"," creates a new transaction order with the following details:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Ledger"},"children":["Ledger"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Details"},"children":["Details"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Bitcoin"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination"]},": The replaced transaction's sender account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]},": The sum of all the outputs amounts of the replaced transaction."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["paysFee"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeStrategy"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Priority"]}," with value ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["High"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceStrategy"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OrderReplacement"]},", where the property ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionOrderId"]}," is the replaced transaction"]}]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ethereum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["destination"]},": The replaced transaction's sender account."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]},": 0."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feeStrategy"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Priority"]}," with value ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["High"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceStrategy"]},": Set to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OrderReplacement"]},", where the property ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionOrderId"]}," is the replaced transaction order ID."]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"replaced-transaction-order","__idx":8},"children":["Replaced transaction order"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ripple Custody"," updates the replaced transaction order as follows:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processing.status"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Interrupted"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ledgerStatus"]},": first becomes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Replaced"]}," and later ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]},"."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"replace-through-transaction-order-creation","__idx":9},"children":["Replace through transaction order creation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can replace a transaction order through creation of a new one that explicitly replaces the previous transaction order."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"System change process"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All new requests to change the system state follow the same process. To familiarize yourself with this process first, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},"."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To replace the transaction order, follow the steps in ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/governance/intents/manage-intents-and-approvals"},"children":["Manage intents and approvals"]},", with a payload similar to one of the following examples."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"payload-example---ethereum","__idx":10},"children":["Payload example - Ethereum"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"953d75b2-e384-46e9-8a72-a1ce753a50e2\",\n        \"accountId\": \"7bb5622f-3c66-4244-8608-a6e92104d0f1\",\n        \"parameters\": {\n            \"destination\": {\n                \"accountId\": \"f0048a50-3988-4e31-9cbf-c4b6582d338d\",\n                \"type\": \"Account\"\n            },\n            \"amount\": \"1\",\n            \"feeStrategy\": {\n                \"priority\": \"High\",\n                \"type\": \"Priority\"\n            },\n            \"maximumFee\": \"63000000000000\",\n            \"data\": null,\n            \"resourceStrategy\":{\n                \"transactionOrderId\":\"a945fe8a-dcb0-43d7-8440-60fe42aaefbb\",\n                \"type\":\"OrderReplacement\"\n                },\n            \"type\": \"Ethereum\"\n        },\n        \"description\": \"a eth transaction to an hmz account\",\n        \"customProperties\": {},\n        \"type\": \"v0_CreateTransactionOrder\"\n    }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Fields to note are as follows:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A new transaction order ID."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceStrategy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Used to replace the transaction in the mempool. The only available ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OrderReplacement"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionOrderId"]}," is the ID of the previous transaction order to replace."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"payload-example---bitcoin","__idx":11},"children":["Payload example - Bitcoin"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n    \"payload\": {\n        \"id\": \"06cb5ed2-6a75-4759-96a1-bc1e2ac9e90a\",\n        \"accountId\": \"b82a94ea-78f3-4fd4-8790-d8e4d6958986\",\n        \"parameters\": {\n            \"outputs\": [\n                {\n                    \"destination\": {\n                        \"address\": \"2N2SzRSyeq8nu732jMa6CWs1ejVn7Z6WkX3\",\n                        \"type\": \"Address\"\n                    },\n                    \"amount\": \"300000\",\n                    \"paysfee\": true\n                },\n                {\n                    \"destination\": {\n                        \"accountId\": \"ccbe557e-48af-4514-b835-9675a8a6ea92\",\n                        \"type\": \"Account\"\n                    },\n                    \"amount\": \"200000\"\n                }\n            ],\n            \"feeStrategy\": {\n                \"priority\": \"High\",\n                \"type\": \"Priority\"\n            },\n            \"maximumFee\": \"10000\",\n            \"resourceStrategy\": {\n                \"transactionOrderId\": \"1d5b4330-d07a-4623-96aa-b6485acf3121\",\n                \"reason\":\"Order to replace previous order\",\n                \"type\": \"OrderReplacement\"\n            },\n            \"type\": \"Bitcoin\"\n        },\n        \"description\": \"double tx to check new policy\",\n        \"customProperties\": {},\n        \"type\": \"v0_CreateTransactionOrder\"\n    }\n}\n\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Field"},"children":["Field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["A new transaction order ID."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["resourceStrategy"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Used to replace the transaction in the mempool. The only available ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["type"]}," is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["OrderReplacement"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transactionOrderId"]}," is the ID of the previous transaction order to replace."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["outputs.amount"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The replacement transaction consumes at least all the UTXOs of the replaced transaction, so the replacement transaction total must equal at least the total of the replaced transaction, and have higher fees, to ensure the validator picks this transaction up instead of the replaced transaction."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"bitcoin-chained-transactions-replacement","__idx":12},"children":["Bitcoin chained transactions replacement"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In a scenario where a user submits two chained transactions to a Bitcoin ledger, the replacement takes place as follows:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The user has two chained transactions ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["B"]}," which are both unconfirmed."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["The user submits a transaction replacement ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["C"]}," for transaction ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Transaction ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A"]}," is successfully replaced by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["C"]}," and chained transaction ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["B"]}," becomes invalid."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Transactions ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["A"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["B"]}," show ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["processing.status"]}," as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Interrupted"]},", and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ledgerStatus"]}," appears first as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Replaced"]}," and later as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Expired"]},"."]}]},"headings":[{"value":"Cancel or replace a transaction","id":"cancel-or-replace-a-transaction","depth":1},{"value":"Cancel transactions","id":"cancel-transactions","depth":2},{"value":"Prerequisites","id":"prerequisites","depth":3},{"value":"Attempt transaction order cancellation","id":"attempt-transaction-order-cancellation","depth":3},{"value":"Payload example","id":"payload-example","depth":4},{"value":"Replace transactions","id":"replace-transactions","depth":2},{"value":"Replace through transaction order cancellation","id":"replace-through-transaction-order-cancellation","depth":3},{"value":"Replacement transaction order","id":"replacement-transaction-order","depth":4},{"value":"Replaced transaction order","id":"replaced-transaction-order","depth":4},{"value":"Replace through transaction order creation","id":"replace-through-transaction-order-creation","depth":3},{"value":"Payload example - Ethereum","id":"payload-example---ethereum","depth":4},{"value":"Payload example - Bitcoin","id":"payload-example---bitcoin","depth":4},{"value":"Bitcoin chained transactions replacement","id":"bitcoin-chained-transactions-replacement","depth":4}],"frontmatter":{"seo":{"title":"Cancel or replace a transaction"}},"lastModified":"2026-08-04T20:25:11.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/custody/transactions/cancel-and-replace","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}