Quote a plan purchase and build the unsigned contract call with a relayer and lease pre-filled.
POST/v1/subscribe/prepare
Returns a price quote (valid for 120 000 ms, maxPrice == priceMicroUsdc), one unsigned transaction
(depositAndSubscribe when USDC must be paid, subscribe when credits cover the price) and the
assignment to submit it with. The purchase transaction is relayed free of charge.
The quote is stateless: quoteMac is an HMAC over its canonical JSON, and quoteId is derived
from the MAC. The same inputs inside one TTL bucket give the same id on either API host, and nothing
is stored. 503 CONTRACT_PAUSED while the CoRelayer contract is paused (it is deployed paused), and
503 SWAP_VENUE_PAUSED while the exchange venue is paused. Nothing is built in either case.
Request
Responses
- 200
- 400
- 409
- 422
- 429
- 503
Quote + unsigned transaction + assignment.
MALFORMED_REQUEST, VARIANTS_NOT_SUPPORTED, RELAYER_SIGNATURE_PRESENT, CHAIN_ID_MISMATCH, TX_VERSION_UNSUPPORTED, TX_OPTIONS_UNSUPPORTED, LEASE_MISSING, CURSOR_INVALID.
Response Headers
Request id, also the instance of a problem document and the log correlation id.
LEASE_MISMATCH, LEASE_EXPIRED, NONCE_PIN_MISMATCH, RESIGN_REQUIRED, RESIGN_SAME_NONCE, INTENT_ALREADY_EXECUTED, NOTHING_TO_CANCEL, NONCE_TOO_LOW, NONCE_IN_FLIGHT, NONCE_GAP, PRICE_ABOVE_MAX, QUEUED_BLOCK_EXISTS, DOWNGRADE_NOT_IMMEDIATE, PAYG_PRICE_ABOVE_MAX, QUOTE_EXPIRED, LIMIT_REACHED, IDEMPOTENCY_IN_PROGRESS, INTENT_ALREADY_SUBMITTED (logical idempotency key; carries the first intent), FREE_FLOW_BUSY.
REPLACEMENT_UNDERPRICED, RELAYER_UNKNOWN, RELAYER_SHARD_MISMATCH, GAS_PRICE_OUT_OF_RANGE, GAS_LIMIT_TOO_LOW, GAS_LIMIT_TOO_HIGH, GAS_OVERPROVISIONED, DATA_TOO_LARGE, SENDER_SIGNATURE_INVALID, GUARDIAN_*, INSUFFICIENT_SENDER_BALANCE, SIMULATION_FAILED, UNSUPPORTED_TX_FIELD, TIER_NOT_PURCHASABLE, DEPOSIT_BELOW_MIN, DEPOSIT_ABOVE_MAX, WEBHOOK_URL_NOT_ALLOWED, IDEMPOTENCY_KEY_REUSED.
RATE_LIMITED, GAS_BUDGET_EXCEEDED, HOURLY_BURN_EXCEEDED, TOO_MANY_IN_FLIGHT, QUOTA_EXHAUSTED (the latter without Retry-After; details.reason = CAP_REACHED_PAYG_OFF | PAYG_ESCROW_EMPTY).
Response Headers
Seconds (HTTP standard). Millisecond precision is in details.retryAfterMs of the problem body.
Requests (or RU on the relay path) allowed in the current window.
Remaining units in the current window.
Seconds until the window resets (IETF RateLimit header fields).
SWAP_VENUE_PAUSED (the exchange venue is paused), CONTRACT_PAUSED (the CoRelayer contract is paused: paused or deposits_paused; it is never reported as SWAP_VENUE_PAUSED), SWAP_BUDGET_EXHAUSTED, FREE_FLOW_UNAVAILABLE, NO_RELAYER_AVAILABLE, UPSTREAM_UNAVAILABLE (the x402 routes also return it when they cannot read their payment records), SIGNER_UNAVAILABLE, SIGNER_FENCED, SIGNER_TIMEOUT. All are answered before the commit point.
Response Headers
Seconds (HTTP standard). Millisecond precision is in details.retryAfterMs of the problem body.