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

# Criar Checkout

> POST /v2/naas/crossramp_checkout — cria um link de checkout para um sub-merchant.

Cria um link de checkout cripto→BRL vinculado ao sub-merchant identificado pelo `correlation_id`. Um processo de split é criado automaticamente para transferir a parte configurada ao merchant master assim que o checkout for concluído.

## Campos do payload

| Campo            | Tipo   | Obrigatório | Descrição                                                   |
| ---------------- | ------ | ----------- | ----------------------------------------------------------- |
| `currency_code`  | string | Sim         | Ativo cripto a receber (ex: `USDT_ETH`, `BTC`)              |
| `amount_fiat`    | number | Não\*       | Valor fixo em BRL que o pagador deve enviar                 |
| `amount_crypto`  | number | Não\*       | Valor fixo em cripto (alternativa a `amount_fiat`)          |
| `webhook`        | string | Não         | URL que recebe atualizações de status                       |
| `return_url`     | string | Não         | URL para onde o pagador é redirecionado após o pagamento    |
| `payer_document` | string | Não         | CPF ou CNPJ do pagador (apenas dígitos)                     |
| `payer_name`     | string | Não         | Nome do pagador, usado ao criar um novo cadastro de cliente |

\*Se nenhum dos dois for fornecido, o checkout aceita valor livre.

## Response `200 OK`

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

Redirecione o cliente do sub-merchant para esta URL.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://checkout.noxpay.io/v2/naas/crossramp_checkout \
    -H "api-key: <key>" \
    -H "X-Signature: <assinatura-do-corpo>" \
    -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://seuservidor.com/webhook",
        "return_url": "https://seuservidor.com/obrigado",
        "payer_document": "12345678900"
      }
    }'
  ```

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

  # sign_envelope definido em NaaS — Autenticação e Configuração
  body, sig = sign_envelope({
      "currency_code": "USDT_ETH",
      "amount_fiat": 500.00,
      "webhook": "https://seuservidor.com/webhook",
      "return_url": "https://seuservidor.com/obrigado",
      "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 definido em NaaS — Autenticação e Configuração
  const { body, signature } = signEnvelope({
    currency_code: "USDT_ETH",
    amount_fiat: 500.00,
    webhook: "https://seuservidor.com/webhook",
    return_url: "https://seuservidor.com/obrigado",
    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>
