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

# Create Checkout

> POST /v2/naas/crossramp_checkout — create a checkout link for a sub-merchant.

Creates a crypto-to-BRL checkout link scoped to the sub-merchant identified by `correlation_id`. A split process is automatically created to transfer the configured portion to the master merchant once the checkout completes.

## Payload fields

| Field            | Type   | Required | Description                                             |
| ---------------- | ------ | -------- | ------------------------------------------------------- |
| `currency_code`  | string | Yes      | Crypto asset to receive (e.g. `USDT_ETH`, `BTC`)        |
| `amount_fiat`    | number | No\*     | Fixed BRL amount the payer must send                    |
| `amount_crypto`  | number | No\*     | Fixed crypto amount (alternative to `amount_fiat`)      |
| `webhook`        | string | No       | URL that receives status updates                        |
| `return_url`     | string | No       | URL the payer is redirected to after completing payment |
| `payer_document` | string | No       | CPF or CNPJ of the payer (digits only)                  |
| `payer_name`     | string | No       | Payer name, used when creating a new client record      |

\*If neither `amount_fiat` nor `amount_crypto` is provided, the checkout is open-amount.

## Response `200 OK`

```json theme={null}
{ "link": "https://checkout.noxpay.io/e2e/NOXabc123" }
```

Redirect the sub-merchant's customer to this URL.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://checkout.noxpay.io/v2/naas/crossramp_checkout \
    -H "api-key: <key>" \
    -H "X-Signature: <signed-body-signature>" \
    -H "Content-Type: application/json" \
    -d '{
      "timestamp": "2026-05-19T14:30:00Z",
      "correlation_id": "a1b2c3d4-e5f6-4789-abcd-000000000001",
      "payload": {
        "currency_code": "USDT_ETH",
        "amount_fiat": 500.00,
        "webhook": "https://yourserver.com/webhook",
        "return_url": "https://yourserver.com/thank-you",
        "payer_document": "12345678900"
      }
    }'
  ```

  ```python Python theme={null}
  import requests

  # sign_envelope defined in NaaS Setup
  body, sig = sign_envelope({
      "currency_code": "USDT_ETH",
      "amount_fiat": 500.00,
      "webhook": "https://yourserver.com/webhook",
      "return_url": "https://yourserver.com/thank-you",
      "payer_document": "12345678900",
  }, "a1b2c3d4-e5f6-4789-abcd-000000000001")
  response = requests.post(
      "https://checkout.noxpay.io/v2/naas/crossramp_checkout",
      headers={"api-key": "<key>", "X-Signature": sig, "Content-Type": "application/json"},
      data=body,
  )
  print(response.json())
  ```

  ```javascript Node.js theme={null}
  // signEnvelope defined in NaaS Setup
  const { body, signature } = signEnvelope({
    currency_code: "USDT_ETH",
    amount_fiat: 500.00,
    webhook: "https://yourserver.com/webhook",
    return_url: "https://yourserver.com/thank-you",
    payer_document: "12345678900",
  }, "a1b2c3d4-e5f6-4789-abcd-000000000001");
  const response = await fetch("https://checkout.noxpay.io/v2/naas/crossramp_checkout", {
    method: "POST",
    headers: { "api-key": "<key>", "X-Signature": signature, "Content-Type": "application/json" },
    body,
  });
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  { "link": "https://checkout.noxpay.io/e2e/NOXabc123" }
  ```
</ResponseExample>
