> ## 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/crossramp_checkout — create a new Crossramp Checkout session and get a hosted payment link.

## Request body

| Field            | Type   | Required | Description                                                                                                                                                            |
| ---------------- | ------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `currency_code`  | string | Yes      | Crypto currency to receive (e.g. `USDT`, `BTC`)                                                                                                                        |
| `amount_fiat`    | number | No\*     | Fixed BRL amount the customer pays                                                                                                                                     |
| `amount_crypto`  | number | No\*     | Fixed crypto amount the customer receives                                                                                                                              |
| `webhook`        | string | No       | URL to receive status updates                                                                                                                                          |
| `return_url`     | string | No       | URL to redirect the customer after completion                                                                                                                          |
| `payer_document` | string | No       | Customer CPF or CNPJ (digits only). If provided and not on record, a client profile is created automatically — skips the identity collection step in the checkout flow |
| `payer_name`     | string | No       | Customer name (used when creating a new client profile)                                                                                                                |

> Provide either `amount_fiat` or `amount_crypto`. If both are omitted, the checkout page lets the customer enter the amount themselves.

## Response `200 OK`

Redirect the customer to this URL or embed it. The `NOX...` path segment is the transaction `end2end` ID — use it to retrieve or track the session.

<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://yourapp.com/webhooks/nox",
      "return_url": "https://yourapp.com/success",
      "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://yourapp.com/webhooks/nox",
          "return_url": "https://yourapp.com/success",
          "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://yourapp.com/webhooks/nox",
      return_url: "https://yourapp.com/success",
      payer_document: "12345678901",
    }),
  });
  const data = await response.json();
  ```
</RequestExample>

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