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

# KYB Onboarding Link

> POST /v2/naas/submerchants/onboarding_link — initiate a KYB verification flow for an enrolled sub-merchant.

Initiates a KYB (Know Your Business) verification flow via CAF for an enrolled sub-merchant. Returns an `end2end` process identifier and the CAF onboarding URL.

<Warning>
  This endpoint operates at the master merchant level. **Do not include `correlation_id` in the envelope** — pass it inside `payload` instead (see below).
</Warning>

## Payload fields

| Field            | Type          | Required | Description                                                             |
| ---------------- | ------------- | -------- | ----------------------------------------------------------------------- |
| `correlation_id` | string (UUID) | Yes      | The UUID returned by [Enroll Sub-merchant](/api-reference/naas/enroll). |
| `webhook`        | string        | No       | URL that receives a status update on every KYB state change.            |

## Response `201 Created`

| Field     | Type   | Description                                     |
| --------- | ------ | ----------------------------------------------- |
| `end2end` | string | Process identifier for the KYB flow             |
| `url`     | string | CAF onboarding URL — populated at creation time |

The `url` follows the format `https://cadastro.io/{id}`. If it is empty, use [GET /v2/naas/submerchants/onboarding\_status](/api-reference/naas/onboarding-status) to poll until it appears.

**`400`** — missing or empty `correlation_id`.

**`404`** — `correlation_id` not found or does not belong to this master merchant.

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://checkout.noxpay.io/v2/naas/submerchants/onboarding_link \
    -H "api-key: <key>" \
    -H "X-Signature: <signed-body-signature>" \
    -H "Content-Type: application/json" \
    -d '{
      "timestamp": "2026-05-25T14:30:00Z",
      "payload": {
        "correlation_id": "a1b2c3d4-e5f6-4789-abcd-000000000001",
        "webhook": "https://yourserver.com/kyb-webhook"
      }
    }'
  ```

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

  # correlation_id goes in payload, not in the envelope
  body, sig = sign_envelope({
      "correlation_id": "a1b2c3d4-e5f6-4789-abcd-000000000001",
      "webhook": "https://yourserver.com/kyb-webhook",
  })
  response = requests.post(
      "https://checkout.noxpay.io/v2/naas/submerchants/onboarding_link",
      headers={"api-key": "<key>", "X-Signature": sig, "Content-Type": "application/json"},
      data=body,
  )
  print(response.json())
  ```

  ```javascript Node.js theme={null}
  // correlation_id goes in payload, not in the envelope
  const { body, signature } = signEnvelope({
    correlation_id: "a1b2c3d4-e5f6-4789-abcd-000000000001",
    webhook: "https://yourserver.com/kyb-webhook",
  });
  const response = await fetch("https://checkout.noxpay.io/v2/naas/submerchants/onboarding_link", {
    method: "POST",
    headers: { "api-key": "<key>", "X-Signature": signature, "Content-Type": "application/json" },
    body,
  });
  const data = await response.json();
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "end2end": "NOX353CA9A97D8A4DA9A2999483077AB7C2",
    "url":     "https://cadastro.io/a1b2c3d4-e5f6-4789-abcd-000000000001"
  }
  ```

  ```json 404 theme={null}
  { "error": "correlation_id not found" }
  ```
</ResponseExample>
