> ## 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/crossramp_checkout — cria uma nova sessão de Crossramp Checkout e retorna um link de pagamento hospedado.

## Corpo da requisição

| Campo            | Tipo   | Obrigatório | Descrição                                                                                                                                                                           |
| ---------------- | ------ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `currency_code`  | string | Sim         | Criptomoeda a receber (ex: `USDT`, `BTC`)                                                                                                                                           |
| `amount_fiat`    | number | Não\*       | Valor fixo em BRL que o cliente paga                                                                                                                                                |
| `amount_crypto`  | number | Não\*       | Valor fixo em cripto que o cliente recebe                                                                                                                                           |
| `webhook`        | string | Não         | URL para receber atualizações de status                                                                                                                                             |
| `return_url`     | string | Não         | URL para redirecionar o cliente após a conclusão                                                                                                                                    |
| `payer_document` | string | Não         | CPF ou CNPJ do cliente (apenas dígitos). Se fornecido e não cadastrado, um perfil de cliente é criado automaticamente — ignora a etapa de coleta de identidade no fluxo de checkout |
| `payer_name`     | string | Não         | Nome do cliente (usado ao criar um novo perfil de cliente)                                                                                                                          |

> Forneça `amount_fiat` ou `amount_crypto`. Se ambos forem omitidos, a página de checkout permite que o cliente insira o valor.

## Response `200 OK`

Redirecione o cliente para esta URL ou incorpore-a. O segmento de caminho `NOX...` é o ID `end2end` da transação — use-o para consultar ou rastrear a sessão.

<RequestExample>
  ```bash theme={null}
  curl -X POST https://checkout.noxpay.io/v2/crossramp_checkout \
    -H "api-key: <key>" \
    -H "Content-Type: application/json" \
    -d '{
      "currency_code": "USDT",
      "amount_fiat": 550.00,
      "webhook": "https://seuapp.com/webhooks/nox",
      "return_url": "https://seuapp.com/sucesso",
      "payer_document": "12345678901"
    }'
  ```

  ```python theme={null}
  import requests

  response = requests.post(
      "https://checkout.noxpay.io/v2/crossramp_checkout",
      headers={
          "api-key": "<key>",
          "Content-Type": "application/json",
      },
      json={
          "currency_code": "USDT",
          "amount_fiat": 550.00,
          "webhook": "https://seuapp.com/webhooks/nox",
          "return_url": "https://seuapp.com/sucesso",
          "payer_document": "12345678901",
      },
  )
  print(response.json())
  ```

  ```javascript theme={null}
  const response = await fetch("https://checkout.noxpay.io/v2/crossramp_checkout", {
    method: "POST",
    headers: {
      "api-key": "<key>",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      currency_code: "USDT",
      amount_fiat: 550.00,
      webhook: "https://seuapp.com/webhooks/nox",
      return_url: "https://seuapp.com/sucesso",
      payer_document: "12345678901",
    }),
  });
  const data = await response.json();
  ```
</RequestExample>

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