Skip to main content
The cross-chain payments API is separate from the OMS Payments API. It has its own authentication, its own base URL, and its own SDK package. Do not use OMS Payments API credentials or base URLs with these endpoints.

Authentication

All requests require an X-Access-Key header with your API key.
X-Access-Key: YOUR_ACCESS_KEY
Retrieve your API key from the Trails Dashboard.

Base URL

https://trails-api.sequence.app/rpc/Trails/
All endpoints are appended to this base URL. For example, the QuoteIntent endpoint is:
POST https://trails-api.sequence.app/rpc/Trails/QuoteIntent

All endpoints are POST requests

This API uses POST for all endpoints, including read operations. Request bodies are JSON.

SDK installation

pnpm install @0xtrails/api
Initialize the client once and reuse it across your application:
import { TrailsApi } from "@0xtrails/api";

const trails = new TrailsApi({
  baseUrl: "https://trails-api.sequence.app/rpc/Trails/",
  accessKey: process.env.TRAILS_ACCESS_KEY,
});

Intent lifecycle

A payment is called an intent. Every intent moves through a defined set of states from quote to settlement.
StateDescriptionAPI call
QUOTEDA route and fee have been calculated. Valid for 5 minutes.QuoteIntent
COMMITTEDThe quote is locked in. Valid for 10 minutes; must be executed within this window.CommitIntent
EXECUTINGFunds are in transit; routing and conversion are in progress.ExecuteIntent
SUCCEEDEDFunds have arrived at the destination. Terminal state.(automatic)
FAILEDThe intent could not be completed. Terminal state.(automatic)

Expiry and failure

  • A QUOTED intent expires after 5 minutes. After expiry, request a new quote.
  • A COMMITTED intent expires after 10 minutes if ExecuteIntent is not called. After expiry, the intent moves to FAILED.
  • FAILED is a terminal state. Create a new intent to retry.

Next steps

Quotes and execution

QuoteIntent, CommitIntent, ExecuteIntent, and AbortIntent.

Status and monitoring

Track an intent through to settlement.

Routes and discovery

Supported networks, tokens, routes, and prices.

Accept funds

Integration guide for the widget, SDK, and direct API.