# Cashout Status Endpoint

## Endpoint  Estado de Retiro

<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 "Withdrawals" login key, found in the merchant dashboard under Settings -> API Access. </p> |
| external\_id<mark style="color:red;">\*</mark> | string | <p>(max length: 100)</p><p>Unique ID for withdrawals from your side</p>                                                      |
| cashout\_id<mark style="color:red;">\*</mark>  | number | The withdrawal ID to check the status. It is the one that TuPay generated when the withdrawal was created.                   |
| pass<mark style="color:red;">\*</mark>         | string | <p>(max length: 32) </p><p>Tupay "Withdrawals" Passphrase key, found in the merchant panel under Settings -> API Access.</p> |

{% tabs %}
{% tab title="200 Withdrawal request created successfully." %}

```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 The specified credentials are incorrect." %}

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

{% endtab %}

{% tab title="412 Withdrawal not found with this ID" %}

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

{% endtab %}
{% endtabs %}

## <mark style="color:blue;">Request Example</mark>

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

## <mark style="color:blue;">Withdrawal Status Flow</mark>

<figure><img src="/files/E5J1uqmRKuWr4xsaUhr0" alt=""><figcaption></figcaption></figure>

## <mark style="color:blue;">Status Code</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>The withdrawal was accepted by Tupay, but it has not yet been sent to the bank. It can still be cancelled.</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>The money arrived in the client's account.</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>The withdrawal was canceled by you.</td></tr><tr><td align="center">3</td><td align="center"><img src="/files/qWIzr5GvSHdnxxMmayo4" alt="" data-size="original"></td><td>The withdrawal was canceled by the bank (invalid document, invalid account, etc.)</td></tr><tr><td align="center">4</td><td align="center"><img src="/files/O6JR3uLJ7jlutczQ3B8j" alt="" data-size="original"></td><td>The withdrawal was sent to the bank for processing. Now it can no longer be canceled</td></tr><tr><td align="center">5</td><td align="center"><img src="/files/WoWMeNnMzhegtCEPvnhx" alt="" data-size="original"></td><td>The withdrawal was placed on hold. They can move it back to pending when necessary.</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/english/api-documentation/cashout/cashout-status-endpoint.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.
