cancelCheckoutTransaction
Cancels a checkout transaction before it has been broadcast to the blockchain. Once cancelled, the transaction cannot be resumed — create a new one to start over.Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
transactionId | string | The checkout transaction ID to cancel. |
Returns
Promise<CheckoutTransaction> - The cancelled transaction object.
Examples
Cancel on user action
This example uses React; the JavaScript SDK is framework-agnostic and can be used with any frontend or in Node.
Cancel on wallet rejection
If a user rejects the signing request in their wallet, cancel the transaction to clean up:Notes
- Only transactions that have not yet been broadcast can be cancelled
- Cancelling clears the session token associated with the transaction
- After cancellation, you must create a new transaction to restart the flow
Related
createCheckoutTransaction- Create a new transaction after cancellinggetCheckoutTransaction- Check transaction state before cancellingsubmitCheckoutTransaction- Submit the transaction instead