Ambit

Ambit Rail API · v0.1.0-draft

Regulated AUD⇄USDT conversion desk — AUD corridor endpoint for partners.

Spec-first draft — honest status

This documentation is generated from our OpenAPI definition and published ahead of implementation. The sandbox program is opening; endpoints are not yet live in production. Docs are public — production keys are issued only after partner KYB and a signed agreement. The API adds no capability beyond our internal kernel: it can create intents, and the final money-moving step always remains behind an internal maker-checker approval on the Australian side.

Quickstart (sandbox preview)

Deterministic mock rails, self-serve keys, resettable data. Base URL: https://sandbox.api.ambitrail.com/v1

# 1 — create a customer, start hosted KYC
curl -X POST $BASE/customers \
  -H "X-Api-Key: $SANDBOX_KEY" -H "Idempotency-Key: demo-1" \
  -d '{"type":"individual","legal_name":"Ada Lovelace"}'

# 2 — lock a quote (AUD → USDT)
curl -X POST $BASE/quotes \
  -H "X-Api-Key: $SANDBOX_KEY" -H "Idempotency-Key: demo-2" \
  -d '{"customer_id":"cus_…","sell":{"currency":"AUD","minor":100000000,"decimal":"10000.00"},"buy_currency":"USDT"}'

# 3 — create the order, then simulate the AUD deposit in sandbox
#     (magic amount suffixes trigger compliance paths — see below)

# 4 — fetch the attestation receipt and verify it without auth
curl "$BASE/receipts/rcp_…/verify?content_hash=…"

Sandbox scenarios (magic amounts)

Our compliance gates are testable, not hidden. Send a sandbox deposit with the given cents suffix to rehearse each path end-to-end.

  • .00happy path — matched → posted → order releasable → receipt issued
  • .13payer name mismatch — deposit suspended_name_mismatch, manual-review queue
  • .31deposit later reversed — funding_reversed cascades to order/release locks
  • .77TR data incomplete — release approval blocked_tr_incomplete (fail-closed)

Compliance gates are first-class states

A regulated desk suspends and blocks by design. These appear in order/deposit states and in Problem.compliance_reason — documented, testable, never a surprise:

blocked_kyc_incompleteblocked_kyc_evidence_missingblocked_tr_incompletesuspended_name_mismatchtrading_frozen_by_reconfunding_reversed

Webhook events

Signed envelopes (domain.resource.event), retried with backoff, delivery log queryable.

customer.kyc.updatedva.assigneddeposit.receiveddeposit.matcheddeposit.suspendeddeposit.reversedquote.lockedquote.declinedorder.state.changedorder.releasedorder.settled

API reference

Generated from openapi.yaml at build time — the spec is the single source of truth. All mutations require an Idempotency-Key header.

customers — verify — customer identity, KYC lifecycle (Sumsub-backed)

  • post/customers

    Create a customer (individual or company)

    Creates the customer record that all money movement hangs off. KYC ownership model (own-KYC via kyc-session vs reliance on partner KYC) is pending decision Q23 — v0.1 documents the own-KYC flow only.

    Response
    Customer· errors: Problem (RFC 7807)
  • get/customers/{customerId}

    Fetch a customer

    Response
    Customer· errors: Problem (RFC 7807)
  • patch/customers/{customerId}

    Complete or correct a customer's details

    Any subset of `legal_name`, `email` and `profile` (profile fields merge). Identity details are locked once the customer's account is open (409 `profile_locked`); the legal name is locked once KYC has started (409 `legal_name_locked`).

    Request
    object
    Response
    Customer· errors: Problem (RFC 7807)
  • get/customers/{customerId}/balance

    AUD the customer holds with Ambit

    `total` is what the customer holds; `reserved_for_orders` is tied up in funded orders that have not settled; `available` is the rest (e.g. a deposit that arrived after its quote expired). Converting from the balance is not available yet.

    Response
    object· errors: Problem (RFC 7807)
  • post/customers/{customerId}/kyc-session

    Start a hosted KYC session (Sumsub-backed)

    Returns a hosted verification link / SDK token for the end customer. Outcome arrives via `customer.kyc.updated` webhook. Until KYC is GREEN with a verifiable evidence source, all money actions for this customer are fail-closed. Safe to repeat: each call issues a fresh link and invalidates the previous one. The response is not stored for idempotent replay because the link is a credential. Company customers: 422 `company_onboarding_not_supported` (KYB is done by Ambit).

    Response
    KycSession· errors: Problem (RFC 7807)

virtual-accounts — settle — named AUD collection accounts (BSB + account + PayID)

  • post/virtual-accounts

    Issue a named AUD virtual account for a KYC-passed customer

    VA is issued in the customer's verified legal name. Deposits from any other payer name will suspend (see Deposit.status). KYC must be GREEN — otherwise 403 `blocked_kyc_incomplete`. Opening an account needs the customer's `profile` (422 `customer_profile_incomplete` lists the missing fields). A VA is also opened automatically when KYC is approved; POST then returns the existing VA with 200.

    Request
    object
    Response
    VirtualAccount· errors: Problem (RFC 7807)
  • get/virtual-accounts/{vaId}

    Fetch a virtual account

    Response
    VirtualAccount· errors: Problem (RFC 7807)

quotes — quote — locked pricing with expiry

  • post/quotes

    Lock a conversion quote (AUD → USDT)

    Locked rate with `expires_at` (15 minutes). Consuming an expired quote fails. When this amount plus the customer's locked-but-unfunded quotes reaches AUD 50,000, a second person is needed: the response is 202 with a QuoteRequest (`pending_confirmation`), so splitting one large amount into smaller quotes does not avoid the check. An Ambit operator prices it, sees the rate, then locks it or declines it within 4 hours; you get `quote.locked` (with `request_id`) or `quote.declined`, or poll GET /quote-requests/{id}. Rates come from a market snapshot checked against exchange prices; when no trustworthy rate is available the request is refused with 503 `no_market_rate` (retry shortly). An amount the market cannot price automatically is refused with 422 `amount_exceeds_market_depth` (use a smaller amount or ask Ambit for a desk quote). When too many locked quotes are waiting for funds, new ones are refused with 409 `open_quote_limit_reached` until existing ones are funded or expire. While daily reconciliation is not balanced, quotes are refused with 409 `trading_frozen_by_recon` (safe to retry with the same Idempotency-Key later). A customer can hold only one open quote per AUD amount, because deposits are matched to orders by exact amount: a second one is refused with 409 `open_quote_exists` (carries the existing `quote_id`).

    Response
    Quote· errors: Problem (RFC 7807)
  • get/quotes/{quoteId}

    Fetch a quote

    Response
    Quote· errors: Problem (RFC 7807)
  • get/quote-requests/{requestId}

    Fetch a large-ticket quote request

    Response
    QuoteRequest· errors: Problem (RFC 7807)

orders — settle — quote consumption through to gated release

  • post/orders

    Create an order from a locked quote

    Binds quote → expected deposit → gated release. The USDT release step is NEVER triggered by this API: it requires internal maker-checker approval (AU-side). Travel Rule beneficiary data is required before release can be approved (fail-closed, `blocked_tr_incomplete`). The quote must be locked and unexpired. Pay exactly `sell` into the customer's VA before `pay_before`; the deposit is matched to the order automatically.

    Response
    Order· errors: Problem (RFC 7807)
  • get/orders/{orderId}

    Fetch an order

    Response
    Order· errors: Problem (RFC 7807)

deposits — settle — AUD receipts, name-matching states (read-only)

  • get/deposits

    List deposits (read-only)

    Response
    object· errors: Problem (RFC 7807)
  • get/deposits/{depositId}

    Fetch a deposit

    Response
    Deposit· errors: Problem (RFC 7807)

receipts — attest — verifiable transaction attestations

  • get/receipts/{receiptId}

    Fetch an attestation receipt

    Machine-verifiable record of a completed conversion: amounts, fee waterfall, rate, on-chain tx hash, content hash (+ signature, GA with U1.3/T46).

    Response
    Receipt· errors: Problem (RFC 7807)
  • get/receipts/{receiptId}/verifypublic · no auth

    Verify a receipt by content hash (PUBLIC — no auth)

    Response
    object· errors: Problem (RFC 7807)

webhooks — event subscriptions and delivery

  • get/webhook-endpoints

    List active webhook endpoints

    Response
    object· errors: Problem (RFC 7807)
  • post/webhook-endpoints

    Register a webhook endpoint

    The URL must be public https (private, loopback and link-local addresses are refused, redirects are not followed). At most 5 active endpoints per account. The signing secret is returned only in this response. Every delivery is a POST of a WebhookEnvelope with headers `Ambit-Event-Id`, `Ambit-Event-Type` and `Ambit-Signature: t=<unix seconds>,v1=<hex>`, where v1 is HMAC-SHA256(secret, "<t>.<raw body>"). Reject stale timestamps (e.g. > 5 minutes). Delivery is at-least-once: dedupe on the event id. A non-2xx answer is retried after 1 min, 5 min, 15 min, 1 h, 3 h, 6 h and 12 h, then the delivery is marked failed. On the demo sandbox deliveries are recorded but not sent (it makes no outbound calls); inspect them with GET /webhook-endpoints/{id}/deliveries.

    Request
    object
    Response
    WebhookEndpoint· errors: Problem (RFC 7807)
  • delete/webhook-endpoints/{endpointId}

    Disable a webhook endpoint (pending deliveries to it are dropped)

    Response
    —· errors: Problem (RFC 7807)
  • get/webhook-endpoints/{endpointId}/deliveries

    The 50 most recent deliveries to an endpoint, with payloads and attempt results

    Response
    object· errors: Problem (RFC 7807)
  • post/webhook-endpoints/{endpointId}/test

    Queue a `webhook.test` event to check your receiver and signature code

    Response
    —· errors: Problem (RFC 7807)

sandbox — simulate bank deposits and KYC outcomes (never available in production)

  • post/sandbox/deposits

    Simulate an incoming AUD bank transfer (sandbox only)

    Runs the same deposit pipeline as a real bank notification (name matching, ledger posting, automatic order matching). The AUD cents select a scenario, see `x-sandbox-scenarios`. `payer_name` defaults to the VA's account name. Not available in production.

    Request
    object
    Response
    Deposit· errors: Problem (RFC 7807)
  • post/sandbox/kyc-decisions

    Decide a customer's KYC (demo sandbox only)

    Applies a KYC result through the same handler as the verification provider's webhook, including automatic VA opening on approval. Demo only; on the staging sandbox, complete the hosted verification flow instead.

    Request
    object
    Response
    Customer· errors: Problem (RFC 7807)

agents — the same API as an MCP server, for AI agents

  • post/mcp

    The API as an MCP server for AI agents (Model Context Protocol, Streamable HTTP)

    Point an MCP client at `https://<host>/api/v1/mcp` with your API key in `X-Api-Key` or `Authorization: Bearer <key>`. Stateless JSON-RPC 2.0 (`initialize`, `tools/list`, `tools/call`, `ping`); no server-sent stream, so `GET` returns 405. Each tool is one endpoint of this API (`create_customer`, `create_quote`, `create_order`, `get_order`, `sandbox_simulate_deposit`, …) and runs through it unchanged: same key scope, validation, idempotency, rate limit and errors. API errors come back as tool results with `isError: true` and the problem body, so an agent can read and fix them. Mutating tools take an optional `idempotency_key` to make retries safe. Agents cannot release USDT: `create_order` records the order, and every release is approved by Ambit staff (maker-checker). Sandbox keys only, like the rest of `/v1`.

    Request
    object
    Response
    —· errors: Problem (RFC 7807)

Schemas

  • Problem

    RFC 7807. Compliance blocks carry a machine-readable `compliance_reason`.

    FieldTypeNotes
    type *string
    title *string
    status *integer
    detailstring
    compliance_reasonstringenum: blocked_kyc_incomplete · blocked_kyc_evidence_missing · blocked_tr_incomplete · suspended_name_mismatch · trading_frozen_by_recon · funding_reversed
  • Money

    FieldTypeNotes
    currency *stringenum: AUD · USDT
    minor *integerInteger minor units. AUD: e4. USDT: e6. Never floats.
    decimal *stringString decimal mirror for display.
  • MoneyInput

    Give `minor` (integer minor units) or `decimal` (string); if both, they must agree. AUD amounts are whole cents between AUD 1.00 and AUD 1,000,000.00. AUD `minor` is 1/10000 AUD, so it must be a multiple of 100 (AUD 100.00 = 1000000).

    FieldTypeNotes
    currency *stringenum: AUD · USDT
    minorinteger
    decimalstring
  • CustomerCreate

    FieldTypeNotes
    type *stringenum: individual · company
    legal_name *stringVA will be issued in this verified name. Letters, digits, spaces and ' ’ . , & ( ) / -. Individuals: a first and last name of letters, spaces, ' or - (each part up to 32 characters), as required by the banking partner.
    emailstring
    external_refstringPartner-side customer reference (unique per partner; 409 `external_ref_exists` on reuse).
    profileCustomerProfile
  • CustomerProfile

    Identity details the banking partner needs to open the customer's VA.

    FieldTypeNotes
    countrystringResidence, ISO 3166-1 alpha-2
    nationalitystringISO 3166-1 alpha-2
    date_of_birthstringCustomer must be 18 or older.
    addressobject
    id_documentobject
  • Customer

    FieldTypeNotes
    id *string
    kyc_status *stringenum: none · pending · approved · rejected · frozen
    kyc_evidence_sourcestringOnly webhook/api-verified evidence unlocks money actions (ADR-16).
    created_at *string
  • KycSession

    FieldTypeNotes
    session_id *string
    verification_url *string
    sdk_tokenstring
    expires_at *string
  • VirtualAccount

    FieldTypeNotes
    id *string
    customer_id *string
    account_name *stringCustomer's verified legal name — name-match enforced.
    bsb *string
    account_number *string
    payidstring
    status *stringenum: active · inactive
  • QuoteCreate

    FieldTypeNotes
    customer_id *string
    sell *Money
    buy_currency *stringenum: USDT
  • Quote

    FieldTypeNotes
    id *string
    customer_id *string
    sell *Money
    buy *Money
    rate *stringString decimal, side unfavourable to drift.
    expires_at *string
    status *stringenum: locked · unlocked · consumed · expired
  • QuoteRequest

    FieldTypeNotes
    object *stringenum: quote_request
    id *string
    customer_id *string
    sell *Money
    status *stringenum: pending_confirmation · locked · declined · expired
    quote_idstringnullSet once locked; order with this quote.
    expires_at *string
    created_at *string
  • TravelRuleBeneficiary

    Travel Rule data required before release approval (AUSTRAC, in force 2026-07-01, no de-minimis). Field-level source: research §14. Ownership model pending Q23.

    FieldTypeNotes
    full_name *string
    wallet_address *stringTRON (TRC-20) address, checksum-verified. USDT is sent on TRON.
    wallet_type *stringenum: custodial_vasp · self_hosted
    vasp_namestringRequired when wallet_type is custodial_vasp.
    countrystring
  • OrderCreate

    FieldTypeNotes
    quote_id *string
    beneficiary *TravelRuleBeneficiary
    external_refstring
  • Order

    FieldTypeNotes
    id *string
    quote_id *string
    customer_id *string
    deposit_idstring
    status *stringenum: awaiting_funds · funds_received · funds_unmatched · suspended_review · awaiting_manual_release · released · settled · suspended_name_mismatch · blocked_tr_incomplete · funding_reversed · cancelled
    receipt_idstring
    sellMoney
    buyMoney
    pay_beforestringWhile awaiting_funds: the quote's expiry.
    releaseobjectnullSet once USDT has been sent.
    external_refstring
    created_at *string
  • DepositStatus

    `suspended_review`: held for manual review for a reason other than payer name.

    receivedmatchedpostedsuspended_name_mismatchsuspended_reviewreturnedreversed

  • Deposit

    FieldTypeNotes
    id *string
    va_id *string
    customer_idstring
    amount *Money
    payer_name *string
    name_matchstringenum: pending · matched · mismatch
    status *DepositStatus
    received_at *string
  • Receipt

    FieldTypeNotes
    id *string
    order_id *string
    initial_amount *Money
    feesobject[]
    final_amount *Money
    rate *string
    destination_tx_hashstring
    content_hash *stringHash over canonical receipt JSON; verify via GET /receipts/{id}/verify.
    signaturestringDetached signature — GA with U1.3/T46.
    pdf_urlstring
    issued_at *string
  • WebhookEventType

    customer.kyc.updatedva.assigneddeposit.receiveddeposit.matcheddeposit.suspendeddeposit.reversedquote.lockedquote.declinedorder.state.changedorder.releasedorder.settled

  • WebhookEndpoint

    FieldTypeNotes
    id *string
    url *string
    events *WebhookEventType[]
    status *stringenum: active · disabled
    secretstringReturned once at creation; HMAC-SHA256 event signing.
  • WebhookEnvelope

    Delivery envelope for all events. Signed; retried with backoff; delivery log queryable.

    FieldTypeNotes
    id *string
    type *WebhookEventType
    created_at *string
    data *object

Ambit is operated by Legger Pty Ltd (Australia), a registered digital currency exchange provider with AUSTRAC. Capability status is always labelled honestly — live, in build, or spec-first. See legal · company · contact. Machine entrypoints: /llms.txt · /developers/openapi.yaml