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

> ## Agent Instructions
> Tribridge is a crypto payment gateway for Solana and Sui (TON is coming soon). API base URL is https://api.tribridge.xyz. The API Reference documents ONLY the public endpoint surface: checkout sessions (create/get/generate-wallet/customer/simulate/verify/cancel), the two public payment-link endpoints, health probes, and the changelog. Server-side calls that create payments authenticate with the x-api-key header using a tri_test_... key (fully simulated test mode, no real funds) or tri_live_... key (real mainnet payments) - never expose keys client-side; all other documented endpoints are public with no auth. Dashboard, admin, OTP/auth, payouts, wallets, and webhook-management endpoints are intentionally NOT part of the public docs - they are dashboard-only and must not be presented as public API. Merchant test mode is simulated, not testnet. Refunds are automatic only (underpaid/overpaid), there is no manual refund endpoint. Always verify webhook HMAC-SHA256 signatures from the X-Tribridge-Signature header before trusting payloads. If you are an AI agent: fetch https://docs.tribridge.xyz/llms-full.txt for all documentation in one file, https://docs.tribridge.xyz/openapi/openapi.json for the machine-readable OpenAPI spec, or connect to the read-only MCP server at https://docs.tribridge.xyz/mcp. Any page is available as Markdown by appending .md to its URL. Use only the documented endpoints and fields; do not invent SDK packages or endpoints.

# Generate deposit wallet

> Derive the one-time deposit address for the chain the payer chose.

Creates (or returns) the unique one-time deposit address for a checkout session on the selected chain, and links it to the payment. The hosted checkout calls this for the customer — you only need it if you're building your **own** checkout UI.

## Behavior notes

* **Idempotent** — calling it again for the same payment + chain returns the existing address (`200`).
* The payer chooses `chain` (`solana` | `sui`) and `coin_symbol` (`USDC` | `USDT`, default `USDC`).
* For **live** payments the address is registered for chain monitoring right away (Solana via webhook, Sui via listener); **test** payments skip external calls by design.
* Expired payments are refused with `410 Payment has expired` — surface your own timer from `expires_at` instead of letting customers hit this.

> [!WARNING]
>
> **Payment-link asset lock.** A session created from a payment link is pinned to that link's chain and asset. Requesting anything else returns `409` with `"code": "ASSET_LOCKED"` and the allowed `chain` / `coin_symbol` in the payload — re-request with those values.

```json 409 — asset locked theme={null}
{
  "error": "This checkout only accepts payments on Solana.",
  "code": "ASSET_LOCKED",
  "chain": "solana",
  "coin_symbol": "USDC"
}
```


## OpenAPI

````yaml POST /payments/checkout/{id}/generate-wallet
openapi: 3.1.0
info:
  title: Tribridge API
  version: 1.0.0
  description: >-
    Public Tribridge API for accepting Solana and Sui payments. Base URL:
    `https://api.tribridge.xyz`.


    This reference covers **only the public surface**: endpoints callable
    without a dashboard session — either fully public or authenticated with a
    merchant `x-api-key`. Dashboard, admin, and account-management endpoints are
    intentionally excluded; manage those from your Tribridge dashboard.


    **Test vs live:** the mode is derived from the key you send (`tri_test_...`
    creates simulated test payments, `tri_live_...` real mainnet payments) —
    never from the request body. Minimum payment amount is $0.50. Rate limit:
    100 requests/minute per IP.
servers:
  - url: https://api.tribridge.xyz
security: []
tags:
  - name: Checkout Sessions
    description: >-
      Create payments, drive the hosted checkout, and follow the customer flow:
      deposit wallet, receipt contact, simulation, verification, cancellation.
  - name: Payment Links
    description: >-
      Read a public payment link and materialize a checkout from it — no API key
      required.
  - name: Status
    description: Service and blockchain RPC health, plus the public changelog.
paths:
  /payments/checkout/{id}/generate-wallet:
    post:
      tags:
        - Checkout Sessions
      summary: Generate deposit wallet
      description: >-
        Derives a unique one-time deposit address for the chosen chain and links
        it to the payment. Idempotent: calling it again for the same payment +
        chain returns the existing address. Payment links pin the chain and
        asset — a mismatch returns `409 ASSET_LOCKED`.
      operationId: generateCheckoutWallet
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          example: b3f1c2a0-1d4e-4f2a-9c8b-2e7a6f5d4c3b
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - chain
              properties:
                chain:
                  type: string
                  enum:
                    - solana
                    - sui
                  example: solana
                  description: Settlement chain for this payment.
                coin_symbol:
                  type: string
                  enum:
                    - USDC
                    - USDT
                  default: USDC
                  description: Stablecoin the customer will pay with.
            example:
              chain: solana
              coin_symbol: USDC
      responses:
        '200':
          description: Deposit address (existing one if already generated)
          content:
            application/json:
              example:
                address: 8xKd3Fj9sLm2QpR7tVw5YbN1cH4gZ6aX0uE2iO3nPqS
                chain: solana
                coin_symbol: USDC
        '400':
          description: Invalid chain or unsupported coin
          content:
            application/json:
              examples:
                badChain:
                  value:
                    error: Invalid chain. Must be "solana" or "sui"
                badCoin:
                  value:
                    error: coin_symbol must be one of USDC, USDT
        '404':
          description: Unknown payment id
          content:
            application/json:
              example:
                error: Payment not found
        '409':
          description: >-
            Payment-link asset lock — chain or coin differs from the link's
            pinned asset
          content:
            application/json:
              example:
                error: This checkout only accepts payments on Solana.
                code: ASSET_LOCKED
                chain: solana
                coin_symbol: USDC
        '410':
          description: Payment expired
          content:
            application/json:
              example:
                error: Payment has expired

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.