> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rails.wayex.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Authenticate, confirm your account, and run a direct-route or Treasury workflow.

Start with an authenticated read, then choose direct customer payment routes or the prefunded Treasury
workflow.

<Note>
  **Base URL:** `https://api.sandbox.wayex.com` All current endpoints are versioned under `/v1`.
</Note>

## Connect

<Steps>
  <Step title="Get the correct API key">
    Sign in to the intended tenant account and open **Developers → API keys**. Use a secret key
    (`sk_…`) on your server. Store each tenant account's key separately; a key never switches
    accounts.
  </Step>

  <Step title="Read an indicative rate">
    Confirm authentication with a read-only request:

    ```bash theme={null}
    curl "https://api.sandbox.wayex.com/v1/rates?source=aud&destination=usdc" \
      -H "Authorization: Bearer $WAYEX_SECRET_KEY"
    ```

    This rate is indicative. Direct routes price when funds arrive, while Treasury conversions use
    an exact expiring quote.
  </Step>

  <Step title="Choose the workflow">
    Continue with a direct customer route when every funding belongs to an onboarded customer. Use
    Treasury when your organisation prefunds its own isolated wallet and explicitly pays, converts,
    or withdraws.
  </Step>
</Steps>

## Treasury: fund and pay

Your Wayex contact must enable Treasury and its effective settings for this tenant account. Reads need
`treasury:read`; writes need `treasury:write`.

<Steps>
  <Step title="Check the account and balance">
    ```bash theme={null}
    curl https://api.sandbox.wayex.com/v1/treasury \
      -H "Authorization: Bearer $WAYEX_SECRET_KEY"
    ```

    Confirm the tenant account, enabled rails/networks, and the wallet's `available`, `reserved`, and
    `pending` amounts. The API key determines the account.
  </Step>

  <Step title="Fund the wallet">
    Fetch or create an AUD BSB/account funding instrument or stablecoin address. Send only to the
    exact instructions for this account, then wait until the net credit appears in `available`.
    See [Funding and balances](/treasury/funding-and-balances).
  </Step>

  <Step title="Create a beneficiary">
    This example creates an individual BSB/account recipient. The external reference is optional;
    Wayex generates one when you omit it.

    ```bash theme={null}
    curl -X POST https://api.sandbox.wayex.com/v1/treasury/beneficiaries \
      -H "Authorization: Bearer $WAYEX_SECRET_KEY" \
      -H "Idempotency-Key: beneficiary-transfer-aud-001" \
      -H "Content-Type: application/json" \
      -d '{
        "type": "individual",
        "destination": {
          "type": "bank_account",
          "bsb": "062000",
          "accountNumber": "12345678",
          "accountName": "Ava Williams"
        },
        "firstName": "Ava",
        "lastName": "Williams",
        "dateOfBirth": "1991-05-14",
        "address": "100 Market Street, Sydney NSW 2000"
      }'
    ```
  </Step>

  <Step title="Submit an AUD payout">
    Reuse the beneficiary ID and give the payout a new external reference and idempotency key:

    ```bash theme={null}
    curl -X POST https://api.sandbox.wayex.com/v1/treasury/payouts \
      -H "Authorization: Bearer $WAYEX_SECRET_KEY" \
      -H "Idempotency-Key: payout-submit-transfer-aud-001" \
      -H "Content-Type: application/json" \
      -d '{
        "beneficiaryId": "ben_123",
        "amount": "250.00",
        "currency": "AUD",
        "externalReference": "payout-9172",
        "purpose": "Customer withdrawal"
      }'
    ```

    When available, submit the optional single-use Sumsub share token while creating the
    beneficiary. It is required only if this tenant account's effective policy says so; payout
    requests do not carry the token.
  </Step>

  <Step title="Track settlement">
    `accepted` means the full source debit was durably reserved; it is not bank settlement. Subscribe
    to `treasury.payout.updated` and fetch `GET /v1/treasury/payouts/{id}` until the payout settles,
    fails, or returns.
  </Step>
</Steps>

## Direct route: onboard and fund

<Steps>
  <Step title="Create and verify a customer">
    Create a customer with `POST /v1/customers`, issue a hosted verification link, and wait until
    the required entitlement is `approved`.
  </Step>

  <Step title="Create a payment route">
    Create an on-ramp or off-ramp route under the customer. The response provides reusable AUD or
    stablecoin funding instructions.
  </Step>

  <Step title="Fund the route">
    When the customer funds those instructions, Wayex prices at the live rate, creates a transfer,
    converts, and delivers the destination funds. You do not create or accept a direct-route quote.
  </Step>

  <Step title="Track the transfer">
    Subscribe to transfer webhooks and fetch the transfer for its authoritative lifecycle. See
    [Payment routes](/console/payment-routes).
  </Step>
</Steps>

## Before sending funds

<Warning>
  Do not assume the sandbox URL means every instruction is simulated. Wayex may enable controlled
  live-provider testing for a tenant. Confirm the environment, limits, and exact asset/network in
  writing before funding.
</Warning>

<CardGroup cols={2}>
  <Card title="Treasury workflows" icon="wallet" href="/treasury/overview">
    Fund, pay, convert, withdraw, track, and reconcile.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/overview">
    Every endpoint explains prerequisites, balance effect, states, and safe retries.
  </Card>

  <Card title="Postman" icon="paper-plane" href="/postman">
    Run the client API collection with tenant-bound environment variables.
  </Card>

  <Card title="Errors" icon="triangle-alert" href="/errors">
    Handle stable error codes and unknown outcomes safely.
  </Card>
</CardGroup>
