> ## 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.

# Save customer details

> Attach the payer's email to a pending payment so a receipt is emailed on completion.

Stores the payer's contact email (and optional name) on a **pending** payment. The moment the payment completes, Tribridge emails that address a payment receipt.

**No API key required** — call it from your own checkout UI (it runs in the customer's browser context or your backend) while collecting contact details.

## Rules

* Accepted **only while the payment is `pending`**. Once it moves on you get `409 — Payment is not accepting contact details`.
* **Idempotent** — safe to re-post on retries with the same payload.
* Email must be a valid address (max 254 chars); name is trimmed to 120 chars.

```bash Example — attach email from your checkout theme={null}
curl -X POST https://api.tribridge.xyz/payments/checkout/<PAYMENT_ID>/customer \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jane@example.com",
    "name": "Jane Doe"
  }'
```

> [!NOTE]
>
> You can also pass `customer_email` / `customer_name` directly when [creating the session](https://docs.tribridge.xyz/create-checkout-session.md) — use this endpoint when the email is collected later (e.g. on your own hosted form).


## OpenAPI

````yaml POST /payments/checkout/{id}/customer
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}/customer:
    post:
      tags:
        - Checkout Sessions
      summary: Save customer details
      description: >-
        Attaches the payer's contact email (and optional name) to a pending
        payment so a receipt is emailed the moment it completes. Public — call
        it from your own checkout UI, no API key. Accepted only while the
        payment is `pending`; idempotent (safe to re-post on retries).
      operationId: saveCheckoutCustomer
      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:
                - email
              properties:
                email:
                  type: string
                  format: email
                  maxLength: 254
                  example: jane@example.com
                  description: Valid payer email address.
                name:
                  type: string
                  maxLength: 120
                  example: Jane Doe
                  description: Payer name for the receipt.
            example:
              email: jane@example.com
              name: Jane Doe
      responses:
        '200':
          description: Contact details stored
          content:
            application/json:
              example:
                ok: true
        '400':
          description: Missing or invalid email
          content:
            application/json:
              example:
                error: A valid email address is required
        '409':
          description: Payment is no longer pending (or id is unknown)
          content:
            application/json:
              example:
                error: Payment is not accepting contact details

````

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