Skip to main content
This guide walks through the complete order submission flow: check authorization, fetch quote calldata, sign, and broadcast the transaction.

Prerequisites

  • A route identified from Route Discovery
  • Wallet with sufficient offer asset balance (at least the route’s minOrderSize)
  • Native token (ETH) for gas and messaging fees

Step 0: Check Authorization

Before submitting an order, check whether the offer token requires approval for the TransitStation contract. GET /v3/core/authorization

Response Variants

permit — Token supports EIP-2612. Sign off-chain, then pass to quote endpoint.
approval — Standard ERC-20 approval required first.
already_approved — Sufficient allowance exists. Proceed to quote.

Handling Each Path

Step 1: Get Order Quote

GET /v1/transit/orders/quote This endpoint returns everything needed to submit the transaction: the contract address, ABI-encoded calldata, and the native token value for messaging fees.

Parameters

Example Request

Response

Step 2: Understand the Response

Step 2b: Optional — Verify Quote Integrity

The quote response includes a signature from the server bound to your exact quote parameters. This signature is verified on-chain when submitting your order, so if any parameters in the quote body differ from what was used to generate the signature, the order submission will result in an error. If you’d like additional security guarantees, you can decode the transaction.data returned from the Quote endpoint and verify that the decoded parameters match the parameters you requested. Use responseFormat=full or responseFormat=structured to access the decoded args array and inspect the Quote struct directly.

Step 3: Submit the Transaction

Broadcast the transaction using the returned to, data, and value fields.

Code Example (viem)

Step 4: Record the Order ID

The transaction receipt contains an OrderSubmitted event with the order ID (a hex hash). Use this ID to track fulfillment via the Order Tracking endpoints.

Response Formats

Control the transaction response structure with responseFormat:

Distributor Codes

The optional distributorCode parameter accepts a 32-byte hex string (0x + 64 chars) for tracking order sources on-chain. If omitted, the quote uses your organization’s configured default distributor code.

Common Errors

Next Steps

Order Tracking

Monitor order status and view execution history.