cURL
Intents (Advanced)
AbortIntent
POST
cURL
Documentation Index
Fetch the complete documentation index at: https://anypay-trails-api-docs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheAbortIntent endpoint cancels an in-flight intent after you have submitted the abort transaction on-chain. Once the abort transaction is confirmed, call this endpoint to notify Trails so the intent status is updated to ABORTED and any recoverable funds are tracked.
Use Cases
- Cancel a pending intent that has not yet been processed
- Recover stuck or expired intents
- Clean up failed cross-chain transactions
Request Parameters
Required Fields
- intentId (string): The unique ID of the intent to abort
- chainId (number): The chain ID where the abort transaction was submitted
- abortTransactionHash (string): The transaction hash of the on-chain abort transaction
Response
- intentId (string): The ID of the aborted intent
- status (
IntentStatus): Updated status of the intent (typicallyABORTED)
Examples
Abort a Pending Intent
With the Trails SDK
You must submit the abort transaction on-chain first and wait for it to be confirmed before calling this endpoint. The
abortTransactionHash must correspond to a valid on-chain transaction.Next Steps
GetIntentHistory
Query intent history including aborted intents
GetIntent
Check current intent status