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

# Create Order

> Create a Route A offramp order for Sui settlement and local fiat payout.

Initialize an offramp order to move stablecoins into Sui settlement and complete local fiat payout through Route A.
The `rate` field should be the locked corridor quote returned by `GET /v1/rates/{token}/{amount}/{fiat}`.

### Header Parameters

<ParamField header="API-Key" type="string" required>
  Unique API key issued manually through Telegram.
</ParamField>

<ParamField header="Idempotency-Key" type="string" required>
  Unique UUID v4 to prevent double-processing on network retries.
</ParamField>

### Request Body

<ParamField body="amount" type="string" required>
  The stablecoin amount to convert (e.g. `"100.00"`).
</ParamField>

<ParamField body="token" type="string" required>
  The source token type. Supported: `SUI`, `USDC`, `USDT`.
</ParamField>

<ParamField body="network" type="string" required>
  Sui network environment: `sui-testnet` or `sui-mainnet`.
</ParamField>

<ParamField body="rate" type="string" required>
  The executable corridor rate returned by `/v1/rates/{token}/{amount}/{fiat}` after the 0.5% provider fee.
</ParamField>

<ParamField body="reference" type="string">
  Optional transaction reference code.
</ParamField>

<ParamField body="recipient" type="object" required>
  Target beneficiary bank account coordinates for local fiat payout.

  <ParamField body="institution" type="string" required>
    The payout institution code returned by `/v1/institutions/{currency_code}`.
  </ParamField>

  <ParamField body="currency" type="string">
    Optional local fiat code for the recipient corridor.
  </ParamField>

  <ParamField body="account_identifier" type="string" required>
    The payout account identifier or wallet handle.
  </ParamField>

  <ParamField body="account_name" type="string" required>
    The exact account name of record.
  </ParamField>

  <ParamField body="memo" type="string">
    Optional bank transfer memo text.
  </ParamField>
</ParamField>

### Response

Returns the standard response envelope with payment options.

<ResponseField name="status" type="string">
  Response state (`success`).
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable message.
</ResponseField>

<ResponseField name="data" type="object">
  Order details payload.

  <ResponseField name="order_id" type="string">
    Unique prefix ID of the order (`ord_...`).
  </ResponseField>

  <ResponseField name="status" type="string">
    Lifecycle state (`awaiting_deposit`).
  </ResponseField>

  <ResponseField name="rate_quoted" type="string">
    Rate locked for the transaction.
  </ResponseField>

  <ResponseField name="fiat_amount" type="string">
    Calculated fiat payout amount.
  </ResponseField>

  <ResponseField name="fee" type="string">
    Protocol fee in coin units.
  </ResponseField>

  <ResponseField name="pay_to" type="object">
    Payment deposit details.

    <ResponseField name="chain" type="string">
      Source chain (`sui`).
    </ResponseField>

    <ResponseField name="amount" type="string">
      Exact stablecoin amount to deposit.
    </ResponseField>

    <ResponseField name="coin_type" type="string">
      Full Sui Move coin package identifier.
    </ResponseField>

    <ResponseField name="options" type="array">
      Deposit options.

      <ResponseField name="method" type="string">
        `ptb` (Move Programmable Transaction Block) or `receive_address`.
      </ResponseField>

      <ResponseField name="label" type="string">
        Description instruction.
      </ResponseField>

      <ResponseField name="gateway_package_id" type="string">
        Sui contract package ID (only for `ptb`).
      </ResponseField>

      <ResponseField name="ptb_base64" type="string">
        Base64-serialized transaction block for wallet signing (only for `ptb`).
      </ResponseField>

      <ResponseField name="address" type="string">
        Temporary deposit address (only for `receive_address`).
      </ResponseField>

      <ResponseField name="qr_payload" type="string">
        Sui schema QR string (only for `receive_address`).
      </ResponseField>
    </ResponseField>
  </ResponseField>
</ResponseField>

***

### Example Payloads

<RequestExample>
  ```json Request theme={null}
  {
    "amount": "100.00",
    "token": "USDC",
    "network": "sui-testnet",
    "rate": "1530.50",
    "recipient": {
      "institution": "KCBKES01",
      "currency": "KES",
      "account_identifier": "0123456789",
      "account_name": "Jane Doe",
      "memo": "Invoice payment"
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Response (201 Created) theme={null}
  {
    "status": "success",
    "message": "Order initiated successfully",
    "data": {
      "order_id": "ord_8f7b2c91",
      "status": "awaiting_deposit",
      "rate_quoted": "1530.50",
      "fiat_amount": "153050.00",
      "fee": "0.50",
      "pay_to": {
        "chain": "sui",
        "amount": "100.000000",
        "coin_type": "0x5d7...::usdc::USDC",
        "options": [
          {
            "method": "ptb",
            "label": "Pay with connected Sui wallet",
            "gateway_package_id": "0xabc...",
            "ptb_base64": "gAIBACAB..."
          },
          {
            "method": "receive_address",
            "label": "Send from any exchange",
            "address": "0xdeadbeef...",
            "qr_payload": "sui:0xdeadbeef...?amount=100"
          }
        ]
      }
    }
  }
  ```
</ResponseExample>
