# Endpoint Estado

## Endpoint  Estado

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

#### Headers

| Name                                                | Type   | Description        |
| --------------------------------------------------- | ------ | ------------------ |
| Content-Type<mark style="color:red;">\*</mark>      | string | `application/json` |
| Payload-Signature<mark style="color:red;">\*</mark> | string | Control signature  |

#### Request Body

| Name                                           | Type   | Description                                                                                                                       |
| ---------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------- |
| login<mark style="color:red;">\*</mark>        | string | <p>(max length: 32) </p><p>Tupay "Retiros" login key, encontrada en el merchant panel bajo Configuración -> API Access. </p>      |
| external\_id<mark style="color:red;">\*</mark> | string | <p>(max length: 100)</p><p>ID único para retiros del lado de su lado</p>                                                          |
| cashout\_id<mark style="color:red;">\*</mark>  | number | El ID del retiro para verificar el estado. Es el que generó TuPay cuando se creó el retiro.                                       |
| pass<mark style="color:red;">\*</mark>         | string | <p>(max length: 32) </p><p>Tupay "Retiros" Passphrase key ,encontrada en el merchant panel bajo Configuracion -> API Access. </p> |

{% tabs %}
{% tab title="200 Solicitud de retiro creada exitosamente." %}

```bash
{
    "cashout_status": 1,
    "cashout_status_description": "Completed"
}
{
    "cashout_status": 3,
    "cashout_status_description": "Rejected",
    "rejection_code": 808,
    "rejection_reason": "ERROR_OTHER"
}
```

{% endtab %}

{% tab title="401 Las credenciales especificadas son incorrectas." %}

```bash
{
    "code": 401,
    "message": "Invalid credentials."
}
```

{% endtab %}

{% tab title="412 Retiro no encontrado con esta identificación" %}

```bash
{
    "code": 509,
    "message": "Cashout not found with this ID"
}
```

{% endtab %}
{% endtabs %}

```json
{ 
    "login": "cashout_login", 
    "pass": "cashout_pass", 
    "cashout_id": 11954,
    "external_id":"s2kdfm39494"
}
```

## <mark style="color:blue;">Flujo de Estado de Retiro</mark>

<figure><img src="/files/QFG63487mYNu52QpCMyX" alt=""><figcaption><p>Diagrama de estado de retiros</p></figcaption></figure>

## <mark style="color:blue;">Código de Estados</mark>

<table><thead><tr><th width="94" align="center">Code</th><th width="165" align="center">Meaning</th><th>Description</th></tr></thead><tbody><tr><td align="center">0</td><td align="center"><img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9UZX6c7bK760aeWd8v%2F-M9Uq6hh3MZ301JtlBh4%2FUntitled%20Diagram.svg?alt=media&#x26;token=41bf91d1-9560-4eca-ae31-31076fa4318a" alt=""></td><td>El retiro fue aceptado por Tupay, pero todavía no fue enviado al banco. Todavía puede ser cancelado.</td></tr><tr><td align="center">1</td><td align="center"><img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9UZX6c7bK760aeWd8v%2F-M9UsDlL5PDQXBDL5CUD%2FCOMPLETED.svg?alt=media&#x26;token=92d1f295-7b3c-4ad5-b0ce-eb123df5b7ed" alt=""></td><td>El dinero llegó a la cuenta del cliente.</td></tr><tr><td align="center">2</td><td align="center"><img src="https://2476386583-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M792I7hN0PzC-Sx95CP%2F-M9UZX6c7bK760aeWd8v%2F-M9UsJ4Co_cg-RzJZT6c%2FCANCELLED.svg?alt=media&#x26;token=740308bc-8d16-47b4-b463-5dcb696664f5" alt="" data-size="original"></td><td>El retiro fue cancelado por usted</td></tr><tr><td align="center">3</td><td align="center">REJECT</td><td>El retiro fue cancelado por el banco (documento inválido, cuenta inválida, etc.)</td></tr><tr><td align="center">4</td><td align="center">DELIVERED</td><td>El retiro fue enviado al banco para ser procesado. Ahora ya no puede ser cancelado</td></tr><tr><td align="center">5</td><td align="center">ON HOLD</td><td>El retiro fue puesto en espera. Pueden pasarlo nuevamente a pending cuando sea necesario.</td></tr></tbody></table>


---

# Agent Instructions: 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:

```
GET https://docs.tupayonline.com/documentacion-de-la-api/tu-payout/endpoint-estado.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
