> For the complete documentation index, see [llms.txt](https://docs.tupayonline.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tupayonline.com/documentacion-de-la-api/tu-payplus/tu-verify/endpoint.md).

# Endpoint

KYC REQUEST

<mark style="color:green;">`POST`</mark> `https://api-stg.tupayonline.com/v1/kyc`

Este punto final le permite validar la información KYC de sus clientes.

#### Headers

<table><thead><tr><th width="209">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>Content-Type</td><td>string</td><td><code>application/json</code></td></tr><tr><td>X-Date<mark style="color:red;">*</mark></td><td>string</td><td>Fecha según el estándar ISO8601 formato: <br><code>yyyy-MM-dd'T'HH:mm:ssZ</code></td></tr><tr><td>X-Login<mark style="color:red;">*</mark></td><td>string</td><td>X-Login API Key del Comercio</td></tr><tr><td>Authorization</td><td>string</td><td>Hash de control de autorización </td></tr><tr><td>X-Idempotency-Key</td><td>string</td><td> Idempotency key única</td></tr></tbody></table>

Request body

<table><thead><tr><th width="174">Name</th><th width="90">Type</th><th>Description</th></tr></thead><tbody><tr><td>country<mark style="color:red;">*</mark></td><td>string</td><td><p><strong>(PE)</strong></p><p>País por defecto PE</p></td></tr><tr><td>document_type<mark style="color:red;">*</mark></td><td>string</td><td><p>(max length: 10)</p><p>Tipo de documento especificado</p></td></tr><tr><td>document<mark style="color:red;">*</mark></td><td>string</td><td><p>(max length: 11)</p><p>Documento de identidad del usuario</p></td></tr></tbody></table>

{% tabs %}
{% tab title="200: Ok Success" %}

```json
{
    "user": {
        "name": "ONLINEPRO S.A.C.",
        "document": "20607546941"
    },
    "errors": []
}
```

{% endtab %}

{% tab title="200: Error" %}

```json
{
    "user": {
        "document": "34sa"
    },
    "errors": [
        {
            "field": "document",
            "message": "Invalid document"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}

#### Nota

Para utilizar esta API (tanto en entornos de ensayo como de producción), póngase en contacto con nosotros a través de <integration@tupaypagos.com> o con su gestor de cuenta responsable, con información sobre su comerciante, para que podamos activar esta función para su cuenta, ya que viene desactivada por defecto.

Hasta que no haya una confirmación de nuestro equipo de integración, no podrá utilizar esta API y recibirá un error.
{% endhint %}

## <mark style="color:blue;">Solicitud de Ejemplo</mark>

```json
{
    "country": "PE",
    "document": "20607546941",
    "document_type": "RUC"
}
```

{% tabs %}
{% tab title="cUrl" %}

```powershell
curl --location 'https://api.stg-tupayonline.com/v1/kyc' \
--header 'X-Date: {{X-Date}}' \
--header 'X-Login: {{X-Login}}' \
--header 'Authorization: {{Authorization}}' \
--header 'Content-Type: application/json' \
--header 'Cookie: GCLB=CKXsisOwpuHToAEQAw' \
--data '{
    "country": "PE",
    "document": "20607546941",
    "document_type": "RUC"
}'
```

{% endtab %}

{% tab title="C#" %}

```csharp
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.tupayonline.com/v1/kyc");
request.Headers.Add("X-Date", "{{X-Date}}");
request.Headers.Add("X-Login", "{{X-Login}}");
request.Headers.Add("Authorization", "{{Authorization}}");
request.Headers.Add("Cookie", "GCLB=CKXsisOwpuHToAEQAw");
var content = new StringContent("{\n    \"country\": \"PE\",\n    \"document\": \"20607546941\",\n    \"document_type\": \"RUC\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
```

{% endtab %}
{% endtabs %}

## <mark style="color:blue;">Respuesta de Ejemplo</mark>

```json
{
    "user": {
        "name": "ONLINEPRO S.A.C.",
        "document": "20607546941"
    },
    "errors": []
}
```

## <mark style="color:green;">**Códigos de Errores**</mark>

Agrupamos los códigos de error en diferentes categorías para un mejor entendimiento.

* `1xx` - Errores de encabezado
* `2xx` - Error en la llamada o de configuración del comercio
* `3xx` - Errores del usuario
* `4xx` - Errores en la creación del depósito
* `5xx` - Otros errores
* `7xx` -  Errores internos

<table><thead><tr><th width="116">Codigo</th><th width="99">Http</th><th width="237">Tipo</th><th>Mensaje</th></tr></thead><tbody><tr><td>300</td><td>400</td><td>INVALID_DOCUMENT</td><td>Invalid document number</td></tr><tr><td>306</td><td>400</td><td>INVALID_PIX_KEY</td><td>Invalid Pix Key</td></tr><tr><td>307</td><td>400</td><td>COUNTRY_NOT_AVAILABLE</td><td>Country not available</td></tr><tr><td>407</td><td>400</td><td>OTHER</td><td>Other</td></tr><tr><td>500</td><td>500</td><td>INTERNAL_SERVER_ERROR</td><td>Oh no! Something has gone wrong. Please contact a system administrator.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.tupayonline.com/documentacion-de-la-api/tu-payplus/tu-verify/endpoint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
