# Fetch status definitions for Invoice and payout

<mark style="color:green;">`POST`</mark> `https://app.thedex.cloud/api/v1/info/statuses`

**Invoice statuses:**&#x20;

<table data-header-hidden><thead><tr><th width="84"></th><th width="185"></th><th width="141"></th><th></th></tr></thead><tbody><tr><td><strong>id</strong></td><td><strong>name</strong></td><td><strong>is final status</strong></td><td><strong>description</strong></td></tr><tr><td>0, 6</td><td><code>Waiting</code></td><td>false</td><td>Initial status. Waiting for money transfer.</td></tr><tr><td>1</td><td><code>Pending confirm</code></td><td>false</td><td>Invoice accepted payment, waiting for transaction confirmation in blockchain network.</td></tr><tr><td>2</td><td><code>Unpaid</code></td><td>true</td><td>Expired, the invoice was not paid.</td></tr><tr><td>3</td><td><code>Successful</code></td><td>true</td><td>The invoice was successfully paid.</td></tr><tr><td>4</td><td><code>Rejected</code></td><td>true</td><td>An error occurred on the pay processing invoice</td></tr><tr><td>5</td><td><code>Underpaid</code></td><td>false</td><td>Partially paid. The system will wait till the client sends the rest amount to wallet</td></tr><tr><td>7</td><td><code>Cancelled</code></td><td>true</td><td>Canceled invoice</td></tr><tr><td>8</td><td><code>Refund pending</code></td><td>false</td><td>Invoice is in process for refunding</td></tr><tr><td>9</td><td><code>Refund</code></td><td>true</td><td>Invoice was refunded</td></tr></tbody></table>

**Payout statuses:**

<table data-header-hidden><thead><tr><th width="121"></th><th width="148"></th><th width="146"></th><th></th></tr></thead><tbody><tr><td><strong>id</strong></td><td><strong>name</strong></td><td><strong>is final status</strong></td><td><strong>description</strong></td></tr><tr><td>0</td><td><code>Waiting</code></td><td>false</td><td>Initial status.</td></tr><tr><td>1</td><td><code>Successful</code></td><td>true</td><td>The payout was successfully processed.</td></tr><tr><td>2</td><td><code>Rejected</code></td><td>true</td><td>An error occurred on the pay processing payout.</td></tr><tr><td>3, 4, 5, 8</td><td><code>Processing</code></td><td>false</td><td>Processing payout.</td></tr><tr><td>6</td><td><code>Unpaid</code></td><td>true</td><td>Expired, the payout was not paid.</td></tr><tr><td>7</td><td><code>Cancelled</code></td><td>true</td><td>Canceled payout.</td></tr></tbody></table>

#### Headers

| Name                                             | Type   | Description                        |
| ------------------------------------------------ | ------ | ---------------------------------- |
| X-EX-APIKEY<mark style="color:red;">\*</mark>    | String | Your API key                       |
| X-EX-PAYLOAD<mark style="color:red;">\*</mark>   | String | Body to base64                     |
| X-EX-SIGNATURE<mark style="color:red;">\*</mark> | String | Encrypted body with the secret key |

#### Request Body (Empty JSON)

```json
{ }
```

**Request JSON attributes**

| Name | Type | Description |
| ---- | ---- | ----------- |
| -    | -    | -           |

**Response Body**

{% tabs %}
{% tab title="200 invoice and payout statuses " %}

```json
{
   "invoice":[
      {
         "id":0,
         "name":"Waiting"
      },
      {
         "id":1,
         "name":"Pending confirm"
      },
      {
         "id":2,
         "name":"Unpaid"
      },
      {
         "id":3,
         "name":"Successful"
      },
      {
         "id":4,
         "name":"Rejected"
      },
      {
         "id":5,
         "name":"Underpaid"
      },
      {
         "id":6,
         "name":"Waiting"
      },
      {
         "id":7,
         "name":"Cancelled"
      },
      {
         "id":8,
         "name":"Refund pending"
      },
      {
         "id":9,
         "name":"Refund"
      }
   ],
   "payout":[
      {
         "id":0,
         "name":"Waiting"
      },
      {
         "id":1,
         "name":"Successful"
      },
      {
         "id":2,
         "name":"Rejected"
      },
      {
         "id":3,
         "name":"Processing"
      },
      {
         "id":4,
         "name":"Processing"
      },
      {
         "id":5,
         "name":"Processing"
      },
      {
         "id":6,
         "name":"Unpaid"
      },
      {
         "id":7,
         "name":"Cancelled"
      },
      {
         "id":8,
         "name":"Processing"
      }
   ]
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

| `"invoice"`                     | `object array` | Invoice status values                                   |
| ------------------------------- | -------------- | ------------------------------------------------------- |
| `"payout"`                      | `object array` | Payout status values                                    |
| `"invoice.id", "payout.id"`     | Integer        | Usually used for response JSON attribute `"status"`     |
| `"invoice.name", "payout.name"` | String         | Usually used for response JSON attribute `"statusName"` |

**Request Curl**&#x20;

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/info/statuses' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
```

Example Curl

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/info/statuses' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: 6f1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef12345678' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
```


---

# 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.thedex.cloud/documentation/informational/fetch-status-definitions.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.
