Skip to main content
DELETE
Cancel a pending transaction that hasn’t been processed yet. Only works for transactions in pending status.

Path Parameters

string
required
The unique transaction identifier returned from transaction creation

Response

string
The cancelled transaction identifier
string
New status: cancelled
string
Cancellation timestamp (ISO 8601)

Cancellation Rules

When You Can Cancel

Mode-Specific Behavior

Wallet Mode:
  • Can cancel before transaction is broadcast to network
  • Once broadcast, cancellation is not possible
  • Network fees may still apply if partially processed
Private Mode:
  • Can cancel before funds are sent to ephemeral address
  • Cannot cancel after deposit is detected
  • Routing fees are not charged for cancelled transactions

Refund Policy

Automatic Refunds

Cancelled transactions receive automatic refunds:
  • Wallet Mode: No funds were deducted (transaction never broadcast)
  • Private Mode: No deposit made, no refund needed

Partial Processing

If cancellation occurs during processing:
  • Network fees may be non-refundable
  • Routing fees are refunded for private mode
  • Original assets remain in sender wallet

Error Responses

string
Error code identifier
string
Human-readable error message
object
Additional error context

Common Errors

Best Practices

When to Cancel

  • Quote Expiration: Cancel if quote expires before signing
  • Price Changes: Cancel if market conditions change significantly
  • User Error: Cancel if wrong recipient or amount entered
  • Network Issues: Cancel if experiencing connectivity problems

Monitoring Cancellations

Alternative Actions

If cancellation isn’t possible:
  • Monitor Status: Track transaction to completion
  • Contact Support: For urgent issues, contact support
  • Future Prevention: Use shorter quote expiration times

Rate Limits

Cancellation requests are subject to the same rate limits as other API endpoints:

Next Steps

Get Transaction Status

Check the current status of your transactions

Webhook Notifications

Get real-time updates on transaction status changes