# Merchant Payment Gateway

Introduction to Thedex and our Crypto Payment Gateway API for any enterprise

[Thedex](https://thedex.cloud) is a payment blockchain processing, founded in 2022. We currently serve merchants worldwide and support more than 50 cryptocurrencies including Bitcoin, Ethereum, Tether and others.&#x20;

Our mission is to promote the acceptance of cryptocurrencies worldwide by creating a payment and reliable infrastructure that meets the needs of both merchants and their customers: affordable, convenient and customer-focused.

With our solution every business owner can start accepting cryptocurrencies as a form of payment using our API or by using our other integration methods.

### Cryptocurrency payment API for merchants

Thedex API is designed as a simple starting point for online businesses and merchants who want to accept cryptocurrencies as a form of payment.&#x20;

Platform handles the payment flow from checkout to settlement, allowing businesses to use this innovative payment method without the deep technical knowledge and risks associated with exchange rate fluctuations. The API is therefore suitable for applications from basic projects to enterprise-level integration.

Our gateway provides full automation for accepting Bitcoin, Ethereum, Tether and other coins, unique addresses for each order, transparent real-time exchange rates for customers and a platform for merchants to track and manage their payment and payout history.

Regardless of which trading instrument you end up using, integrating Thedex crypto payment solutions will be as easy as possible.


# Currencies and networks

Here you can find supported currencies, cryptocurrencies and networks

{% hint style="info" %}
Supported cryptocurrencies and networks
{% endhint %}

| Currency and network code       | Description               |
| ------------------------------- | ------------------------- |
| **Bitcoin Network**             |                           |
| BTC\_BITCOIN                    | Bitcoin - BTC             |
| **Ethereum Network**            |                           |
| ETH\_ETHEREUM                   | Ether - ETH               |
| USDT\_ETHEREUM                  | Ethereum Tether - USDT    |
| USDC\_ETHEREUM                  | Ethereum USD Coin - USDC  |
| DAI\_ETHEREUM                   | Ethereum Dai Stable - DAI |
| **Litecoin Network**            |                           |
| LTC\_LITECOIN                   | Litecoin - LTC            |
| **Tron Network**                |                           |
| TRX\_TRON                       | Tron - TRX                |
| USDT\_TRON                      | Tron Tether - USDT        |
| **Bitcoin Cash Network**        |                           |
| BCH\_BITCOINCASH                | Bitcoin Cash - BCH        |
| **Ripple Network**              |                           |
| XRP\_RIPPLE                     | Ripple - XRP              |
| **The Open Network**            |                           |
| TON\_TON                        | Toncoin - TON             |
| USDT\_TON                       | Jetton Tether - USDT      |
| **Doge Network**                |                           |
| DOGE\_DOGECOIN                  | Dogecoin - DOGE           |
| **Polygon Network**             |                           |
| POL\_POLYGON                    | Polygon - POL             |
| USDT\_POLYGON                   | Polygon Tether - USDT     |
| USDC\_POLYGON                   | Polygon USD Coin - USDC   |
| **Arbitrum Network**            |                           |
| ARB\_ARBITRUM                   | Arbitrum - ARB            |
| ETH\_ARBITRUM                   | Arbitrum Ether - ETH      |
| USDT\_ARBITRUM                  | Arbitrum Tether - USDT    |
| USDC\_ARBITRUM                  | Arbitrum USD Coin - USDC  |
| **Optimism Network**            |                           |
| OP\_OPTIMISM                    | Optimism Token - OP       |
| ETH\_OPTIMISM                   | Optimism Ether - ETH      |
| USDT\_OPTIMISM                  | Optimism Tether - USDT    |
| USDC\_OPTIMISM                  | Optimism USD Coin - USDC  |
| **Binance Smart Chain Network** |                           |
| BNB\_BSC                        | BSC Binance Coin - BNB    |
| USDT\_BSC                       | BSC Tether - USDT         |
| **Solana Network**              |                           |
| SOL\_SOLANA                     | Solana - SOL              |
| USDT\_SOLANA                    | Solana Tether - USDT      |
| **Base Network**                |                           |
| ETH\_BASE                       | Base Ether - ETH          |
| USDC\_BASE                      | Base USD Coin - USDC      |
| DAI\_BASE                       | Base Dai Stable - DAI     |

> *\** Other tokens and networks can be added by request.

{% hint style="info" %}
Supported fiat currencies
{% endhint %}

| Currency code | Description         |
| ------------- | ------------------- |
| ARS           | Argentine Peso      |
| AZN           | Azerbaijani Manat   |
| AUD           | Australian Dollar   |
| BRL           | Brazilian Real      |
| CLP           | Chilean Peso        |
| CAD           | Canadian Dollar     |
| COP           | Colombian Peso      |
| CHF           | Swiss Franc         |
| CZK           | Czech Koruna        |
| DKK           | Danish Krone        |
| EUR           | Euro                |
| GBP           | Great British Pound |
| HUF           | Hungarian Forint    |
| INR           | Indian Rupee        |
| KRW           | South Korean Won    |
| KZT           | Kazakh Tenge        |
| MXN           | Mexican Peso        |
| NOK           | Norwegian Krone     |
| NZD           | New Zealand Dollar  |
| PLN           | Polish Zloty        |
| SEK           | Swedish Krona       |
| TRY           | Turkish Lira        |
| UAH           | Ukrainian Hryvnia   |
| USD           | US Dollar           |
| ZAR           | South African Rand  |

> *\** These currencies are not supported for payments and can only be used for invoicing.


# Confirmations and limits

Here you can find confirmations for crypto deposits and min/max limits.

{% hint style="info" %}
Please note, limits for min deposits and min payouts must be obtained via API, because they may vary dynamically.
{% endhint %}

<table><thead><tr><th width="267">Currency</th><th>Confirms</th><th>Min Deposit</th><th>Min Payout</th><th>Notes</th></tr></thead><tbody><tr><td><strong>Bitcoin Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   BTC_BITCOIN</td><td>1</td><td>0.00003750</td><td>0.0001</td><td><a href="https://blockchair.com">Explorer</a></td></tr><tr><td><strong>Ethereum Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   ETH_ETHEREUM</td><td>4</td><td>0.001</td><td>0.0015</td><td><a href="https://etherscan.io">Explorer</a></td></tr><tr><td>   USDT_ETHEREUM</td><td>4</td><td>3</td><td>10</td><td><a href="https://etherscan.io">Explorer</a></td></tr><tr><td>   USDC_ETHEREUM</td><td>4</td><td>3</td><td>10</td><td><a href="https://etherscan.io">Explorer</a></td></tr><tr><td>   DAI_ETHEREUM</td><td>4</td><td>3</td><td>10</td><td><a href="https://etherscan.io">Explorer</a></td></tr><tr><td><strong>Litecoin Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   LTC_LITECOIN</td><td>3</td><td>0.035</td><td>0.075</td><td><a href="https://blockchair.com">Explorer</a></td></tr><tr><td><strong>Tron Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   TRX_TRON</td><td>20</td><td>2</td><td>10</td><td><a href="https://tronscan.org/">Explorer</a></td></tr><tr><td>   USDT_TRON</td><td>20</td><td>5</td><td>10</td><td><a href="https://tronscan.org/">Explorer</a></td></tr><tr><td><strong>Bitcoin Cash Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   BCH_BITCOINCASH</td><td>2</td><td>0.01</td><td>0.02</td><td><a href="https://blockchair.com">Explorer</a></td></tr><tr><td><strong>Ripple Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   XRP_RIPPLE</td><td>1</td><td>1</td><td>3</td><td><a href="https://xrpscan.com">Explorer</a></td></tr><tr><td><strong>The Open Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   TON_TON</td><td>1</td><td>0.5</td><td>0.75</td><td><a href="https://tonviewer.com">Explorer</a></td></tr><tr><td>   USDT_TON</td><td>1</td><td>3</td><td>5</td><td><a href="https://tonviewer.com">Explorer</a></td></tr><tr><td><strong>Doge Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   DOGE_DOGECOIN</td><td>10</td><td>1</td><td>10</td><td><a href="https://dogechain.info">Explorer</a></td></tr><tr><td><strong>Polygon Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   POL_POLYGON</td><td>4</td><td>1</td><td>2</td><td><a href="https://polygonscan.com">Explorer</a></td></tr><tr><td>   USDT_POLYGON</td><td>4</td><td>3</td><td>5</td><td><a href="https://polygonscan.com">Explorer</a></td></tr><tr><td>   USDC_POLYGON</td><td>4</td><td>3</td><td>5</td><td><a href="https://polygonscan.com">Explorer</a></td></tr><tr><td><strong>Arbitrum Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   ARB_ARBITRUM</td><td>4</td><td>5</td><td>10</td><td><a href="https://arbiscan.io">Explorer</a></td></tr><tr><td>   ETH_ARBITRUM</td><td>4</td><td>0.0005</td><td>0.00075</td><td><a href="https://arbiscan.io">Explorer</a></td></tr><tr><td>   USDT_ARBITRUM</td><td>4</td><td>3</td><td>5</td><td><a href="https://arbiscan.io">Explorer</a></td></tr><tr><td>   USDC_ARBITRUM</td><td>4</td><td>3</td><td>5</td><td><a href="https://arbiscan.io">Explorer</a></td></tr><tr><td><strong>Optimism Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   OP_OPTIMISM</td><td>4</td><td>1</td><td>3</td><td><a href="https://optimistic.etherscan.io">Explorer</a></td></tr><tr><td>   ETH_OPTIMISM</td><td>4</td><td>0.0005</td><td>0.00075</td><td><a href="https://optimistic.etherscan.io">Explorer</a></td></tr><tr><td>   USDT_OPTIMISM</td><td>4</td><td>3</td><td>5</td><td><a href="https://optimistic.etherscan.io">Explorer</a></td></tr><tr><td>   USDC_OPTIMISM</td><td>4</td><td>3</td><td>5</td><td><a href="https://optimistic.etherscan.io">Explorer</a></td></tr><tr><td><strong>BSC Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   BNB_BSC</td><td>4</td><td>0.003</td><td>0.005</td><td><a href="https://bscscan.com">Explorer</a></td></tr><tr><td>   USDT_BSC</td><td>4</td><td>3</td><td>5</td><td><a href="https://bscscan.com">Explorer</a></td></tr><tr><td>   USDC_BSC</td><td>4</td><td>3</td><td>5</td><td><a href="https://bscscan.com">Explorer</a></td></tr><tr><td><strong>Solana Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   SOL_SOLANA</td><td>12</td><td>0.015</td><td>0.03</td><td><a href="https://solscan.io">Explorer</a></td></tr><tr><td>   USDT_SOLANA</td><td>12</td><td>3</td><td>5</td><td><a href="https://solscan.io">Explorer</a></td></tr><tr><td>   USDC_SOLANA</td><td>12</td><td>3</td><td>5</td><td><a href="https://solscan.io">Explorer</a></td></tr><tr><td><strong>Base Network</strong></td><td></td><td></td><td></td><td></td></tr><tr><td>   ETH_BASE</td><td>4</td><td>0.001</td><td>0.0015</td><td><a href="https://basescan.org">Explorer</a></td></tr><tr><td>   USDC_BASE</td><td>4</td><td>3</td><td>5</td><td><a href="https://basescan.org">Explorer</a></td></tr></tbody></table>


# Callback

## Callback types

Two callbacks types are available: **Invoice** and **Payout**

* [**Invoice callback**](/introduction/callback/invoice)
* **Payout callback**

Callbacks are sent to your server to notify you of specific events, such as invoice  or payout status updates.

## Configuration

To enable callback functionality, the URL must be defined in one of the following ways:

* **User-level configuration**:\
  Set the `callbackUrl` field in your user profile in the Thedex merchant settings.
  1. Sign in at [app.thedex.cloud](https://app.thedex.cloud).
  2. After logging in, navigate to the **"Merchants"** section.
  3. Click the **"Edit Settings"** button.
  4. Fill in **Callback Url**
  5. Complete form.
* **Per-request configuration**:\
  If not set at the merchant level, you can specify `callbackUrl` directly in your **API request** when creating an invoice.

> If both options are used, the values passed in the API request will override the user defaults

## Verifying Incoming Webhooks

To ensure the authenticity of incoming webhook (callback) requests, you must verify the headers included with each callback:

* `X-EX-APIKEY`: The API key of the **merchant**
* `X-EX-PAYLOAD`: Base64-encoded JSON body of the callback
* `X-EX-SIGNATURE`: HMAC SHA-512 signature generated from the payload using your **secret key**

These headers are used to confirm that the callback was generated by Thedex and that the payload has not been altered.

### Verification Steps

1. **Validate the API key**:\
   Compare the `X-EX-APIKEY` header with your own API key stored in your system.\
   This ensures the callback is intended for your merchant account.
2. **Reconstruct the signature**:
   * Take the raw JSON body of the request.
   * Encode it in Base64.
   * Use your **secret key** to generate an HMAC SHA-512 signature from the Base64 payload.
3. **Compare the signatures**:
   * Match your generated signature with the `X-EX-SIGNATURE` header.
   * If they match — the callback is valid.
   * If they don't match — reject the request as potentially compromised.

You can follow [this method](/documentation/api-overview#how-to-generate-the-signature) to construct and verify the signature.


# Invoice

#### 📡**Invoice Callbacks (Webhooks)**

These are **server-side callbacks** sent to the merchant's server whenever the status of **invoice** changes.

**Invoice Callback**

* Triggered when:
  * The invoice is successfully paid&#x20;
  * The invoice expires
  * The invoice is canceled
  * The invoice is rejected
  * The invoice is underpaid&#x20;
  * The invoice is paid twice
  * The invoice is paid in another currency
* The callback sends the **updated invoice data** (e.g., status, amount, currency) to the configured `callbackUrl`.

#### **Callback body example**

{% tabs %}
{% tab title="Successful invoice" %}
**Invoice callback structure notes**

* The **set and number of fields may vary** depending on the invoice type (**Full invoice** or **Quick invoice**).
* Not all fields are guaranteed to be present for every invoice type.
* Transitions to **Rejected** and **Cancelled** statuses can be performed by the support team.

```json
{
  "invoiceId": "e70f075f-e858-4cb2-9062-a20ca1fa4c92",
  "merchantId": "ABCDEFGH",
  "status": 3,
  "statusName": "Successful",
  "createDate": "2025-11-27 17:11:30.19",
  "modifiedDate": "2025-11-27 20:47:03.252",
  "expirationDate": "2025-11-27 19:11:30.014",
  "createTimestamp": 1764256290190,
  "modifiedTimestamp": 1764269223252,
  "expirationTimestamp": 1764263490014,
  "expirationDateInMilliseconds": 0,
  "purse": "0x0000000000000000000000000000000000000000",
  "currency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "amount": "0.00",
  "amountInPayCurrency": "1",
  "paidAmount": "1",
  "paidAmountFiat": "2500",
  "payUrl": "https://app.thedex.cloud/pay-invoice/e70f075f-e858-4cb2-9062-a20ca1fa4c92",
  "creationWay": "API",
  "merchantCommission": "0",
  "merchantBalance": "0.9995",
  "uniqueUserId": "SQCGMWJZ",
  "depositBlockchainFee": "0.0005",
  "rate": "2500.00",
  "rateWithCommission": "2500.00",
  "txId": [
    "0x00000000000000000000000000000000000000000000"
  ],
  "fromAddress": [
    "0x10000000000000000000000000000000000000000000"
  ],
```

{% endtab %}

{% tab title="Unsuccessful" %}
**Unsuccessful invoices**

An **unsuccessful invoice** can be in one of the following three statuses:

* **Unpaid**
* **Rejected**
* **Cancelled**

**Unpaid**

An invoice has the **Unpaid** status when it was created but **no successful payment was made** before the expiration time.

**Rejected**

An invoice receives the **Rejected** status in the following cases:

* The invoice was **manually rejected by the support team** when required.
* The payment was made using funds with a **high risk score**, as determined by AML (Anti-Money Laundering) checks.

In such cases, the payment is not accepted and the invoice is marked as rejected.

**Cancelled**

An invoice can be moved to the **Cancelled** status **manually by the support team** when necessary (for example, due to operational or compliance reasons).

```json
{
  "invoiceId": "e70f075f-e858-4cb2-9062-a20ca1fa4c92",
  "merchantId": "ABCDEFGH",
  "status": 2,
  "statusName": "Unpaid",
  "createDate": "2025-11-27 17:11:30.19",
  "modifiedDate": "2025-11-27 20:47:03.252",
  "expirationDate": "2025-11-27 19:11:30.014",
  "createTimestamp": 1764256290190,
  "modifiedTimestamp": 1764269223252,
  "expirationTimestamp": 1764263490014,
  "expirationDateInMilliseconds": 0,
  "purse": "0x0000000000000000000000000000000000000000",
  "currency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "amount": "0.00",
  "amountInPayCurrency": "1",
  "payUrl": "https://app.thedex.cloud/pay-invoice/e70f075f-e858-4cb2-9062-a20ca1fa4c92",
  "creationWay": "API",
  "merchantCommission": "0",
  "merchantBalance": "0.9995",
  "uniqueUserId": "SQCGMWJZ",
  "depositBlockchainFee": "0.0005",
  "rate": "2500.00",
  "rateWithCommission": "2500.00",
  "txId": [],
  "fromAddress": [],
  "successUrl": "https://google.com/",
  "failureUrl": "https://google.com/",
  "merchantSiteUrl": "https://google.com/",
  "callbackUrl": "https://webhook.site/",
  "complexCommission": "0"
}
```

{% endtab %}

{% tab title="Double Paid/Another Currency" %}
The key difference between **Double Paid** and **Another Currency** invoices is defined by the `creationWay` field.

**Double Paid invoices**

A **Double Paid** invoice is created when the **successful invoice is paid more than once** in the same currency.\
In this case:

* The invoice is generated as a result of a duplicate payment.
* The **currency of the invoice is always the same as the original invoice**.
* The invoice is directly linked to the original one via `parentInvoiceId`.

**Another Currency invoices**

An **Another Currency** invoice is created when an invoice is paid **in a different currency than the original invoice currency**.\
In this case:

* The invoice is generated due to a currency mismatch during payment.
* The **invoice currency may differ from the currency of the original (parent) invoice**.
* The relationship with the original invoice is maintained via `parentInvoiceId`.

```json
{
  "invoiceId": "e70f075f-e858-4cb2-9062-a20ca1fa4c92",
  "merchantId": "ABCDEFGH",
  "status": 3,
  "statusName": "Successful",
  "createDate": "2025-11-27 17:11:30.19",
  "modifiedDate": "2025-11-27 20:47:03.252",
  "expirationDate": "2025-11-27 19:11:30.014",
  "createTimestamp": 1764256290190,
  "modifiedTimestamp": 1764269223252,
  "expirationTimestamp": 1764263490014,
  "expirationDateInMilliseconds": 0,
  "purse": "0x0000000000000000000000000000000000000000",
  "currency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "amount": "0.00",
  "amountInPayCurrency": "1",
  "paidAmount": "1",
  "paidAmountFiat": "2500",
  "payUrl": "https://app.thedex.cloud/pay-invoice/e70f075f-e858-4cb2-9062-a20ca1fa4c92",
  "creationWay": "DOUBLE_PAY/ANOTHER_CURRENCY",
  "merchantCommission": "0",
  "merchantBalance": "0.9995",
  "description": "",
  "uniqueUserId": "SQCGMWJZ",
  "depositBlockchainFee": "0.0005",
  "rate": "2500.00",
  "rateWithCommission": "2500.00",
  "txId": [
    "0x00000000000000000000000000000000000000000000"
  ],
  "fromAddress": [
    "0x10000000000000000000000000000000000000000000"
  ],
  "successUrl": "https://google.com/",
  "failureUrl": "https://google.com/",
  "merchantSiteUrl": "https://google.com/",
  "callbackUrl": "https://webhook.site/",
  "complexCommission": "0",
  "parentInvoiceId": "6dfb5dba-749e-4a4b-8416-a17b0bce73f7"
}
```

{% endtab %}
{% endtabs %}

**Notes:**

* These callbacks enable your server to automatically update the order/payment status based on real-time data from TheDex.
* Callbacks can be **manually re-sent** from the **admin panel** in case of delivery failure or testing purposes.
* For testing callback URLs, services like <https://webhook.site/> can be used.


# Payout

#### 📡 **Payout Callbacks (Webhooks)**

These are **server-side callbacks** sent to the merchant's server whenever the status of **payout** changes.

**Payout Callback**

* Triggered when:
  * A payout is created, processed, completed, or failed
* The callback sends the **current payout status** and related info to the provided `callbackUrl`.

#### **Callback body example**

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

```json
{
  "id": "9f9cf80f-be0c-4052-9c60-648c482d798c",
  "status": 1,
  "statusName": "Successful",
  "fiatAmount": "0.00",
  "fiatCurrency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "fromAddress": "0x1000000000000000000000000000000000000000",
  "address": "0x0000000000000000000000000000000000000000",
  "createDate": "2026-01-13 17:04:23.024",
  "modifiedDate": "2026-01-13 17:13:10.776",
  "transactionId": "0x0000000000000000000000000000000000000000000000000000000000000000",
  "withdrawalAmount": "0.00600000",
  "transferAmount": "0.00400000",
  "blockchainFee": "0.00200000",
  "payoutCommissionPercentage": "0",
  "isApiCalled": true,
  "creationWay": "API",
  "uniqueUserId": "SQCGMWJZ",
  "description": "",
  "merchantId": "CJGUEQV0",
  "callbackUrl": "https://webhook.site/"
}
```

{% endtab %}

{% tab title="Unpaid" %}

```json
{
  "id": "9f9cf80f-be0c-4052-9c60-648c482d798c",
  "status": 6,
  "statusName": "Unpaid",
  "fiatAmount": "0.00",
  "fiatCurrency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "address": "0x0000000000000000000000000000000000000000",
  "createDate": "2026-01-13 17:04:23.024",
  "modifiedDate": "2026-01-13 17:13:10.776",
  "withdrawalAmount": "0.00350000",
  "transferAmount": "0.00300000",
  "blockchainFee": "0.00050000",
  "payoutCommissionPercentage": "0",
  "isApiCalled": true,
  "creationWay": "API",
  "uniqueUserId": "SQCGMWJZ",
  "merchantId": "CJGUEQV0",
  "callbackUrl": "https://webhook.site/"
}
```

{% endtab %}

{% tab title="Rejected" %}

```json
{
  "id": "9f9cf80f-be0c-4052-9c60-648c482d798c",
  "status": 2,
  "statusName": "Rejected",
  "fiatAmount": "0.00",
  "fiatCurrency": "USD",
  "payCurrency": "ETH_ETHEREUM",
  "fromAddress": "0x1000000000000000000000000000000000000000",
  "address": "0x0000000000000000000000000000000000000000",
  "createDate": "2026-01-13 17:04:23.024",
  "modifiedDate": "2026-01-13 17:13:10.776",
  "transactionId": "0x62d35b226c632d448a9e195043f5184f17a9dcc94fdeccabfdafd1f2b83a602c",
  "withdrawalAmount": "0.00600000",
  "transferAmount": "0.00400000",
  "blockchainFee": "0.00200000",
  "payoutCommissionPercentage": "0",
  "isApiCalled": true,
  "creationWay": "API",
  "uniqueUserId": "SQCGMWJZ",
  "description": "",
  "merchantId": "CJGUEQV0",
  "callbackUrl": "https://webhook.site/"
}
```

{% endtab %}
{% endtabs %}

**Notes:**

* These callbacks enable your server to automatically update the order/payment status based on real-time data from TheDex.
* Callbacks can be **manually re-sent** from the **admin panel** in case of delivery failure or testing purposes.
* For testing callback URLs, services like <https://webhook.site/> can be used.


# Redirect

### 📤 **Success & Failure & Return Redirect URLs**

These are **redirect URLs** (not webhooks) that return the **user** to your website after an invoice-related action is completed.

* ✅ **Success redirect**:\
  Triggered when an invoice is **successfully paid**. The user is redirected to the configured `successUrl`.
* ❌ **Failure Redirect**:\
  Triggered when the invoice is **canceled**, **rejected**, **expired**, or if an **error** occurs. The user is redirected to the configured `failureUrl`.
* ↩️ **Return Redirect**:\
  Triggered when the invoice in a **waiting**, **pending confirm**, **unpaid**, or **underpaid** status. The user is redirected to the configured `returnUrl`.

### 🔧 Configuration

To enable redirect functionality, the URLs must be defined in one of the following ways:

* **Merchant-level configuration**:\
  Set the `successUrl` and `failureUrl` and `merchantSiteUrl` fields in your merchant profile in the Thedex merchant settings.
  1. Sign in at [app.thedex.cloud](https://app.thedex.cloud).
  2. After logging in, navigate to the **"Merchants"** section.
  3. Click the **"Edit"** button on your merchant.
  4. Fill in **Success redirect Url**, **Failure redirect Url** or **Merchant site**.
  5. Complete form.
* **Per-request configuration**:\
  If not set at the merchant level, you can specify `successUrl` and `failureUrl`, `returnUrl` directly in your **API request** when creating an invoice.

> If both options are used, the values passed in the API request will override the merchant defaults

### 🔄 **Behavior**

* **Automatic redirect (If the invoice was created via API)**:\
  The user is redirected automatically to either the success or failure URL as soon as the invoice status is updated or user click a button **"Return to website"** manually.
* **If the invoice was created via Thedex UI**:

  The user must click a button (e.g., **"Return to website"**) to initiate the redirect.

> ⚠️ **Important:** These URLs are intended for **user redirection only**. They are **not** intended for server-to-server communication or for receiving payment status updates.\
> Use [webhooks ](/introduction/callback)for backend notification and processing.

<figure><img src="/files/7GPJYQt1cwIAJUuGFlXu" alt=""><figcaption></figcaption></figure>

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

<figure><img src="/files/6XicbSFkA40Vumw47QMR" alt=""><figcaption></figcaption></figure>


# API Overview

## Get your API keys

All API requests must be authenticated using API keys. Any request without a valid API key will be rejected.

To obtain your merchant API keys:

1. Sign up at [app.thedex.cloud](https://app.thedex.cloud).
2. After logging in, navigate to the **"Merchants"** section.
3. Click the **"Add"** button and complete the form.
4. Upon submission, you will receive an **API key** and a **secret key**.

These keys are required for all authenticated API requests.

## Required API Headers

Each authenticated request must include the following headers:

* `X-EX-APIKEY`: Your API key
* `X-EX-PAYLOAD`: Base64-encoded JSON request body
* `X-EX-SIGNATURE`: HMAC SHA-512 signature generated using your secret key

## How to Generate the Signature

1. Construct your JSON request body with the required parameters for the endpoint you’re calling.
2. Encode the JSON body to a Base64 string — this becomes your `X-EX-PAYLOAD`.
3. Generate an HMAC SHA-512 signature of the Base64-encoded body using your **secret key** — this becomes your `X-EX-SIGNATURE`.

> For implementation examples and detailed technical guides on sending API requests, creating signatures, and using our project in different programming languages, please refer to the link below.\
> \
> **API Examples Repository** on Bitbucket:

{% embed url="<https://bitbucket.org/theonedex/api-quickstart/src/master/>" %}


# Invoices

**Two invoice types available: QUICK and FULL**

1. **Quick - create invoice in cryptocurrency**\
   \
   [Create quick invoice](/documentation/invoices/deprecated/create-quick-invoice)<br>
2. **Full - create invoice in fiat currency (your client will select crypto currency on next step)**\
   [<br>](/documentation/invoices/create-an-invoice)[Create full invoice](/documentation/invoices/create-an-invoice)


# Create full invoice

Creates a full invoice without indicating which cryptocurrency to pay with

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

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

{% code overflow="wrap" %}

```json
{
    "amount": "Number",
    "currency": "String",
    "merchantId": "String",
    "orderId": "String",        // optional 
    "email": "String",          // optional 
    "clientId": "String",       // optional 
    "title": "String",          // optional 
    "description": "String",    // optional 
    "recalculation": "boolean", // optional 
    "successUrl": "String",     // optional 
    "failureUrl": "String",     // optional 
    "callbackUrl": "String",    // optional 
    "returnUrl": "String",      // optional 
    "unfixAmount": "boolean"    // optional 
}
```

{% endcode %}

**Request JSON attributes**

<table><thead><tr><th>Name</th><th width="205">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount<mark style="color:red;">*</mark></td><td>BigDecimal</td><td>To check minimal limit amount, use:<a href="/pages/PJqw3cDpwdXe1xm1fLfv"><br><code>api/v1/info/invoice/limit/fiat</code></a></td></tr><tr><td>currency<mark style="color:red;">*</mark></td><td>String</td><td>Reach out all available fiat currencies by endpoint: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td>merchantId<mark style="color:red;">*</mark></td><td>String</td><td>Merchant ID <br>You can find it on page 'Merchants' in your account</td></tr><tr><td>orderId</td><td>String</td><td>Order ID in your system</td></tr><tr><td>email</td><td>String</td><td>email of your client</td></tr><tr><td>clientId</td><td>String</td><td>ID of your client</td></tr><tr><td>title</td><td>String</td><td><code>max size = 50</code></td></tr><tr><td>description</td><td>String</td><td><code>max size = 300</code></td></tr><tr><td>recalculation</td><td>boolean</td><td><p><strong>Default = false</strong> </p><p></p><p>If <code>recalculation = false</code>,  the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will not be</strong> recalculated in the case of </p><p><code>Successful</code>status. If client send amount that less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p><br>If <code>recalculation = true</code>, the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will  be recalculated</strong> in the case of </p><p><code>Successful</code>status. If the client send amount that is less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p></p><p><br>Reach out all available invoice statuses by endpoint:</p><p><a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></p></td></tr><tr><td>successUrl</td><td>String</td><td>Custom successUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>failureUrl</td><td>String</td><td>Custom failureUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>callbackUrl</td><td>String</td><td>Custom callbackUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>returnUrl</td><td>String</td><td>Custom returnUrl for an invoice, that can be differ from merchant settings. Rewrites merchantSiteUrl for invoice</td></tr><tr><td>unfixAmount</td><td>boolean</td><td><p><strong>Default = false</strong> </p><p></p><p>If <code>unfixAmount = true</code>, the amount of the invoice will be unfixed, so the client can send any amount, and 'amountInPayCurrency'  will be recalculated.<br>In this case, only one transaction is allowed to pay.</p><p></p><p>If <code>unfixAmount = true</code>, the flow of processing invoice will be as <code>recalculation</code> parameter setting</p></td></tr></tbody></table>

**Response body**

{% tabs %}
{% tab title="200 created invoice" %}

```json
{
   "invoiceId": "String",
   "merchantId": "String",
   "clientId": "String",
   "orderId": "String",
   "createDate": "String",
   "modifiedDate": "String",
   "createTimestamp": "Long",
   "modifiedTimestamp": "Long",
   "expirationTimestamp": "Long",
   "amount": "String",
   "currency": "String",
   "status": "Integer",
   "payUrl": "String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00",
    "message": "currency: following value doesn't valid. "
}
```

{% endtab %}

{% tab title="422" %}
Specific field validation error. ([Minimal limits](/introduction/confirmations-and-limits), etc)

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Minimal limit amount doesn't exceed"
}
```

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Requested payCurrency is not active"
}
```

{% endtab %}

{% tab title="403" %}
In case of not existing parameters, incorrect headers, etc..

```json
Empty response
```

{% endtab %}

{% tab title="401" %}
When `merchantId` in request not equal to API key merchant id

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized: The requested merchant is not allowed to work with this API key"
}
```

{% endtab %}

{% tab title="500" %}
Blockchain or server side problem.

```json
{
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Cannot create invoice"
}
```

{% endtab %}
{% endtabs %}

\
**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="269"></th><th width="130.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"invoiceId"</code></td><td><code>String</code></td><td>Invoice id</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant Id</td></tr><tr><td><code>"orderId"</code></td><td><code>String</code></td><td>Order id</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Client id</td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"createTimestamp"</code></td><td><code>Long</code></td><td>Creation date in milliseconds</td></tr><tr><td><code>"modifiedTimestamp"</code></td><td><code>Long</code></td><td>Modified date in milliseconds</td></tr><tr><td><code>"expirationTimestamp"</code></td><td><code>Long</code></td><td>Expiration date in milliseconds</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Pay Url</td></tr><tr><td><code>"amount"</code></td><td><code>"String"</code></td><td>Amount to Pay in Fiat currency</td></tr></tbody></table>

**Curl request**

```powershell
curl --location --request POST'https://app.thedex.cloud/api/v1/invoices/create' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "amount": "<number>",
  "clientId": "<string>",
  "currency": "<string>",
  "description": "<string>",
  "email": "<string>",
  "merchantId": "<string>",
  "orderId": "<string>",
  "recalculation": "<boolean>",
  "unfixAmount": "<boolean>",
  "title": "<string>",
  "successUrl": "<string>",
  "failureUrl": "<string>",
  "callbackUrl": "<string>",
  "returnUrl": "<string>"
}'
```

Example Curl

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices/create' \
--header 'X-EX-APIKEY: abc123apikeyxyz' \
--header 'X-EX-PAYLOAD: eyJhbW91bnQiOjEwLCJjdXJyZW5jeSI6IlVTRCJ9' \
--header 'X-EX-SIGNATURE: a5f67a9b8e0cdfe0df8be6e5f0a83cb5f2d3a9341d0fce6...' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
    "amount": 10,
    "currency": "USD",
    "merchantId": "YDRE5IDM",
    "orderId": "1",
    "email": "test@example.com",
    "clientId": "1",
    "title": "Test_Title",
    "description": "Test description",
    "recalculation": "false", 
    "successUrl": "https://www.google.com/200",
    "failureUrl": "https://www.google.com/404", 
    "callbackUrl": "https://www.google.com",
    "returnUrl": "https://www.google.com/return", 
    "unfixAmount": "false" 
}'

```


# Define full invoice crypto-currency

Defines cryptocurrency for the created full invoice

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

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

```json
{
    "invoiceId": "String",
    "payCurrency": "String"
}
```

Request **JSON attributes**

| Name                                          | Type   | Description                                                                                                                            |
| --------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| invoiceId<mark style="color:red;">\*</mark>   | String | ID of Invoice for defining                                                                                                             |
| payCurrency<mark style="color:red;">\*</mark> | String | `required` reach out all accessed values by link: [`/api/v1/info/currencies`](/documentation/informational/fetch-currency-definitions) |

**Response body**

{% tabs %}
{% tab title="200 defined crypto-currency invoice" %}

```json
{
   "invoiceId": "String",
   "purse": "String",
   "amount": "String",
   "currency": "String",
   "amountInPayCurrency": "String",
   "payCurrency": "String",
   "blockchainFee": "String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00",
    "message": "payCurrency: following value doesn't valid. "
}
```

{% endtab %}

{% tab title="422" %}
Specific field validation error. ([Minimal limits](/introduction/confirmations-and-limits), etc)

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Minimal limit amount doesn't exceed"
}
```

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Requested payCurrency is not active"
}
```

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Currency has been applied already"
}
```

{% endtab %}

{% tab title="401" %}
When try to define `payCurrency` for another merchant invoice.

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized: The requested merchant is not allowed to work with the current invoice"
}
```

{% endtab %}

{% tab title="500" %}
Not found invoice, blockchain or server side problem.

```json
{
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": "2026-01-20 04:16:55",
    "message": "Cannot process pay currency for the invoice"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="265"></th><th width="124.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"invoiceId"</code></td><td><code>String</code></td><td>Invoice id</td></tr><tr><td><code>"purse"</code></td><td><code>String</code></td><td>Purse</td></tr><tr><td><code>"amount"</code></td><td><code>String</code></td><td>Amount of fiat currency</td></tr><tr><td><code>"currency"</code></td><td><code>String</code></td><td>reach out accessed values by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td><code>"amountInpayCurrency"</code></td><td><code>String</code></td><td>Amount of cryptocurrency after convertion</td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>reach out accessed values by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Deposit blockchain fee</td></tr></tbody></table>

**Curl request**

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

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices/currency' \
--header 'X-EX-APIKEY: test_api_key_123' \
--header 'X-EX-PAYLOAD: eyJpbnZvaWNlSWQiOiAiSU5WMTIzNDU2IiwgInBheUN1cnJlbmN5IjogIkJUSyJ9' \
--header 'X-EX-SIGNATURE: d4f7e3d2870f18c3c89a1d32aa98e8b5f1a8a9d47ac3b0b0d991b7b5d7d0c0ff' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "invoiceId": "INV123456",
  "payCurrency": "BTK"
}'
```

&#x20;


# Create quick crypto invoice

Creates a quick crypto invoice using a defined cryptocurrency

<mark style="color:green;">`POST`</mark> `https://app.thedex.cloud/api/v1/invoices/create/quick/crypto`

#### Headers

<table><thead><tr><th>Name</th><th width="179">Type</th><th>Description</th></tr></thead><tbody><tr><td>X-EX-APIKEY<mark style="color:red;">*</mark></td><td>String</td><td>Your API key</td></tr><tr><td>X-EX-PAYLOAD<mark style="color:red;">*</mark></td><td>String</td><td>Body to base64</td></tr><tr><td>X-EX-SIGNATURE<mark style="color:red;">*</mark></td><td>String</td><td>Encrypted body with the secret key</td></tr></tbody></table>

#### Request Body

```json
{
    "amount": "Number",
    "payCurrency": "String",
    "merchantId": "String",
    "orderId": "String",        // optional 
    "email": "String",          // optional 
    "clientId": "String",       // optional 
    "title": "String",          // optional 
    "description": "String",    // optional 
    "recalculation": "boolean", // optional 
    "successUrl": "String",     // optional 
    "failureUrl": "String",     // optional 
    "callbackUrl": "String",    // optional 
    "returnUrl": "String",      // optional
    "unfixAmount": "boolean",   // optional 
    "generateQr": "String"      // optional 
}
    
```

**Request JSON attributes**

<table><thead><tr><th width="152">Name</th><th width="132">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount<mark style="color:red;">*</mark></td><td>BigDecimal</td><td>To check minimal limit amount, use:<br><code>api/v1/info/invoice/limit/crypto</code></td></tr><tr><td>payCurrency<mark style="color:red;">*</mark></td><td>String</td><td>Reach out all available crypto currencies by endpoint: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td>merchantId<mark style="color:red;">*</mark></td><td>String</td><td><p>Merchant ID</p><p>You can find it on page 'Merchants' in your account</p></td></tr><tr><td>orderId</td><td>String</td><td>Order ID in your system</td></tr><tr><td>email</td><td>String</td><td>Used as additional details for invoice.<br>Or <code>required</code> in couple with field <code>"needsEmailConfirmation"</code>.<br>In the second case, this email will receive confirmation link, necessary  to get access to <a href="/pages/OevrENy2tWgzDL2M8UXi">“Define invoice currency”</a> mentioned in <a href="/pages/ThjCLXNhtJS5foBiCyRJ">"<strong>Steps to complete and read the invoice using email</strong> confirmation<strong>".</strong></a></td></tr><tr><td>clientId</td><td>String</td><td>ID of your client</td></tr><tr><td>title</td><td>String</td><td><code>max size = 50</code></td></tr><tr><td>description</td><td>String</td><td><code>max size = 300</code></td></tr><tr><td>recalculation</td><td>boolean</td><td><p><strong>Default = false</strong> </p><p></p><p>If <code>recalculation = false</code>,  the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will not be</strong> recalculated in the case of </p><p><code>Successful</code>status. If client send amount that less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p><br>If <code>recalculation = true</code>, the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will  be recalculated</strong> in the case of </p><p><code>Successful</code>status. If the client send amount that is less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p></p><p><br>Reach out all available invoice statuses by endpoint:</p><p><a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></p></td></tr><tr><td>successUrl</td><td>String</td><td>Custom successUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>failureUrl</td><td>String</td><td>Custom failureUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>callbackUrl</td><td>String</td><td>Custom callbackUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>returnUrl</td><td>String</td><td>Custom returnUrl for an invoice, that can be differ from merchant settings. Rewrites merchantSiteUrl for invoice</td></tr><tr><td>unfixAmount</td><td>boolean</td><td><p><strong>Default = false</strong> </p><p></p><p>If <code>unfixAmount = true</code>, the amount of the invoice will be unfixed, so the client can send any amount, and 'amountInPayCurrency'  will be recalculated.<br>In this case, only one transaction is allowed to pay.</p><p></p><p>If <code>unfixAmount = true</code>, the flow of processing invoice will be as <code>recalculation</code> parameter setting</p></td></tr><tr><td>generateQr</td><td>String</td><td><p></p><p><strong>QR Code Generation Modes</strong>:</p><ul><li><strong>NONE</strong> (default): No QR code will be generated.</li><li><strong>ADDRESS</strong>: Generates a QR code with the pure address.</li><li><strong>FULL_PAYMENT</strong>: This feature generates a QR code with options like network switching, contract details, and amount prefilling. It generally works best with ETH-like or BTC-like networks but may vary elsewhere. For example, TRON often only supports basic addresses. TON payments are well supported in Tonkeeper and MyTonWallet, though Trust may not handle them properly..</li><li><strong>PAYMENT_URL</strong>: Generates a QR code that is a link to payment</li></ul></td></tr></tbody></table>

**Response body:**

{% tabs %}
{% tab title="200 created invoice" %}

```json
{
   "invoiceId": "String",
   "merchantId": "String",
   "clientId": "String",
   "orderId": "String",
   "purse": "String",
   "payCurrency": "String",
   "blockchainFee": "String",
   "amount": "String",
   "amountInPayCurrency": "String",
   "createDate": "String",
   "modifiedDate": "String",
   "createTimestamp": "Long",
   "modifiedTimestamp": "Long",
   "expirationTimestamp": "Long",
   "status": "Integer",
   "payUrl": "String",
   "qrUrl": "String",
   "qrBase64": "String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00",
    "message": "payCurrency: following value doesn't valid. "
}
```

{% endtab %}

{% tab title="422" %}
Specific field validation error. ([Minimal limits](/introduction/confirmations-and-limits), etc)

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Minimal limit amount doesn't exceed"
}
```

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Requested payCurrency is not active"
}
```

{% endtab %}

{% tab title="403" %}
In case of not existing parameters, incorrect headers, etc..

```json
Empty response
```

{% endtab %}

{% tab title="401" %}
When `merchantId` in request not equal to API key merchant id

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized: The requested merchant is not allowed to work with this API key"
}
```

{% endtab %}

{% tab title="500" %}
Blockchain or server side problem.

```json
{
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Cannot create invoice"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="272"></th><th width="130.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"invoiceId"</code></td><td><code>String</code></td><td>Invoice id</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant Id</td></tr><tr><td><code>"orderId"</code></td><td><code>String</code></td><td>Order id</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Client id</td></tr><tr><td><code>"purse"</code></td><td><code>String</code></td><td>Purse (crypto wallet)</td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>Pay currency (crypto currency)</td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Deposit blockchain fee</td></tr><tr><td><code>"amountInPayCurrency"</code></td><td><code>String</code></td><td>Amount in crypto currency</td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"createTimestamp"</code></td><td><code>Long</code></td><td>Creation date in milliseconds</td></tr><tr><td><code>"modifiedTimestamp"</code></td><td><code>Long</code></td><td>Modification date in milliseconds</td></tr><tr><td><code>"expirationTimestamp"</code></td><td><code>Long</code></td><td>Expiration date in milliseconds</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Pay Url</td></tr><tr><td><code>"qrBase64"</code></td><td><code>String</code></td><td><p>Optional </p><p>QR base64-encoded image of the QR code</p></td></tr><tr><td><code>"qrUrl"</code></td><td><code>String</code></td><td>Optional<br>Link to the QR image</td></tr><tr><td><code>"amount"</code></td><td><code>String</code></td><td>Amount to Pay in Fiat currency</td></tr></tbody></table>

**Curl request:**&#x20;

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices/create/quick/crypto' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "amount": "<number>",
  "clientId": "<string>",
  "payCurrency": "<string>",
  "description": "<string>",
  "email": "<string>",
  "merchantId": "<string>",
  "orderId": "<string>",
  "recalculation": "<boolean>",
  "unfixAmount": "<boolean>",
  "title": "<string>",
  "successUrl": "<string>",
  "failureUrl": "<string>",
  "callbackUrl": "<string>",
  "returnUrl": "<string>",
  "generateQr": "<string>"
}'
```

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices/create/quick/crypto' \
--header 'X-EX-APIKEY: test_api_key_123' \
--header 'X-EX-PAYLOAD: eyJhbW91bnQiOjEwMCwiY2xpZW50SWQiOiJjbGllbnRfMDEiLCJwYXlDdXJyZW5jeSI6IkJUQyIsImRlc2NyaXB0aW9uIjoiU29tZSB0ZXN0IGRlc2NyaXB0aW9uIiwiZW1haWwiOiJ0ZXN0QGVtYWlsLmNvbSIsIm1lcmNoYW50SWQiOiJNQ0hfMTIzIiwiY2FsbGJhY2tVcmwiOiJodHRwczovL3d3dy5leGFtcGxlLmNvbS9jYWxsYmFjayIsIm9yZGVySWQiOiJPUkRfMDAxIiwicmVjYWxjdWxhdGlvbiI6ZmFsc2UsInVuZml4QW1vdW50IjpmYWxzZSwidGl0bGUiOiJUZXN0IEludm9pY2UiLCJzdWNjZXNzVXJsIjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vc3VjY2VzcyIsImZhaWx1cmVVcmwiOiJodHRwczovL3d3dy5leGFtcGxlLmNvbS9mYWlsdXJlIn0=' \
--header 'X-EX-SIGNATURE: f5c614aa0b75d9b2b1d5d63c2be74c8d0914e48c89ac21a1dc2597d2577a8aab' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "amount": 100,
  "clientId": "client_01",
  "payCurrency": "BTC",
  "description": "Some test description",
  "email": "test@email.com",
  "merchantId": "MCH_123",
  "orderId": "ORD_001",
  "recalculation": false,
  "unfixAmount": false,
  "title": "Test Invoice",
  "successUrl": "https://www.example.com/success",
  "failureUrl": "https://www.example.com/failure",
  "callbackUrl": "https://www.example.com/callback",
  "returnUrl": "https://www.example.com/return",
  "generateQr": "FULL_PAYMENT"
}'
```


# Create quick fiat invoice

Сreates a full invoice in a single call, with both the fiat and cryptocurrency values explicitly defined in the request

<mark style="color:green;">`POST`</mark> `https://app.thedex.cloud/api/v1/invoices/create/quick/fiat`

#### Headers

<table><thead><tr><th width="219">Name</th><th width="166">Type</th><th>Description</th></tr></thead><tbody><tr><td>X-EX-APIKEY<mark style="color:red;">*</mark></td><td>String</td><td>Your API key</td></tr><tr><td>X-EX-PAYLOAD<mark style="color:red;">*</mark></td><td>String</td><td>Body to base64</td></tr><tr><td>X-EX-SIGNATURE<mark style="color:red;">*</mark></td><td>String</td><td>Encrypted body with the secret key</td></tr></tbody></table>

#### Request Body

```json
{
    "amount": "Number",
    "fiatCurrency": "String",
    "payCurrency": "String",
    "merchantId": "String",
    "orderId": "String",       // optional 
    "email": "String",         // optional 
    "clientId": "String",      // optional 
    "title": "String",         // optional 
    "description": "String",   // optional 
    "recalculation": "boolean",// optional 
    "successUrl": "String",    // optional 
    "failureUrl": "String",    // optional 
    "callbackUrl": "String",   // optional 
    "returnUrl": "String",     // optional 
    "unfixAmount": "boolean",  // optional 
    "generateQr": "String"     // optional 
}
```

**Request JSON attributes**

<table><thead><tr><th width="168">Name</th><th width="133">Type</th><th>Description</th></tr></thead><tbody><tr><td>amount<mark style="color:red;">*</mark></td><td>BigDecimal</td><td>To check minimal limit amount, use:<br><a href="/pages/PJqw3cDpwdXe1xm1fLfv"><code>/api/v1/info/invoice/limit/fiat</code></a></td></tr><tr><td>fiatCurrency<mark style="color:red;">*</mark></td><td>String</td><td>Reach out all available fiat currencies by endpoint: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td>payCurrency<mark style="color:red;">*</mark></td><td>String</td><td>Reach out all available crypto currencies by endpoint: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td>merchantId<mark style="color:red;">*</mark></td><td>String</td><td><p>Merchant ID</p><p>You can find it on page 'Merchants' in your account</p></td></tr><tr><td>orderId</td><td>String</td><td>Order ID in your system</td></tr><tr><td>email</td><td>String</td><td>Used as additional details for invoice.<br>Or <code>required</code> in couple with field <code>"needsEmailConfirmation"</code>.<br>In the second case, this email will receive confirmation link, necessary  to get access to <a href="/pages/OevrENy2tWgzDL2M8UXi">“Define invoice currency”</a> mentioned in <a href="/pages/ThjCLXNhtJS5foBiCyRJ">"<strong>Steps to complete and read the invoice using email</strong> confirmation<strong>".</strong></a></td></tr><tr><td>clientId</td><td>String</td><td>ID of your client</td></tr><tr><td>title</td><td>String</td><td><code>max size = 50</code></td></tr><tr><td>description</td><td>String</td><td><code>max size = 300</code></td></tr><tr><td>recalculation</td><td>boolean</td><td><p><strong>Default = false</strong> </p><p></p><p>If <code>recalculation = false</code>,  the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will not be</strong> recalculated in the case of </p><p><code>Successful</code>status. If client send amount that less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p><br>If <code>recalculation = true</code>, the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will  be recalculated</strong> in the case of </p><p><code>Successful</code>status. If the client send amount that is less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p></p><p><br>Reach out all available invoice statuses by endpoint:</p><p><a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></p></td></tr><tr><td>successUrl</td><td>String</td><td>Custom successUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>failureUrl</td><td>String</td><td>Custom failureUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>callbackUrl</td><td>String</td><td>Custom callbackUrl for an invoice, that can be differ from merchant settings</td></tr><tr><td>returnUrl</td><td>String</td><td>Custom returnUrl for an invoice, that can be differ from merchant settings. Rewrites merchantSiteUrl for invoice</td></tr><tr><td>unfixAmount</td><td>boolean</td><td><p><strong>Default = false</strong> </p><p></p><p>If <code>unfixAmount = true</code>, the amount of the invoice will be unfixed, so the client can send any amount, and 'amountInPayCurrency'  will be recalculated.<br>In this case, only one transaction is allowed to pay.</p><p></p><p>If <code>unfixAmount = true</code>, the flow of processing invoice will be as <code>recalculation</code> parameter setting</p></td></tr><tr><td>generateQr</td><td>String</td><td><p></p><p><strong>QR Code Generation Modes</strong>:</p><ul><li><strong>NONE</strong> (default): No QR code will be generated.</li><li><strong>ADDRESS</strong>: Generates a QR code with the pure address.</li><li><strong>FULL_PAYMENT</strong>: This feature generates a QR code with options like network switching, contract details, and amount prefilling. It generally works best with ETH-like or BTC-like networks but may vary elsewhere. For example, TRON often only supports basic addresses. TON payments are well supported in Tonkeeper and MyTonWallet, though Trust may not handle them properly..</li><li><strong>PAYMENT_URL</strong>: Generates a QR code that is a link to payment</li></ul></td></tr></tbody></table>

**Response body**

{% tabs %}
{% tab title="200 created invoice" %}

```json
{
   "invoiceId": "String",
   "merchantId": "String",
   "clientId": "String",
   "orderId": "String",
   "purse": "String",
   "amount": "String",
   "currency": "String",
   "payCurrency": "String",
   "blockchainFee": "String",
   "amountInPayCurrency": "String",
   "rate": "String",
   "rateWithCommission": "String",
   "createDate": "String",
   "modifiedDate": "String",
   "createTimestamp": "Long",
   "modifiedTimestamp": "Long",
   "expirationTimestamp": "Long",
   "status": "Integer",
   "payUrl": "String",
   "qrUrl": "String",
   "qrBase64": "String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00",
    "message": "payCurrency: following value doesn't valid. "
}
```

{% endtab %}

{% tab title="422" %}

Specific field validation error. ([Minimal limits](/introduction/confirmations-and-limits), etc)

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Minimal limit amount doesn't exceed"
}
```

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Requested payCurrency is not active"
}
```

{% endtab %}

{% tab title="403" %}
In case of not existing parameters, incorrect headers, etc..

```json
Empty response
```

{% endtab %}

{% tab title="401" %}
When `merchantId` in request not equal to API key merchant id

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized: The requested merchant is not allowed to work with this API key"
}
```

{% endtab %}

{% tab title="500" %}
Blockchain or server side problem.

```json
{
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Cannot create invoice"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="266"></th><th width="131.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"invoiceId"</code></td><td><code>String</code></td><td>Invoice id</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant Id</td></tr><tr><td><code>"orderId"</code></td><td><code>String</code></td><td>Order id</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Client id</td></tr><tr><td><code>"purse"</code></td><td><code>String</code></td><td>Purse (crypto wallet)</td></tr><tr><td><code>"amount"</code></td><td><code>String</code></td><td>Amount to pay in fiat currency</td></tr><tr><td><code>"currency"</code></td><td><code>String</code></td><td>Fiat currency</td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>Pay currency (crypto currency)</td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Deposit blockchain fee</td></tr><tr><td><code>"amountInPayCurrency"</code></td><td><code>String</code></td><td>Amount to pay in crypto currency</td></tr><tr><td><code>"rate"</code></td><td><code>String</code></td><td>Rate</td></tr><tr><td><code>"rateWithCommission"</code></td><td><code>String</code></td><td>Rate with commission</td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"createTimestamp"</code></td><td><code>Long</code></td><td>Creation date in milliseconds</td></tr><tr><td><code>"modifiedTimestamp"</code></td><td><code>Long</code></td><td>Modification date in milliseconds</td></tr><tr><td><code>"expirationTimestamp"</code></td><td><code>Long</code></td><td>Expiration date in milliseconds</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Pay Url</td></tr><tr><td><code>"qrBase64"</code></td><td><code>String</code></td><td><p>Optional </p><p>QR base64-encoded image of the QR code</p></td></tr><tr><td><code>"qrUrl"</code></td><td><code>String</code></td><td>Optional<br>Link to the QR image</td></tr></tbody></table>

**Curl request**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices/create/quick/fiat' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "amount": "<number>",
  "fiatCurrency": "<string>",
  "payCurrency": "<string>",
  "description": "<string>",
  "email": "<string>",
  "merchantId": "<string>",
  "clientId": "<string>",
  "orderId": "<string>",
  "recalculation": "<boolean>",
  "unfixAmount": "<boolean>",
  "title": "<string>",
  "successUrl": "<string>",
  "failureUrl": "<string>",
  "callbackUrl": "<string>",
  "returnUrl": "<string>",
  "generateQr": "<string>"
}'
```

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices/create/quick/fiat' \
--header 'X-EX-APIKEY: test_api_key_123' \
--header 'X-EX-PAYLOAD: eyJhbW91bnQiOjUwLCJmaWF0Q3VycmVuY3kiOiJVU0QiLCJwYXlDdXJyZW5jeSI6IkJUQyIsImRlc2NyaXB0aW9uIjoiQXV0b3BheSB0ZXN0IGZyb20gQ1JNIiwgImVtYWlsIjoidGVzdEBleGFtcGxlLmNvbSIsIm1lcmNoYW50SWQiOiJNRVJDSDEyMyIsImNsaWVudElkIjoiQ0xJRU5UMDAxIiwib3JkZXJJZCI6Ik9SRC0xMDAxIiwicmVjYWxjdWxhdGlvbiI6ZmFsc2UsInVuZml4QW1vdW50IjpmYWxzZSwidGl0bGUiOiJUaXRsZSBGb3IgVGVzdCBJbnZvaWNlIiwic3VjY2Vzc1VybCI6Imh0dHBzOi8vd3d3LmV4YW1wbGUuY29tL3N1Y2Nlc3MiLCJmYWlsdXJlVXJsIjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vZmFpbCIsImNhbGxiYWNrVXJsIjoiaHR0cHM6Ly93d3cuZXhhbXBsZS5jb20vY2FsbGJhY2sifQ== \
--header 'X-EX-SIGNATURE: aabbccddeeff00112233445566778899aabbccddeeff00112233445566778899' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "amount": 50,
  "fiatCurrency": "USD",
  "payCurrency": "BTC",
  "description": "Autopay test from CRM",
  "email": "test@example.com",
  "merchantId": "MERCH123",
  "clientId": "CLIENT001",
  "orderId": "ORD-1001",
  "recalculation": false,
  "unfixAmount": false,
  "title": "Title For Test Invoice",
  "successUrl": "https://www.example.com/success",
  "failureUrl": "https://www.example.com/fail",
  "callbackUrl": "https://www.example.com/callback",
  "returnUrl": "https://www.example.com/return",
  "generateQr": "FULL_PAYMENT"
}'

```


# Fetch Invoice

Returns the invoice by "invoiceId" or "orderId" attribute.

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

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

{% code overflow="wrap" %}

```json
{
    "invoiceId": "String"  // optional if orderId is filled
    "orderId": "String"    // optional if invoiceId is filled
}
```

{% endcode %}

**Request JSON attributes**

| Name      | Type   | Description                                                                                                                                                                    |
| --------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| invoiceId | String | Optional if `"orderId"` is filled                                                                                                                                              |
| orderId   | String | Optional if `"invoiceId"` is filled. Order id that merchant can sent on creation invoice. Merchant could define order id by their wish. (f.e. If you have own id in database). |

**Response body**

{% tabs %}
{% tab title="200 invoice" %}

```json
{
   "invoiceId": "String",
   "merchantId": "String",
   "orderId": "String",
   "clientId": "String",
   "status": "Integer",
   "statusName": "String",
   "createDate": "String",
   "modifiedDate": "String",
   "expirationDate": "String",
   "expirationDateInMilliseconds": "Long",
   "purse": "String",
   "memo": "String",
   "currency": "String",
   "payCurrency": "String",
   "amount": "String",
   "amountInPayCurrency": "String",
   "paidAmount":"String",
   "paidAmountFiat": "String",
   "payUrl": "String",
   "creationWay": "String",
   "merchantCommission": "String",
   "merchantBalance": "String",
   "title": "String",
   "description": "String",
   "uniqueUserId":" String",
   "depositBlockchainFee": "String",
   "rate": "String",
   "rateWithCommission": "String",
   "txId": "String"[],
   "fromAddress": "String"[],
   "successUrl": "String",
   "failureUrl": "String",
   "merchantSiteUrl": "String",
   "callbackUrl": "String",
   "complexCommission": "String"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="273.3333333333333">Name</th><th width="123">Type</th><th>Descripton</th></tr></thead><tbody><tr><td><code>"invoiceId"</code></td><td><code>String</code></td><td>Invoice id.</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant id.</td></tr><tr><td><code>"orderId"</code></td><td><code>String</code></td><td>Order id.</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Client id.</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"statusName"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date.</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date.</td></tr><tr><td><code>"expirationDate"</code></td><td><code>String</code></td><td>Expiration date.</td></tr><tr><td><code>"createTimestamp"</code></td><td><code>Long</code></td><td>Creation date in milliseconds</td></tr><tr><td><code>"modifiedTimestamp"</code></td><td><code>Long</code></td><td>Modified date in milliseconds</td></tr><tr><td><code>"expirationTimestamp"</code></td><td><code>Long</code></td><td>Expiration date in milliseconds</td></tr><tr><td><code>"expirationDateInMilliseconds"</code></td><td><code>Long</code></td><td>Left expiration time in milliseconds.</td></tr><tr><td><code>"purse"</code></td><td><code>String</code></td><td>Crypto-address is used by client to send cryptocurrency.</td></tr><tr><td><code>"currency"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td><code>"amount"</code></td><td><code>String</code></td><td>Amount in fiat currency.</td></tr><tr><td><code>"amountInPayCurrency"</code></td><td><code>String</code></td><td>Converted amount in cryptocurrency.</td></tr><tr><td><code>"paidAmount"</code></td><td><code>String</code></td><td>Represents paid amount in crypto-currency.</td></tr><tr><td><code>"paidAmountFiat"</code></td><td><code>String</code></td><td>Represents paid amount in fiat currency.</td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Url is used to deposit.</td></tr><tr><td><code>"callbackUrl"</code></td><td><code>String</code></td><td><p>Callback URL.<br>To reach out more about statuses that trigger callback read the section about</p><p><a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></p></td></tr><tr><td><code>"creationWay"</code></td><td><code>String</code></td><td><p>For this usage “API“.</p><p>To reach out more creation ways use:<a href="/pages/akX5SB0icQekshIT2Bsp"><code>/api/v1/info/invoice/creation/ways</code></a></p></td></tr><tr><td><code>"merchantCommission"</code></td><td><code>String</code></td><td>Merchant commission.</td></tr><tr><td><code>"merchantBalance"</code></td><td><code>String</code></td><td>Merchant balance.</td></tr><tr><td><code>"title"</code></td><td><code>String</code></td><td>Title.</td></tr><tr><td><code>"description"</code></td><td><code>String</code></td><td>Description.</td></tr><tr><td><code>"uniqueUserId"</code></td><td><code>String</code></td><td>User UUID.</td></tr><tr><td><code>"depositBlockchainFee"</code></td><td><code>String</code></td><td>Deposit blockchain fee.</td></tr><tr><td><code>"rate"</code></td><td><code>String</code></td><td>Rate.</td></tr><tr><td><code>"rateWithCommission"</code></td><td><code>String</code></td><td>Rate with commission.</td></tr><tr><td><code>"txId"</code></td><td><code>String[]</code></td><td>Transactions list</td></tr><tr><td><code>"failureUrl"</code></td><td><code>String</code></td><td>Used for redirect to this reference on failure invoice status. You could set this URL individually to merchant.</td></tr><tr><td><code>"successUrl"</code></td><td><code>String</code></td><td>Used for redirect to this reference on success invoice status. You could set this URL individually to merchant.</td></tr><tr><td><code>"merchantSiteUrl"</code></td><td><code>String</code></td><td>Used for redirect to this reference if <code>successUrl</code> or <code>failureUrl</code> are not defined.</td></tr><tr><td><code>"complexCommission"</code></td><td><code>String</code></td><td>Used for commision </td></tr><tr><td><code>"</code>fromAddress<code>"</code></td><td><p><code>String[]</code></p><p></p></td><td>From Address list</td></tr><tr><td><code>"memo"</code></td><td><code>String</code></td><td>Note for payment</td></tr></tbody></table>

**Request Curl**

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

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices/one' \
--header 'X-EX-APIKEY: test_api_key_123' \
--header 'X-EX-PAYLOAD: eyJpbnZvaWNlSWQiOiJpbnZfMDAxIn0=' \
--header 'X-EX-SIGNATURE: dummysignature1234567890abcdef' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "invoiceId": "inv_001"
}'

```

&#x20;


# Fetch invoices

Returns a list of invoices created within the given time window (From/To).

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

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

```json
{
    "from": "Number", // timestamp
    "to": "Number" // timestamp
}
```

**Request JSON attributes**

| Name | Type | Description                                       |
| ---- | ---- | ------------------------------------------------- |
| from | Long | Timestamp (from) in milliseconds since Unix epoch |
| to   | Long | Timestamp (to) in milliseconds since Unix epoch   |

**Response body**

{% tabs %}
{% tab title="200 invoice" %}

```json
[
{
   "invoiceId": "String",
   "merchantId": "String",
   "orderId": "String",
   "clientId": "String",
   "status": "Integer",
   "statusName": "String",
   "createDate": "String",
   "modifiedDate": "String",
   "expirationDate": "String",
   "createTimestamp": "String",
   "modifiedTimestamp": "String",
   "expirationTimestamp": "String",
   "expirationDateInMilliseconds": "Long",
   "purse": "String",
   "memo": "String",
   "currency": "String",
   "payCurrency": "String",
   "amount": "String",
   "amountInPayCurrency": "String",
   "paidAmount":"String",
   "paidAmountFiat": "String",
   "payUrl": "String",
   "creationWay": "String",
   "merchantCommission": "String",
   "merchantBalance": "String",
   "title": "String",
   "description": "String",
   "uniqueUserId":" String",
   "depositBlockchainFee": "String",
   "rate": "String",
   "rateWithCommission": "String",
   "txId": "String"[],
   "fromAddress": [],
   "successUrl": "String",
   "failureUrl": "String",
   "merchantSiteUrl": "String",
   "callbackUrl": "String",
   "complexCommission": "String"
},

{...}
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="273.3333333333333">Name</th><th width="123">Type</th><th>Descripton</th></tr></thead><tbody><tr><td><code>"invoiceId"</code></td><td><code>String</code></td><td>Invoice id.</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant id.</td></tr><tr><td><code>"orderId"</code></td><td><code>String</code></td><td>Order id.</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Client id.</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"statusName"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date.</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date.</td></tr><tr><td><code>"expirationDate"</code></td><td><code>String</code></td><td>Expiration date.</td></tr><tr><td><code>"createTimestamp"</code></td><td><code>Long</code></td><td>Creation date in milliseconds</td></tr><tr><td><code>"modifiedTimestamp"</code></td><td><code>Long</code></td><td>Modified date in milliseconds</td></tr><tr><td><code>"expirationTimestamp"</code></td><td><code>Long</code></td><td>Expiration date in milliseconds</td></tr><tr><td><code>"expirationDateInMilliseconds"</code></td><td><code>Long</code></td><td>Left expiration time in milliseconds.</td></tr><tr><td><code>"purse"</code></td><td><code>String</code></td><td>Crypto-address is used by client to send cryptocurrency.</td></tr><tr><td><code>"currency"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a></td></tr><tr><td><code>"amount"</code></td><td><code>String</code></td><td>Amount in fiat currency.</td></tr><tr><td><code>"amountInPayCurrency"</code></td><td><code>String</code></td><td>Converted amount in cryptocurrency.</td></tr><tr><td><code>"paidAmount"</code></td><td><code>String</code></td><td>Represents paid amount in crypto-currency.</td></tr><tr><td><code>"paidAmountFiat"</code></td><td><code>String</code></td><td>Represents paid amount in fiat currency.</td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Url is used to deposit.</td></tr><tr><td><code>"callbackUrl"</code></td><td><code>String</code></td><td><p>Callback URL.<br>To reach out more about statuses that trigger callback read the section about</p><p><a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></p></td></tr><tr><td><code>"creationWay"</code></td><td><code>String</code></td><td><p>For this usage “API“.</p><p>To reach out more creation ways use:<a href="/pages/akX5SB0icQekshIT2Bsp"><code>/api/v1/info/invoice/creation/ways</code></a></p></td></tr><tr><td><code>"merchantCommission"</code></td><td><code>String</code></td><td>Merchant commission.</td></tr><tr><td><code>"merchantBalance"</code></td><td><code>String</code></td><td>Merchant balance.</td></tr><tr><td><code>"title"</code></td><td><code>String</code></td><td>Title.</td></tr><tr><td><code>"description"</code></td><td><code>String</code></td><td>Description.</td></tr><tr><td><code>"uniqueUserId"</code></td><td><code>String</code></td><td>User UUID.</td></tr><tr><td><code>"depositBlockchainFee"</code></td><td><code>String</code></td><td>Deposit blockchain fee.</td></tr><tr><td><code>"rate"</code></td><td><code>String</code></td><td>Rate.</td></tr><tr><td><code>"rateWithCommission"</code></td><td><code>String</code></td><td>Rate with commission.</td></tr><tr><td><code>"txId"</code></td><td><code>String[]</code></td><td>Transactions list</td></tr><tr><td><code>"failureUrl"</code></td><td><code>String</code></td><td>Used for redirect to this reference on failure invoice status. You could set this URL individually to merchant.</td></tr><tr><td><code>"successUrl"</code></td><td><code>String</code></td><td>Used for redirect to this reference on success invoice status. You could set this URL individually to merchant.</td></tr><tr><td><code>"merchantSiteUrl"</code></td><td><code>String</code></td><td>Used for redirect to this reference if <code>successUrl</code> or <code>failureUrl</code> are not defined.</td></tr><tr><td>"<code>memo"</code></td><td><code>String</code></td><td>Note for payment</td></tr><tr><td><code>"</code>fromAddress<code>"</code></td><td><code>String[]</code></td><td>From Address list</td></tr><tr><td><code>"complexCommission"</code></td><td><code>String</code></td><td>Used for commision </td></tr></tbody></table>

**Request Curl**

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

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/invoices' \
--header 'X-EX-APIKEY: test_api_key_123' \
--header 'X-EX-PAYLOAD: eyJmcm9tIjoxNzE4MDAwMDAwMDAsInRvIjoxNzE4MTIwMDAwMDAwfQ==' \
--header 'X-EX-SIGNATURE: dummy_signature_abc1234567890' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "from": 1718000000000,
  "to": 1718120000000
}'

```


# Create static wallet

Creates a static wallet address – a single, unchangeable address used to receive payments.

The system supports creating static wallets in two modes:

* **Monetary mode** — creates a wallet for one cryptocurrency.
* **Blockchain mode** — creates a wallet for a blockchain network. It supports all enabled currencies on that network.

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

#### 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 (**&#x4D;onetar&#x79;**)**

```json
{
    "clientId": "String",
    "monetary": "String",
    "merchantId": "String",
    "fiatCurrency": "String", //optional
    "successUrl": "String", // optional
    "failureUrl": "String", // optional
    "callbackUrl": "String" // optional
}
```

**Request Body (Blockchain)**

```json
{
    "clientId": "String",
    "blockchain": "String",
    "merchantId": "String",
    "fiatCurrecy": "String", //optional
    "successUrl": "String", // optional
    "failureUrl": "String", // optional
    "callbackUrl": "String" // optional
}
```

**Request JSON attributes**

| Name                                                    | Type   | Description                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| monetary / blockchain<mark style="color:red;">\*</mark> | String | Specify either a monetary or a blockchain to create a wallet                                                                                                                                                                                                                                                  |
| merchantId<mark style="color:red;">\*</mark>            | String | You can find it on page 'Merchants' in your account                                                                                                                                                                                                                                                           |
| clientId<mark style="color:red;">\*</mark>              | String | An arbitrary identifier for the client                                                                                                                                                                                                                                                                        |
| fiatCurrency                                            | String | <p><strong>Default = USD</strong></p><p>Reach out all available fiat currencies by endpoint: <a href="https://docs.thedex.cloud/documentation/informational/fetch-currency-definitions"><code>/api/v1/info/currencies</code></a></p><p>Primary Used for recalculation of <code>paid\_amount\_fiat</code>.</p> |
| successUrl                                              | String | Custom successUrl for an invoice, that can be differ from merchant settings                                                                                                                                                                                                                                   |
| failureUrl                                              | String | Custom failureUrl for an invoice, that can be differ from merchant settings                                                                                                                                                                                                                                   |
| callbackUrl                                             | String | Custom callback url for receiving events about created invoice on wallet                                                                                                                                                                                                                                      |

**Response Body**

{% tabs %}
{% tab title="200 created wallet" %}

```json
{
    "walletId": "String",
    "monetary": "String",    // Returned if created in Monetary mode
    "blockchain": "String",  // Returned if created in Blockchain-based mode
    "clientId": "String",
    "fiatCurrency": "String",
    "successUrl": "String",
    "failureUrl": "String",
    "callbackUrl": "String",
    "address": "String",
    "minAmount": "String",
    "isActive": "Boolean",
    "payUrl": "String",
    "qrBase64": "String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "message": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00"
}
```

Missing wallet identifier error: when neither 'monetary' nor 'blockchain' is specified.

```json
{
    "error": "Bad Request",
    "message": "Either 'monetary' or 'blockchain' must be provided. ",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00"
}
```

{% endtab %}

{% tab title="422" %}
Specific field validation error.

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "An active wallet with monetary USDT_TRON, merchant ID `merchantId`, and client ID `clientId` already exists."
}
```

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "`payCurrency` is not active"
}
```

{% endtab %}

{% tab title="401" %}
When `merchantId` in request not equal to API key merchant id

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-20 04:24:58",
    "message": "Request is not authorized: The requested merchant is not allowed to work with this API key"
}
```

{% endtab %}

{% tab title="500" %}
Blockchain or server side problem.

```json
{
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Cannot create wallet"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="427.3333333333333"></th><th width="150"></th><th></th></tr></thead><tbody><tr><td><code>"walletId"</code></td><td><code>String</code></td><td>Unique identifier of the created wallet</td></tr><tr><td><code>"monetary"</code></td><td><code>String</code></td><td>Cryptocurrency of the created wallet. Returned only if the wallet was created in Monetary mode</td></tr><tr><td><code>"blockchain"</code></td><td><code>String</code></td><td>Blockchain network of the created wallet. Returned only if the wallet was created in Blockchain-based mode</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Arbitrary identifier of the client</td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Wallet currency used for <code>paid_amount_fiat</code></td></tr><tr><td><code>"successUrl"</code></td><td><code>String</code></td><td>Success url to redirect customer after successful payment</td></tr><tr><td><code>"failureUrl"</code></td><td><code>String</code></td><td>Failure url to redirect customer after failed payment</td></tr><tr><td><code>"callbackUrl"</code></td><td><code>String</code></td><td>Callback url to receive webhook about created invoices after successful / failed deposit of wallet</td></tr><tr><td><code>"address"</code></td><td><code>String</code></td><td>Generated crypto address for accepting payments</td></tr><tr><td><code>"minAmount"</code></td><td><code>String</code></td><td>Minimum amount required to accept a payment</td></tr><tr><td><code>"isActive"</code></td><td><code>Boolean</code></td><td>Indicates whether the wallet is active.</td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Pay url</td></tr><tr><td><code>"qrBase64"</code></td><td><code>String</code></td><td>A Base64-encoded PNG image of a QR code that encodes the wallet address for payment</td></tr></tbody></table>

**Request curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/wallets/create' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
    "blockchain": "String",
    "merchantId": "String",
    "fiatCurrency": "String",
    "clientId": "String",
    "successUrl": "String",
    "failureUrl": "String",
    "callbackUrl": "String"
}'
```

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/wallets/create' \
--header 'X-EX-APIKEY: test_api_key_123456' \
--header 'X-EX-PAYLOAD: eyJtb25ldGFyeSI6IkJUSDIiLCJtZXJjaGFudElkIjoiTVJDSEFOVDEyMyIsImNsaWVudElkIjoiQ0xJRU5UMTIzIiwic3VjY2Vzc1VybCI6Imh0dHBzOi8vdGVzdC5zdWNjZXNzIiwiZmFpbHVyZVVybCI6Imh0dHBzOi8vdGVzdC5mYWlsdXJlIiwiY2FsbGJhY2tVcmwiOiJodHRwczovL3Rlc3QuY2FsbGJhY2sifQ==' \
--header 'X-EX-SIGNATURE: dummy_signature_abc123' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
    "blockchain": "BITCOIN",
    "merchantId": "MERCHANT123",
    "clientId": "CLIENT123",
    "fiatCurrency": "USD",
    "successUrl": "https://test.success",
    "failureUrl": "https://test.failure",
    "callbackUrl": "https://test.callback"
}'

```


# Fetch static wallet

Returns a static wallet address by walletId

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

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

```json
{
    "walletId": "String"
}
```

Request JSON attributes

| Name                                       | Type   | Description                                   |
| ------------------------------------------ | ------ | --------------------------------------------- |
| walletId<mark style="color:red;">\*</mark> | String | The unique identifier of the requested wallet |

**Response Body**

{% tabs %}
{% tab title="200 response" %}

```json
{
    "walletId": "String",
    "monetary": "String",    // Returned if created in Monetary mode
    "blockchain": "String",  // Returned if created in Blockchain-based mode
    "clientId": "String",
    "successUrl": "String",
    "failureUrl": "String",
    "callbackUrl": "String",
    "fiatCurrency": "String",
    "address": "String",
    "minAmount": "String",
    "isActive": "Boolean",
    "payUrl": "String",
    "qrBase64": "String"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="427.3333333333333"></th><th width="150"></th><th></th></tr></thead><tbody><tr><td><code>"walletId"</code></td><td><code>String</code></td><td>Unique identifier of the created wallet</td></tr><tr><td><code>"monetary"</code></td><td><code>String</code></td><td>Cryptocurrency of the created wallet. Returned only if the wallet was created in Monetary mode</td></tr><tr><td><code>"blockchain"</code></td><td><code>String</code></td><td>Blockchain network of the created wallet.  Returned only if the wallet was created in Blockchain-based mode</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Arbitrary identifier of the client</td></tr><tr><td><code>"successUrl"</code></td><td><code>String</code></td><td>Success url to redirect customer after successful payment</td></tr><tr><td><code>"failureUrl"</code></td><td><code>String</code></td><td>Failure url to redirect customer after failed payment</td></tr><tr><td><code>"callbackUrl"</code></td><td><code>String</code></td><td>Callback url to receive webhook about created invoices after successful / failed deposit of wallet</td></tr><tr><td><code>"address"</code></td><td><code>String</code></td><td>Generated crypto address for accepting payments</td></tr><tr><td><code>"minAmount"</code></td><td><code>String</code></td><td>Minimum amount required to accept a payment</td></tr><tr><td><code>"isActive"</code></td><td><code>Boolean</code></td><td>Indicates whether the wallet is active.</td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Pay url </td></tr><tr><td><code>"qrBase64"</code></td><td><code>String</code></td><td>A Base64-encoded PNG image of a QR code that encodes the wallet address for payment</td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td><p><strong>Default = USD</strong></p><p>Reach out all available fiat currencies by endpoint: <a href="https://docs.thedex.cloud/documentation/informational/fetch-currency-definitions"><code>/api/v1/info/currencies</code></a><br>Primary Used for recalculation of <code>paid_amount_fiat</code>.</p></td></tr></tbody></table>

**Request Curl**

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

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/wallets/one' \
--header 'X-EX-APIKEY: test_api_key_123456' \
--header 'X-EX-PAYLOAD: eyJ3YWxsZXRJZCI6ICJXQUxMRVRfMTIzIn0=' \
--header 'X-EX-SIGNATURE: dummy_signature_abc123' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{
    "walletId": "WALLET_123"
}'

```


# Deprecated

The following methods are deprecated. While they will remain available, we recommend using the alternatives mentioned in their documentation.


# Create quick invoice

**Note**: This method is <mark style="color:red;">**deprecated**</mark>. Please use [Create quick crypto invoice](/documentation/invoices/create-quick-crypto-invoice) instead.

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

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

| Name                                          | Type       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| --------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| amount<mark style="color:red;">\*</mark>      | BigDecimal | <p>To check minimal limit amount, use:<br><code>api/v1/info/invoice/limit/crypto</code></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| payCurrency<mark style="color:red;">\*</mark> | String     | Reach out all available crypto currencies by endpoint: [`/api/v1/info/currencies`](/documentation/informational/fetch-currency-definitions)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| merchantId<mark style="color:red;">\*</mark>  | String     | <p>Merchant ID</p><p>You can find it on page 'Merchants' in your account</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| orderId                                       | String     | Order ID in your system                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| email                                         | String     | <p>Used as additional details for invoice.<br>Or <code>required</code> in couple with field <code>"needsEmailConfirmation"</code>.<br>In the second case, this email will receive confirmation link, necessary  to get access to <a href="/pages/OevrENy2tWgzDL2M8UXi">“Define invoice currency”</a> mentioned in <a href="/pages/ThjCLXNhtJS5foBiCyRJ">"<strong>Steps to complete and read the invoice using email</strong> confirmation<strong>".</strong></a></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| clientId                                      | String     | ID of your client                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| title                                         | String     | `max size = 50`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| description                                   | String     | `max size = 300`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| recalculation                                 | boolean    | <p><strong>Default = false</strong> </p><p></p><p>If <code>recalculation = false</code>,  the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will not be</strong> recalculated in the case of </p><p><code>Successful</code>status. If client send amount that less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p><br>If <code>recalculation = true</code>, the invoice will be expecting a payment that is equal to or greater than 'amountInPayCurrency'</p><p>'amountInPayCurrency' and 'merchantBalance' of invoice <strong>will  be recalculated</strong> in the case of </p><p><code>Successful</code>status. If the client send amount that is less than 'amountInPayCurrency' status of invoice will be <code>Underpaid</code></p><p></p><p><br>Reach out all available invoice statuses by endpoint:</p><p><a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></p> |
| successUrl                                    | String     | Custom successUrl for an invoice, that can be differ from merchant settings                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| failureUrl                                    | String     | Custom failureUrl for an invoice, that can be differ from merchant settings                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| callbackUrl                                   | String     | Custom callbackUrl for an invoice, that can be differ from merchant settings                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| unfixAmount                                   | boolean    | <p><strong>Default = false</strong> </p><p></p><p>If <code>unfixAmount = true</code>, the amount of the invoice will be unfixed, so the client can send any amount, and 'amountInPayCurrency'  will be recalculated.<br>In this case, only one transaction is allowed to pay.</p><p></p><p>If <code>unfixAmount = true</code>, the flow of processing invoice will be as <code>recalculation</code> parameter setting</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| generateQr                                    | boolean    | <p><strong>Default = false</strong><br><br>If  <code>generateQr =true</code>, a QR code will be generated for the invoice. The response will include both <code>qrBase64</code> (a base64-encoded image of the QR code) and <code>qrUrl</code> (a direct link to the QR image).</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

{% tabs %}
{% tab title="200 created invoice" %}

```json
{
   "invoiceId": "String",
   "merchantId": "String",
   "clientId": "String",
   "orderId": "String",
   "purse": "String",
   "payCurrency": "String",
   "blockchainFee": "String",
   "amountInPayCurrency": "String",
   "createDate": "String",
   "modifiedDate": "String",
   "status": "Integer",
   "payUrl": "String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00",
    "message": "payCurrency: following value doesn't valid. "
}
```

{% endtab %}

{% tab title="422" %}
Specific field validation error. ([Minimal limits](/introduction/confirmations-and-limits), etc)

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Minimal limit amount doesn't exceed"
}
```

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Requested payCurrency is not active"
}
```

{% endtab %}

{% tab title="403" %}
In case of not existing parameters, incorrect headers, etc..

```json
Empty response
```

{% endtab %}

{% tab title="401" %}
When `merchantId` in request not equal to API key merchant id

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized: The requested merchant is not allowed to work with this API key"
}
```

{% endtab %}

{% tab title="500" %}
Blockchain or server side problem.

```json
{
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Cannot create invoice"
}
```

{% endtab %}
{% endtabs %}

**Curl request:**&#x20;

```powershell
curl --location 'https://app.thedex.cloud/api/v1/invoices/create/quick' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "amount": "<number>",
  "clientId": "<string>",
  "payCurrency": "<string>",
  "description": "<string>",
  "email": "<string>",
  "merchantId": "<string>",
  "orderId": "<string>",
  "recalculation": "<boolean>",
  "unfixAmount": "<boolean>",
  "title": "<string>",
  "successUrl": "<string>",
  "failureUrl": "<string>",
  "callbackUrl": "<string>"
}'
```

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="259"></th><th width="130.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"invoiceId"</code></td><td><code>String</code></td><td>Invoice id</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant Id</td></tr><tr><td><code>"orderId"</code></td><td><code>String</code></td><td>Order id</td></tr><tr><td><code>"clientId"</code></td><td><code>String</code></td><td>Client id</td></tr><tr><td><code>"purse"</code></td><td><code>String</code></td><td>Purse (crypto wallet)</td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>Pay currency (crypto currency)</td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Deposit blockchain fee</td></tr><tr><td><code>"amountInPayCurrency"</code></td><td><code>String</code></td><td>Amount in crypto currency</td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"createTimestamp"</code></td><td><code>Long</code></td><td>Creation date in milliseconds</td></tr><tr><td><code>"modifiedTimestamp"</code></td><td><code>Long</code></td><td>Modification date in milliseconds</td></tr><tr><td><code>"expirationTimestamp"</code></td><td><code>Long</code></td><td>Expiration date in milliseconds</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"payUrl"</code></td><td><code>String</code></td><td>Pay Url</td></tr><tr><td><code>"qrBase64"</code></td><td><code>String</code></td><td><p>Optional </p><p>QR base64-encoded image of the QR code</p></td></tr><tr><td><code>"qrUrl"</code></td><td><code>String</code></td><td>Optional<br>Link to the QR image</td></tr></tbody></table>


# Payouts

**Steps to complete and read the payout:**

To create a payout, call [`/api/v1/payouts/create`](/documentation/payouts/create-a-payout)

You could get a payout, using [`api/v1/payouts/one`](/documentation/payouts/fetch-payout)

&#x20;


# Create payout

Creates payout from user wallet for defined crypto-currency

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

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

```json
{
    "amountInPayCurrency": "Number",
    "payCurrency": "String",
    "address": "String",
    "memo": "Number",         // optional 
    "description": "String",  // optional 
    "callbackUrl": "String"   // optional 
}
```

**Request JSON attributes**

<table><thead><tr><th>Name</th><th width="192">Type</th><th>Description</th></tr></thead><tbody><tr><td>payCurrency<mark style="color:red;">*</mark></td><td>String</td><td>Reach out accessed values to define attribute by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"payCurrencies"</code></td></tr><tr><td>amountInPayCurrency<mark style="color:red;">*</mark></td><td>BigDecimal</td><td>Amount in cryptocurrency that will be transferred to the address. Please ensure the value respects the precision limits for each currency and blockchain (see <a href="#amount-precision-limits"><code>Precision Limits</code></a><br>for details).</td></tr><tr><td>address<mark style="color:red;">*</mark></td><td>String</td><td>Address of  crypto wallet</td></tr><tr><td>memo</td><td>Integer</td><td><p>An additional TON or Ripple specific field to define the intended recipient or destination. </p><p><em>Note for Ripple (XRP): Required if the destination address has the "required" tag flag set on the blockchain.</em></p></td></tr><tr><td>description</td><td>String</td><td><code>max size = 300</code></td></tr><tr><td>callbackUrl</td><td>String</td><td>Custom callbackUrl for a payout, that can be differ from user settings</td></tr></tbody></table>

**Response body**

{% tabs %}
{% tab title="200 payout" %}

```json
{
   "id": "String",
   "status": "Integer",
   "statusName": "String",
   "fiatCurrency": "String",
   "fiatAmount": "String",
   "payCurrency": "String",
   "address": "String",
   "memo": "Integer",
   "createDate":"String",
   "modifiedDate":"String",
   "transactionId":"String",
   "withdrawalAmount":"String",
   "transferAmount":"String",
   "blockchainFee":"String",
   "payoutCommissionPercentage":"String",
   "isApiCalled":"Boolean",
   "description":"String",
   "merchantId":"String",
   "callbackUrl":"String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00",
    "message": "amountInPayCurrency: must not be null. "
}
```

{% endtab %}

{% tab title="422" %}
Field-level validation error: if amountInPayCurrency exceeds allowed decimal precision for the given currency.

```json
{
    "errors": {
        "amountInPayCurrency": "Max decimal scale for payCurrency `payout currency` is 6"
    },
    "status": 6
}
```

Insufficient funds to perform payout.

```json
{
    "errors": {
        "balance": "Not enough balance to create payout with amount `payout amount`. Available balance is `available amount` `payout currency`"
    },
    "status": 6
}
```

Invalid or incorrectly formatted address.

```json
{
    "errors": {
        "address": "The wallet address is invalid"
    },
    "status": 6
}
```

Transaction exceeds daily limits.

```json
{
    "errors": {
        "limit": "The daily limit has been exceeded."
    },
    "status": 6
}
```

Specific field validation error. ([Minimal limits](/introduction/confirmations-and-limits), etc)

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Withdrawal amount `payout amount` is below the minimum limit of `minimal limit` `payout currency`."
}
```

Blockchain related errors.

```json
{
    "error": "Internal Server Error",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Cannot create payout"
}
```

Ripple destination tag (memo) errors.

```json
{    
    "error": "Unprocessable Entity",
    "message": "memo is required for the requested address",
    "status": 422,
    "timestamp": "2026-07-16 06:37:14"
}
```

{% endtab %}

{% tab title="403" %}

In case of not existing parameters, incorrect headers, etc..

```json
Empty response
```

Similar for not whitelisted address in merchant settings

```json
{
    "error": "Forbidden",
    "status": 403,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Unauthorized access: IP address not in whitelist"
}
```

{% endtab %}

{% tab title="401" %}
In case of incorrect signature, api key or payload header

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="264.3333333333333"></th><th width="149"></th><th></th></tr></thead><tbody><tr><td><code>"id"</code></td><td><code>String</code></td><td>Payout id</td></tr><tr><td><code>"status"</code></td><td><code>BigDecimal</code></td><td>each out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"statusName"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>Cryptocurrency</td></tr><tr><td><code>"address"</code></td><td><code>String</code></td><td>Address is used to widthrawal</td></tr><tr><td><code>"memo"</code></td><td><code>Integer</code></td><td>Additional destination info</td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"transactionId"</code></td><td><code>String</code></td><td>Could be ignored for this API.</td></tr><tr><td><code>"withdrawalAmount"</code></td><td><code>String</code></td><td>Withdrawal amount</td></tr><tr><td><code>"transferAmount"</code></td><td><code>String</code></td><td>Transfer amount</td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Blockchain fee</td></tr><tr><td><code>"payoutCommissionPercentage"</code></td><td><code>String</code></td><td>Payout commission in percentage</td></tr><tr><td><code>"isApiCalled"</code></td><td><code>Boolean</code></td><td>Always true for this API</td></tr><tr><td><code>"fiatAmount"</code></td><td><code>String</code></td><td>Fiat amount of payout</td></tr><tr><td><code>"description"</code></td><td><code>String</code></td><td>Description</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant id</td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Fiat currency of payout</td></tr></tbody></table>

**Request curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/payouts/create' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "address": "<string>",
  "amountInPayCurrency": "<number>",
  "description": "<string>",
  "payCurrency": "<string>",
  "memo": "<Number>",
  "callbackUrl": "<String>"
}'
```

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/payouts/create' \
--header 'X-EX-APIKEY: test_api_key_123456' \
--header 'X-EX-PAYLOAD: eyJhZGRyZXNzIjogIjB4QWJjMTIzIiwgImFtb3VudEluUGF5Q3VycmVuY3kiOiAxMCwgImRlc2NyaXB0aW9uIjogIlRlc3QgcGF5b3V0IiwgInBheUN1cnJlbmN5IjogIkVUSCIsICJtZW1vIjogIjEyMzQ1IiwgImNhbGxiYWNrVXJsIjogImh0dHBzOi8vY2FsbGJhY2suZXhhbXBsZS5jb20ifQ==' \
--header 'X-EX-SIGNATURE: dummy_signature_abc123' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{
  "address": "0xAbc123",
  "amountInPayCurrency": 10,
  "description": "Test payout",
  "payCurrency": "ETH",
  "memo": "12345",
  "callbackUrl": "https://callback.example.com"
}'
```

<details>

<summary><strong>Amount Precision Limits</strong></summary>

For payout operations, the `amountInPayCurrency` field is subject to precision (decimal scale) limits that depend on the selected blockchain and cryptocurrency.

Each cryptocurrency supports a **maximum number of decimal places**. Values with a scale greater than the allowed limit will be rejected.

Below is the list of supported currencies and their maximum allowed decimal scale:

#### **Precision by Currency and Blockchain** <a href="#amount-precision-limit" id="amount-precision-limit"></a>

<table><thead><tr><th width="274.20001220703125">Currency</th><th>Precision</th></tr></thead><tbody><tr><td><strong>Bitcoin Network</strong></td><td></td></tr><tr><td>   BTC_BITCOIN</td><td>8</td></tr><tr><td><strong>Ethereum Network</strong></td><td></td></tr><tr><td>   ETH_ETHEREUM</td><td>18</td></tr><tr><td>   USDT_ETHEREUM</td><td>6</td></tr><tr><td>   USDC_ETHEREUM</td><td>6</td></tr><tr><td>   DAI_ETHEREUM</td><td>18</td></tr><tr><td><strong>Litecoin Network</strong></td><td></td></tr><tr><td>   LTC_LITECOIN</td><td>8</td></tr><tr><td><strong>Tron Network</strong></td><td></td></tr><tr><td>   TRX_TRON</td><td>6</td></tr><tr><td>   USDT_TRON</td><td>6</td></tr><tr><td><strong>Ripple Network</strong></td><td></td></tr><tr><td>   XRP_RIPPLE</td><td>6</td></tr><tr><td><strong>The Open Network</strong></td><td></td></tr><tr><td>   TON_TON</td><td>9</td></tr><tr><td>   USDT_TON</td><td>6</td></tr><tr><td><strong>Doge Network</strong></td><td></td></tr><tr><td>   DOGE_DOGECOIN</td><td>8</td></tr><tr><td><strong>Polygon Network</strong></td><td></td></tr><tr><td>   POL_POLYGON</td><td>18</td></tr><tr><td>   USDT_POLYGON</td><td>6</td></tr><tr><td>   USDC_POLYGON</td><td>6</td></tr><tr><td><strong>Arbitrum Network</strong></td><td></td></tr><tr><td>   ARB_ARBITRUM</td><td>18</td></tr><tr><td>   ETH_ARBITRUM</td><td>18</td></tr><tr><td>   USDT_ARBITRUM</td><td>6</td></tr><tr><td>   USDC_ARBITRUM</td><td>6</td></tr><tr><td><strong>Optimism Network</strong></td><td></td></tr><tr><td>   OP_OPTIMISM</td><td>18</td></tr><tr><td>   ETH_OPTIMISM</td><td>18</td></tr><tr><td>   USDT_OPTIMISM</td><td>6</td></tr><tr><td>   USDC_OPTIMISM</td><td>6</td></tr><tr><td><strong>BSC Network</strong></td><td></td></tr><tr><td>   BNB_BSC</td><td>18</td></tr><tr><td>   USDT_BSC</td><td>18</td></tr><tr><td>   USDC_BSC</td><td>18</td></tr><tr><td><strong>Solana Network</strong></td><td></td></tr><tr><td>   SOL_SOLANA</td><td>9</td></tr><tr><td>   USDT_SOLANA</td><td>6</td></tr><tr><td>   USDC_SOLANA</td><td>6</td></tr><tr><td><strong>Base Network</strong></td><td></td></tr><tr><td>   ETH_BASE</td><td>18</td></tr><tr><td>   USDC_BASE</td><td>6</td></tr></tbody></table>

**Notes**

* The precision limit applies **only to the number of decimal places**, not to the total amount.
* If the provided `amountInPayCurrency` exceeds the allowed decimal scale for the selected currency and blockchain, the request will fail validation.
* Clients should round or truncate values to the supported precision before submitting payout requests.

</details>


# Create fiat-to-crypto payout

Creates a payout from the user's wallet based on a specified fiat amount, automatically calculating the equivalent in a defined cryptocurrency.

<mark style="color:green;">`POST`</mark> `https://app.thedex.cloud/api/v1/payouts/fiat-to-crypto/create`

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

```json
{
  "fiatAmount": "Number",
  "fiatCurrency": "String",
  "payCurrency": "String",
  "address": "String",
  "memo": "Number",               // Optional
  "description": "String",        // Optional
  "callbackUrl": "String"         // Optional
}

```

**Request JSON attributes**

<table><thead><tr><th width="276">Name</th><th width="142">Type</th><th>Description</th></tr></thead><tbody><tr><td>fiatCurrency<mark style="color:red;">*</mark></td><td>String</td><td>Reach out accessed values to define attribute by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"fiatCurrencies"</code></td></tr><tr><td>payCurrency<mark style="color:red;">*</mark></td><td>String</td><td>Reach out accessed values to define attribute by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"payCurrencies"</code></td></tr><tr><td>fiatAmount<mark style="color:red;">*</mark></td><td>String</td><td>Amount in fiat currency that will be used to calculate the <code>"transferAmount"</code> based on the actual rate.</td></tr><tr><td>address<mark style="color:red;">*</mark></td><td>String</td><td>Address of  crypto wallet</td></tr><tr><td>memo</td><td>Integer</td><td>An additional TON or Ripple specific field to define the intended recipient or destination.</td></tr><tr><td>description</td><td>String</td><td><code>max size = 300</code></td></tr><tr><td>callbackUrl</td><td>String</td><td>Custom callbackUrl for a payout, that can be differ from user settings</td></tr></tbody></table>

**Response Body**

{% tabs %}
{% tab title="Response code 200 " %}

```json
{
   "id": "String",
   "status": "Integer",
   "statusName": "String",
   "fiatAmount": "String",
   "fiatCurrency": "String",
   "payCurrency": "String",
   "address": "String",
   "memo": "Integer",
   "createDate":"String",
   "modifiedDate":"String",
   "transactionId":"String",
   "withdrawalAmount":"String",
   "transferAmount":"String",
   "blockchainFee":"String",
   "payoutCommissionPercentage":"String",
   "rate":"String",
   "isApiCalled":"Boolean",
   "description":"String",
   "merchantId":"String",
   "callbackUrl":"String"
}
```

{% endtab %}

{% tab title="400" %}
General validation error: missing or malformed parameters.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-01 00:00:00",
    "message": "fiatAmount: must not be null. "
}
```

{% endtab %}

{% tab title="422" %}
Insufficient funds to perform payout.

```json
{
    "errors": {
        "balance": "Not enough balance to create payout with amount `payout amount`. Available balance is `available amount` `payout currency`"
    },
    "status": 6
}
```

Invalid or incorrectly formatted address.

```json
{
    "errors": {
        "address": "The wallet address is invalid"
    },
    "status": 6
}
```

Transaction exceeds daily limits.

```json
{
    "errors": {
        "limit": "The daily limit has been exceeded."
    },
    "status": 6
}
```

Specific field validation error. ([Minimal limits](/introduction/confirmations-and-limits), etc)

```json
{
    "error": "Unprocessable Entity",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Minimal limit amount doesn't exceed"
}
```

Blockchain related errors.

```json
{
    "error": "Internal Server Error",
    "status": 422,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Cannot create payout"
}
```

{% endtab %}

{% tab title="403" %}
In case of not existing parameters, incorrect headers, etc..

```json
Empty response
```

Similar for not whitelisted address in merchant settings

```json
{
    "error": "Forbidden",
    "status": 403,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Unauthorized access: IP address not in whitelist"
}
```

{% endtab %}

{% tab title="401" %}
In case of incorrect signature, api key or payload header

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="283.3333333333333"></th><th width="161"></th><th></th></tr></thead><tbody><tr><td><code>"id"</code></td><td><code>String</code></td><td>Payout id</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>each out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"statusName"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Fiat currency</td></tr><tr><td><code>"fiatAmount"</code></td><td><code>String</code></td><td>Amount in fiat currency</td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>Cryptocurrency</td></tr><tr><td><code>"address"</code></td><td><code>String</code></td><td>Address is used to widthrawal</td></tr><tr><td><code>"memo"</code></td><td><code>String</code></td><td>Additional destination info</td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"transactionId"</code></td><td><code>String</code></td><td>Could be ignored for this API.</td></tr><tr><td><code>"withdrawalAmount"</code></td><td><code>String</code></td><td>Withdrawal amount</td></tr><tr><td><code>"transferAmount"</code></td><td><code>String</code></td><td>Transfer amount</td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Blockchain fee</td></tr><tr><td><code>"payoutCommissionPercentage"</code></td><td><code>String</code></td><td>Payout commission in percentage</td></tr><tr><td><code>"rate"</code></td><td><code>String</code></td><td>Rate</td></tr><tr><td><code>"isApiCalled"</code></td><td><code>Boolean</code></td><td>Always true for this API</td></tr><tr><td><code>"description"</code></td><td><code>String</code></td><td>Description</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>MerchantId</td></tr><tr><td><code>"callbackUrl"</code></td><td><code>String</code></td><td>Custom callbackUrl for a payout, that can be differ from user settings</td></tr></tbody></table>

**Request curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/payouts/fiat-to-crypto/create' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "address": "<string>",
  "fiatAmount": "<string>",
  "fiatCurrency": "<string>",
  "payCurrency": "<string>",
  "description": "<string>",
  "memo": "<Number>",   
  "callbackUrl": "<string>" 
}'
```

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/payouts/fiat-to-crypto/create' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: eyJmaWF0QW1vdW50IjoxMjAwLCJmaWF0Q3VycmVuY3kiOiJNWE4iLCJwYXlDdXJyZW5jeSI6IlVTRFRfRVRIRVJFVU0iLCJhZGRyZXNzIjoiMHhlOWMwODAxRjdFYTNBNzFCRjBiYTRlMDI5MWQ4NTVBYTY3RmNkMkFiIiwibWVtbyI6IiIsImRlc2NyaXB0aW9uIjoiIiwiY2FsbGJhY2tVcmwiOiJodHRwczovL215LXNpdGUuY29tL2NhbGxiYWNrIn0=' \
--header 'X-EX-SIGNATURE: 4a1d9f9c4d8bfc304c8123abc1f1b7cf56ff1e1b724f6c1c7c2b9dbeb1e5f012' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "address": "0xe9c080SF7Ea3u71BF0ba4a0291d855Aa67Fcd2Aa",
  "fiatAmount": "1200",
  "fiatCurrency": "MXN",
  "payCurrency": "USDT_ETHEREUM",
  "description": "Monthly contractor payout",
  "memo": "",
  "callbackUrl": "https://my-site.com/callback"
}'
```


# Fetch payout

Returns the payout by “payoutId” attribute.

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

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

```json
{
    "payoutId": "String"
}
```

**Request JSON attributes**

| Name                                       | Type   | Description          |
| ------------------------------------------ | ------ | -------------------- |
| payoutId<mark style="color:red;">\*</mark> | String | ID of payout to find |

**Response Body**

{% tabs %}
{% tab title="200 payout" %}

```json
{
   "id": "String",
   "status": "Integer",
   "statusName": "String",
   "fiatCurrency": "String",
   "fiatAmount": "String",
   "payCurrency": "String",
   "address": "String",
   "fromAddress": "String",
   "memo": "Integer",
   "createDate":"String",
   "modifiedDate":"String",
   "transactionId":"String",
   "withdrawalAmount":"String",
   "transferAmount":"String",
   "blockchainFee":"String",
   "payoutCommissionPercentage":"String",
   "isApiCalled":"Boolean",
   "uniqueUserId":"String",
   "description":"String",
   "merchantId":"String",
   "callbackUrl":"String",
   "creationWay":"String"
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="326"></th><th width="116.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"id"</code></td><td><code>String</code></td><td>Payout id</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"statusName"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Fiat currency</td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>Cryptocurrency</td></tr><tr><td><code>"address"</code></td><td><code>String</code></td><td>Address is used to widthrawal</td></tr><tr><td><code>"memo"</code></td><td><code>Integer</code></td><td>Additional destination info</td></tr><tr><td><code>createDate</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"transactionId"</code></td><td><code>String</code></td><td>Transaction id</td></tr><tr><td><code>"withdrawalAmount"</code></td><td><code>String</code></td><td>Withdrawal amount</td></tr><tr><td><code>"transferAmount"</code></td><td><code>String</code></td><td>Transfer amount</td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Blockchain fee</td></tr><tr><td><code>"payoutCommissionPercentage"</code></td><td><code>String</code></td><td>Payout commission in percentage</td></tr><tr><td><code>"isApiCalled"</code></td><td><code>Boolean</code></td><td>Always true for this API</td></tr><tr><td><code>"uniqueUserId"</code></td><td><code>String</code></td><td>User UUID</td></tr><tr><td><code>"description"</code></td><td><code>String</code></td><td>Description</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant id</td></tr><tr><td><code>"callbackUrl"</code></td><td><code>String</code></td><td>Callback url</td></tr><tr><td><code>"creationWay"</code></td><td><code>String</code></td><td>How payout was created (e.g. with "API" , on "UI")</td></tr><tr><td><code>"fiatAmount"</code></td><td><code>String</code></td><td>Fiat amount of payout</td></tr><tr><td><code>"fromAddress"</code></td><td><code>String</code></td><td>Address from which payout was made</td></tr></tbody></table>

**Request Curl**

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

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/payouts/one' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: eyJwYXlvdXRJZCI6ICJmZTc1NzI2YS1lYjM1LTQ5ZWYtODJjNi0wOTgxMjM0NTY3ODkifQ==' \
--header 'X-EX-SIGNATURE: 9f3c1ea0b95a4e049a7b2a3c3d8f2c947e2b40d1886f2ab63fbc725d6fa95fbc' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "payoutId": "fe75726a-eb35-49ef-82c6-098123456789"
}'

```

**Possible errors**

<details>

<summary>Response code: 400</summary>

General validation error: malformed UUID parameter.

```json
{
    "error": "Bad Request",
    "status": 400,
    "timestamp": "2026-01-16 00:00:00",
    "message": "payoutId: Invalid UUID format",
    "path": "/api/v1/payouts/one"
}
```

</details>

<details>

<summary>Response code: 401</summary>

In case of incorrect signature, api key or payload header

```json
{
    "error": "Unauthorized",
    "status": 401,
    "timestamp": "2026-01-01 00:00:00",
    "message": "Request is not authorized"
}
```

</details>

<details>

<summary>Response code 500</summary>

In case if payout not exist.

```json
{
    "error": "Internal Server Error",
    "status": 500,
    "timestamp": "2026-01-16 04:22:25",
    "message": "Cannot get an payout"
}
```

</details>


# Fetch payouts

Returns a list of payouts created within the given time window (From/To).

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

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

```json
{
    "from": "Number", // timestamp
    "to": "Number" // timestamp
}
```

**Request JSON attributes**

<table><thead><tr><th>Name</th><th width="197">Type</th><th>Description</th></tr></thead><tbody><tr><td>from<mark style="color:red;">*</mark></td><td>Long</td><td>Timestamp (from) in milliseconds since Unix epoch</td></tr><tr><td>to<mark style="color:red;">*</mark></td><td>Long</td><td>Timestamp (to) in milliseconds since Unix epoch</td></tr></tbody></table>

**Response Body**

{% tabs %}
{% tab title="200 payout" %}

<pre class="language-json"><code class="lang-json"><strong>[
</strong><strong>{
</strong>   "id": "String",
   "status": "Integer",
   "statusName": "String",
   "fiatCurrency": "String",
   "payCurrency": "String",
   "fiatAmount": "String",
   "address": "String",
   "fromAddress": "String",
   "memo": "Integer",
   "createDate":"String",
   "modifiedDate":"String",
   "transactionId":"String",
   "withdrawalAmount":"String",
   "transferAmount":"String",
   "blockchainFee":"String",
   "payoutCommissionPercentage":"String",
   "isApiCalled":"Boolean",
   "uniqueUserId":"String",
   "description":"String",
   "merchantId":"String",
   "callbackUrl":"String",
   "creationWay":"String"
},

{...}

]
</code></pre>

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="326"></th><th width="116.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"id"</code></td><td><code>String</code></td><td>Payout id</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"statusName"</code></td><td><code>String</code></td><td>reach out all accessed values by link: <a href="/pages/z3ihQbPDAepeTxdumQ0z"><code>/api/v1/info/statuses</code></a></td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Fiat currency</td></tr><tr><td><code>"payCurrency"</code></td><td><code>String</code></td><td>Cryptocurrency</td></tr><tr><td><code>"address"</code></td><td><code>String</code></td><td>Address is used to widthrawal</td></tr><tr><td><code>"memo"</code></td><td><code>Integer</code></td><td>Additional destination info</td></tr><tr><td><code>createDate</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modification date</td></tr><tr><td><code>"transactionId"</code></td><td><code>String</code></td><td>Transaction id</td></tr><tr><td><code>"withdrawalAmount"</code></td><td><code>String</code></td><td>Withdrawal amount</td></tr><tr><td><code>"transferAmount"</code></td><td><code>String</code></td><td>Transfer amount</td></tr><tr><td><code>"blockchainFee"</code></td><td><code>String</code></td><td>Blockchain fee</td></tr><tr><td><code>"payoutCommissionPercentage"</code></td><td><code>String</code></td><td>Payout commission in percentage</td></tr><tr><td><code>"isApiCalled"</code></td><td><code>Boolean</code></td><td>Always true for this API</td></tr><tr><td><code>"uniqueUserId"</code></td><td><code>String</code></td><td>User UUID</td></tr><tr><td><code>"description"</code></td><td><code>String</code></td><td>Description</td></tr><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>Merchant id</td></tr><tr><td><code>"callbackUrl"</code></td><td><code>String</code></td><td>Callback url</td></tr><tr><td><code>"creationWay"</code></td><td><code>String</code></td><td>How payout was created (e.g. with "API" , on "UI")</td></tr><tr><td><code>"fiatAmount"</code></td><td><code>String</code></td><td>Fiat amount of payout</td></tr><tr><td><code>"fromAddress"</code></td><td><code>String</code></td><td>Address from which payout was made</td></tr></tbody></table>

\
**Request curl:**

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

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/payouts' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: eyJmcm9tIjoxNjg5MDAwMDAwMCwidG8iOjE2ODkwMDA4MDAwfQ==' \
--header 'X-EX-SIGNATURE: a1b2c3d4e5f67890123456789abcdef0123456789abcdef0123456789abcdef' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
  "from": 1689000000000,
  "to": 1689000800000
}'
```


# Swaps

### Swap Types

There are two types of swaps: **AUTO** and **MANUAL**.

* **MANUAL** swaps are conducted manually within the Merchant's Personal Account.
* **AUTO** swaps are configured in the cabinet. Once set up, an AUTO swap is automatically created upon a pay-in, depending on the specified monetary conditions.


# Fetch swaps

Returns a list of swaps created within the given time window (From/To).

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

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

```json
{
    "from": "Number", // timestamp
    "to": "Number" // timestamp
}
```

**Request JSON attributes**

<table><thead><tr><th>Name</th><th width="149">Type</th><th>Description</th></tr></thead><tbody><tr><td>from<mark style="color:red;">*</mark></td><td>Long</td><td>Timestamp (from) in milliseconds since Unix epoch</td></tr><tr><td>to<mark style="color:red;">*</mark></td><td>Long</td><td>Timestamp (to) in milliseconds since Unix epoch</td></tr></tbody></table>

**Response body**

{% tabs %}
{% tab title="200 swaps" %}

```json
[
    {
        "id": "String",
        "receiveMonetary": "String",
        "receiveAmount": "String",
        "send": [
            {
                "monetary": "String",
                "amount": "String",
                "amountWithRate": "String",
                "rate": "String",
                "balanceBefore": "String",
                "balanceAfter": "String"
            }
        ],
        "userSwapCommission": "Null/String",
        "uniqueUserId": "String",
        "statusName": "String",
        "status": "Integer",
        "createDate": "String",
        "modifiedDate": "String",
        "type": "String",
        "balanceBefore": "String",
        "balanceAfter": "String"
    }
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table><thead><tr><th></th><th width="190"></th><th></th></tr></thead><tbody><tr><td><code>"id"</code></td><td><code>String</code></td><td>Unique identifier</td></tr><tr><td><code>"receiveMonetary"</code></td><td><code>String</code></td><td>Received currency</td></tr><tr><td><code>"receiveAmount"</code></td><td><code>String</code></td><td>Received amount</td></tr><tr><td>"<code>userSwapCommission</code>"</td><td><code>String</code></td><td>User swap commission</td></tr><tr><td><code>"uniqueUserId"</code></td><td><code>String</code></td><td>Unique User ID</td></tr><tr><td><code>"status"</code></td><td><code>Integer</code></td><td>Swap status code</td></tr><tr><td><code>"statusName"</code></td><td><code>String</code></td><td>Swap status description</td></tr><tr><td><code>"createDate"</code></td><td><code>String</code></td><td>Creation date</td></tr><tr><td><code>"modifiedDate"</code></td><td><code>String</code></td><td>Modified date</td></tr><tr><td><code>"type"</code></td><td><code>String</code></td><td>Swap type (Auto or Manual)</td></tr><tr><td><code>"balanceBefore"</code></td><td><code>String</code></td><td>Balance of received monetary before swap</td></tr><tr><td><code>"balanceAfter"</code></td><td><code>String</code></td><td>Balance of received monetary after swap</td></tr><tr><td><code>"send"</code></td><td><code>Array</code></td><td>Sent currencies details</td></tr><tr><td><code>"send[0].monetary"</code></td><td><code>String</code></td><td>Sent currency</td></tr><tr><td><code>"send[0].amount"</code></td><td><code>String</code></td><td>Sent amount</td></tr><tr><td><code>"send[0].amountWithRate"</code></td><td><code>String</code></td><td>Amount with applied rate</td></tr><tr><td><code>"send[0].rate"</code></td><td><code>String</code></td><td>Rate</td></tr><tr><td><code>"send[0].balanceBefore"</code></td><td><code>String</code></td><td>Balance of send monetary before swap</td></tr><tr><td><code>"send[0].balanceAfter"</code></td><td><code>String</code></td><td>Balance of send monetary after swap</td></tr></tbody></table>

**Curl request**

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

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/swaps' \
--header 'X-EX-APIKEY: test_api_key_123456' \
--header 'X-EX-PAYLOAD: eyJmcm9tIjoxNjAyODAwMDAwMCwidG8iOjE2MDI4MDYwMDAwfQ==' \
--header 'X-EX-SIGNATURE: dummy_signature_abc123' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{
  "from": 1602800000000,
  "to": 1602806000000
}'
```


# Balances


# Fetch all user balances

Shows all balances of all merchants are owned by the user.

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

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

```
{ }
```

**Request JSON attributes**

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

**Response body**

{% tabs %}
{% tab title="200 list of maps of pay currency to balance" %}

```json
{
   [
      "$PAY_CURRENCY_VALUE":{
         "totalBalance":"String",
         "holdBalance":"String",
         "availableBalance":"String"
      }
   ]
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="248"></th><th width="131.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>$PAY_CURRENCY_VALUE</code></td><td><code>attribute name</code></td><td>reach out to accessed values to define attributes by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"payCurrencies"</code></td></tr><tr><td><code>"totalBalance"</code></td><td><code>String</code></td><td>Sum of hold and available balances.</td></tr><tr><td><code>"holdBalance"</code></td><td><code>String</code></td><td>Temporary kept balance until balance will be unlocked.</td></tr><tr><td><code>"availableBalance"</code></td><td><code>String</code></td><td>Available balance to withdrawal</td></tr></tbody></table>

**Request curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/balances' \
--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/balances' \
--header 'X-EX-APIKEY: test_api_key_123456' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: dummy_signature_abc123' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{}'
```


# Informational


# Fetch status definitions for Invoice and payout

Returns a list of all statuses for invoices and payouts

<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 '{}'
```


# Fetch active crypto and fiat currencies

Returns a list of all active crypto and fiat currencies used in invoice and payout processing

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

#### More detailed information about currencies can be found here

{% content-ref url="/pages/2scIKDTJ6MR7gGKOzrbm" %}
[Currencies and networks](/introduction/currencies-and-networks)
{% endcontent-ref %}

#### 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 fiat and cryptocurrencies" %}

```json
{
    "fiatCurrencies": [
        "USD",
        "EUR",
        "UAH",
        "KZT",
        "PLN",
        "ARS",
        "INR",
        "GBP",
        "BRL",
        "TRY",
        "ZAR",
        "AZN",
        "CZK",
        "MXN",
        "EGP",
        "CLP",
        "HUF",
        "COP",
        "KRW",
        "DKK",
        "NZD",
        "NOK",
        "SEK",
        "CHF",
        "AUD",
        "CAD",
        "PKR"
    ],
    "payCurrencies": [
        "BTC_BITCOIN",
        "ETH_ETHEREUM",
        "USDT_ETHEREUM",
        "USDC_ETHEREUM",
        "DAI_ETHEREUM",
        "TRX_TRON",
        "USDT_TRON",
        "LTC_LITECOIN",
        "BNB_BSC",
        "USDT_BSC",
        "USDC_BSC",
        "TON_TON",
        "DOGE_DOGECOIN",
        "POL_POLYGON",
        "USDT_POLYGON",
        "USDC_POLYGON",
        "ETH_ARBITRUM",
        "USDT_ARBITRUM",
        "ARB_ARBITRUM",
        "USDC_ARBITRUM",
        "ETH_BASE",
        "USDC_BASE",
        "SOL_SOLANA",
        "USDT_SOLANA",
        "USDC_SOLANA",
        "XRP_RIPPLE",
        "USDT_TON"
    ]
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="276.3333333333333"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Definition</strong></td></tr><tr><td><code>"fiatCurrencies"</code></td><td><code>String array</code></td><td>Active fiat currencies that can be used in invoice creation</td></tr><tr><td><code>"payCurrencies"</code></td><td><code>String array</code></td><td>Active fiat currencies that can be used in invoice / payout creation</td></tr></tbody></table>

\
**Request Curl**

<pre class="language-powershell"><code class="lang-powershell"><strong>curl --location --request POST 'https://app.thedex.cloud/api/v1/info/currencies' \
</strong>--header 'X-EX-APIKEY: &#x3C;string>' \
--header 'X-EX-PAYLOAD: &#x3C;string>' \
--header 'X-EX-SIGNATURE: &#x3C;string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
</code></pre>

**Example Curl**

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

```


# Fetch cryptocurrency to fiat-currency rate

Returns a list of available conversion rates between supported cryptocurrencies and fiat currencies.

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

#### 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 crypto to fiat currency rate" %}

```json
{
   [
      {
         "monetary": "String",
         "rates":[
            {
               "fiatCurrency": "String",
               "rate": "BigDecimal"
            }
         ]
      }
   ]
}
```

Example:

```json
{
   [
      {
         "monetary":"BTC_BITCOIN",
         "rates":[
            {
               "fiatCurrency":"USD",
               "rate":"22890.06000000"
            },
            {
               "fiatCurrency":"EUR",
               "rate":"20601.05400000"
            },
            {
               "fiatCurrency":"UAH",
               "rate":"922469.41800000"
            }
         ]
      },
      {
         "monetary":"ETH_ETHEREUM",
         "rates":[
            {
               "fiatCurrency":"USD",
               "rate":"1571.64000000"
            },
            {
               "fiatCurrency":"EUR",
               "rate":"1414.47600000"
            },
            {
               "fiatCurrency":"UAH",
               "rate":"63337.09200000"
            }
         ]
      }
   ]
}
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="195"></th><th width="140.33333333333331"></th><th></th></tr></thead><tbody><tr><td><code>"monetary"</code></td><td><code>String</code></td><td>The pay-currency (also mentions as crypto-currency) name is used as the title of fiat currency rates. Reach out to accessed values to define attributes by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"payCurrencies"</code></td></tr><tr><td><code>"rates"</code></td><td><code>Object array</code></td><td>Array of fiat currency rates.</td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Fiat currency. Reach out to accessed values to define attributes by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"fiatCurrencies"</code></td></tr><tr><td><code>"rate"</code></td><td><code>BigDecimal</code></td><td><code>"monetary"</code> to <code>"fiatCurrency"</code> rate.</td></tr></tbody></table>

**Request Curl**

<pre class="language-powershell"><code class="lang-powershell"><strong>curl --location --request POST  'https://app.thedex.cloud/api/v1/info/user/currencies/crypto' \
</strong>--header 'X-EX-APIKEY: &#x3C;string>' \
--header 'X-EX-PAYLOAD: &#x3C;string>' \
--header 'X-EX-SIGNATURE: &#x3C;string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
</code></pre>

Example Curl

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


# Fetch fiat currency amount limits on invoice creation

Returns a list of fiat currency limits (minimum ) applicable when creating an invoice.

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

#### 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 amount limitations in fiat currency" %}

```json
[
   {
      "fiatCurrency": "String",
      "minimalLimit": "String"
   }
]
```

Example:

```json
[
   {
      "fiatCurrency": "USD",
      "minimalLimit": "0.5000"
   },
   {
      "fiatCurrency": "EUR",
      "minimalLimit": "0.5000"
   },
   {
      "fiatCurrency": "UAH",
      "minimalLimit": "20.0000"
   }
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="231"></th><th width="127.33333333333331"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Requirenments</strong></td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Fiat currency. Reach out to accessed values to define attributes by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"fiatCurrencies"</code></td></tr><tr><td><code>"minimalLimit"</code></td><td><code>String</code></td><td>Minimal limit in fiat currency to create invoice.</td></tr></tbody></table>

**Request Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/info/invoice/limit/fiat' \
--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/invoice/limit/fiat' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8g9h0i1j2k3l4m5n6o7p8q9r0s1t2' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
```


# Fetch fiat currency amount limits on payout creation

Returns a list of fiat currency limits (minimum ) applicable when creating a payout.                     Note: this endpoint is needed only in case of use fiat-to-crypto payouts

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

#### 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 amount limitations in fiat currency" %}

```json
[
   {
      "fiatCurrency": "String",
      "minimalLimit": "String"
   }
]
```

Example:

```json
[
   {
      "fiatCurrency": "USD",
      "minimalLimit": "0.5000"
   },
   {
      "fiatCurrency": "EUR",
      "minimalLimit": "0.5000"
   },
   {
      "fiatCurrency": "UAH",
      "minimalLimit": "20.0000"
   }
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="231"></th><th width="127.33333333333331"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Requirements</strong></td></tr><tr><td><code>"fiatCurrency"</code></td><td><code>String</code></td><td>Fiat currency. Reach out to accessed values to define attributes by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"fiatCurrencies"</code></td></tr><tr><td><code>"minimalLimit"</code></td><td><code>String</code></td><td>Minimal limit in fiat currency to create invoice.</td></tr></tbody></table>

**Request Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/info/payout/limit/fiat' \
--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/payout/limit/fiat' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8g9h0i1j2k3l4m5n6o7p8q9r0s1t2' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
```


# Fetch cryptocurrency amount limits on invoice creation

Returns a list of cryptocurrency amount limits (minimum) applicable when creating an invoice.

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

#### 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 amount limitations in cryptocurrency" %}

```json
[
   {
      "monetary": "String",
      "minimalLimit": "String"
   }
]
```

Example:

```json
[
   {
      "monetary": "BTC_BITCOIN",
      "minimalLimit": "0.000025000"
   },
   {
      "monetary": "ETH_ETHEREUM",
      "minimalLimit": "0.000350000"
   }
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="193.33333333333331"></th><th width="133"></th><th></th></tr></thead><tbody><tr><td><code>"monetary"</code></td><td><code>String</code></td><td>The pay-currency (also mentions as crypto-currency) name is used as title of fiat currency rates. Reach out accessed values to define attribute by link: <a href="/pages/T8Adh6BIVE4Ma5SN3zSc"><code>/api/v1/info/currencies</code></a><br>attribute <code>"payCurrencies"</code></td></tr><tr><td><code>"minimalLimit"</code></td><td><code>String</code></td><td>Minimal limit in crypto currency to create invoice.</td></tr></tbody></table>

**Request curl:**&#x20;

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/info/invoice/limit/crypto' \
--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/invoice/limit/crypto' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: 123abc456def7890abcdef1234567890abcdef1234567890abcdef1234567890' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
```


# Fetch cryptocurrency amount limits on payout creation

Returns a list of cryptocurrency amount limits (minimum) applicable when creating a payout.

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

#### 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 amount limitations in cryptocurrency" %}

```json
[
   {
      "monetary": "String",
      "minimalLimit": "String"
   }
]
```

Example:

```json
[
   {
      "monetary": "BTC_BITCOIN",
      "minimalLimit": "0.000025000"
   },
   {
      "monetary": "ETH_ETHEREUM",
      "minimalLimit": "0.000350000"
   }
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="193.33333333333331"></th><th width="133"></th><th></th></tr></thead><tbody><tr><td><code>"monetary"</code></td><td><code>String</code></td><td>The pay-currency (also mentioned as crypto-currency) </td></tr><tr><td><code>"minimalLimit"</code></td><td><code>String</code></td><td>Minimal limit in crypto currency to create payout.</td></tr></tbody></table>

**Request Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/info/payout/limit/crypto' \
--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/payout/limit/crypto' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: 123abc456def7890abcdef1234567890abcdef1234567890abcdef1234567890' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{ }'
```


# Fetch Invoice creation ways

Returns a list of all ways on invoice creation

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

#### 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 creation ways" %}

```json
[
   {
      "name":"String",
      "value":"Integer"
   }
]
```

Example:

```json
[
    {
        "name": "UI",
        "value": 0
    },
    {
        "name": "API",
        "value": 1
    },
    {
        "name": "MERCHANT",
        "value": 2
    },
    {
        "name": "WALLET_STATIC",
        "value": 3
    },
    {
        "name": "PAYMENT_BUTTON_WAY",
        "value": 4
    },
    {
        "name": "DONATION_BUTTON_WAY",
        "value": 5
    },
    {
        "name": "EMAIL_CONFIRM_WAY",
        "value": 6
    },
    {
        "name": "SWAP",
        "value": 7
    },
    {
        "name": "USER_WALLET",
        "value": 8
    },
    {
        "name": "DOUBLE_PAY",
        "value": 9
    },
    {
        "name": "SELF_WALLET",
        "value": 10
    },
    {
        "name": "ANOTHER_CURRENCY",
        "value": 11
    }
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

| `"name"`  | `String`  | Name of invoice creation way |
| --------- | --------- | ---------------------------- |
| `"value"` | `Integer` | Index of creation way        |

**Request Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/info/invoice/creation/ways' \
--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/invoice/creation/ways' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: 123abc456def7890abcdef1234567890abcdef1234567890abcdef1234567890' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{ }'
```


# Commissions


# Fetch payout commissions

Shows all commissions on payout creation for the requested user

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

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

```
{ }
```

**Request JSON attributes**

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

**Response Body**

{% tabs %}
{% tab title="200 list of monetary-related commissions for the requested user" %}

```json
{
   "userPayoutCommission": Number,
   "payoutBlockchainFee":[
      {
         "monetary": "String",
         "blockchainFee": Number
      }, 
      ...
   ]
}

```

{% endtab %}
{% endtabs %}

**Response JSON attributes:**

<table data-header-hidden><thead><tr><th width="394"></th><th width="152.33333333333331"></th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td><strong>Type</strong></td><td><strong>Description</strong></td></tr><tr><td><code>"userPayoutCommission"</code></td><td><code>Number</code></td><td>Payout commission of User</td></tr><tr><td><code>"payoutBlockchainFee"</code></td><td><code>JSON Array</code></td><td>An array of blockchainFee by monetary</td></tr><tr><td><code>"payoutBlockchainFee.monetary"</code></td><td><code>String</code></td><td>payCurrency (monetary)</td></tr><tr><td><code>"payoutBlockchainFee.blockchainFee"</code></td><td><code>Number</code></td><td>Blockchain fee that will be withdrawn from user balance by monetary</td></tr></tbody></table>

**Request curl:**&#x20;

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/commissions/payout' \
--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/commissions/payout' \
--header 'X-EX-APIKEY: test_api_key_123456' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: dummy_signature_abc123' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{}'
```


# Fetch invoice commissions

Shows merchant-related (invoices) commissions.

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

#### 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)**

```
{ }
```

**Request JSON attributes**

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

**Response body**

{% tabs %}
{% tab title="200 invoice commissions" %}

```json
{
   "merchantId": "String",
   "amountInPayCurrencyCommission": Number,
   "merchantIncomingCommission": Number,
   "depositBlockchainFeeType": "String",
   "monetaries":[
      {
         "monetary":"String",
         "rateCommission": Number,
         "depositBlockchainFee":Number,
         "complexCommission": Number
      },
      ...
   ]
}

```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table data-header-hidden><thead><tr><th width="388.3333333333333"></th><th width="137"></th><th></th></tr></thead><tbody><tr><td><code>"merchantId"</code></td><td><code>String</code></td><td>ID Merchant</td></tr><tr><td><code>"amountInPayCurrencyCommission"</code></td><td><code>Number</code></td><td>Amount in pay currency commission</td></tr><tr><td><code>"merchantIncomingCommission"</code></td><td><code>Number</code></td><td>Merchant incoming comission</td></tr><tr><td><code>"depositBlockchainFeeType"</code></td><td><code>String</code></td><td>Possible values: CLIENT or MERCHANT</td></tr><tr><td><code>"monetaries"</code></td><td><code>JSON Array</code></td><td>Array of invoice commission by monetary</td></tr><tr><td><code>"monetaries.monetary"</code></td><td><code>String</code></td><td>Monetary (payCurrency)</td></tr><tr><td><code>"monetaries.rateCommission"</code></td><td><code>Number</code></td><td>Rate commission</td></tr><tr><td><code>"monetaries.depositBlockchainFee"</code></td><td><code>Number</code></td><td>Deposit blockchain fee by payCurrency</td></tr><tr><td><code>"monetaries.complexCommission"</code></td><td><code>Number</code></td><td>Complex commission (if set)</td></tr></tbody></table>

**Request curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/commissions/invoice' \
--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/commissions/invoice' \
--header 'X-EX-APIKEY: test_api_key_123456' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: dummy_signature_abc123' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{}'

```


# Merchant Preferences


# Fetch merchant wallet whitelist

Returns a list of wallets, that are whitelisted for current merchant, only if "Payout API access" enabled in merchant preferences.

<mark style="color:green;">`POST`</mark> `https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets`

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

```
{ }
```

**Request JSON attributes**

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

**Response Body**

{% tabs %}
{% tab title="200 merchant wallet whitelist" %}

```json
[
   "wallet_address_1",
   "wallet_address_2",
   ...
]
```

{% endtab %}
{% endtabs %}

**Response JSON attributes**

<table><thead><tr><th>Name</th><th width="149">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>"wallet_address"</code></td><td><code>"String"</code></td><td>Address of wallet that is whitelisted</td></tr></tbody></table>

**Request Curl**&#x20;

```powershell
curl --location 'https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets' \
--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/preferences/merchant/whitelist/wallets' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: e30=' \
--header 'X-EX-SIGNATURE: 123abc456def789ghi012jkl345mno678pqr901stu234vwx567yz890' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{}'
```


# Add wallet to whitelist

Adds specific wallet to whitelist, only if "Payout API access" enabled in merchant preferences

<mark style="color:green;">`POST`</mark> `https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets/add`

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

```json
{ 
    "wallet":"String"
}
```

**Request JSON attributes**

| Name                                     | Type   | Description    |
| ---------------------------------------- | ------ | -------------- |
| wallet<mark style="color:red;">\*</mark> | String | Wallet address |

**Response Body (Empty JSON)**

{% tabs %}
{% tab title="200 OK" %}

{% endtab %}

{% tab title="400: Bad Request Api access included preference is turned off. Please turn on it!" %}

{% endtab %}
{% endtabs %}

**Response JSON attributes**

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

**Request Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets/add' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
    "wallet": "wallet_address"
}'
```

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets/add' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: eyJ3YWxsZXQiOiAiMHhlOWMwODAxRjdFYTNBNzFCRjBiYTRlMDI5MWQ4NTVBYTY3RmNkMkFiIn0=' \
--header 'X-EX-SIGNATURE: 8f92bcabc4ff1b3a7df6e2dc2e1bcee24d2f2c791bb7b8ec6d5b5c2e9fa32e1c' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
    "wallet": "0xe9c0801F7Ea3A71BF0ba4e0291d855Aa67Fcd2Ab"
}'
```


# Remove wallet from whitelist

Deletes specific wallet from whitelist by wallet\_address, only if "Payout API access" enabled in merchant preferences

<mark style="color:green;">`POST`</mark> `https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets/delete`

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

```json
{ 
    "wallet":"String"
}
```

**Request JSON attributes**

| Name                                     | Type   | Description    |
| ---------------------------------------- | ------ | -------------- |
| wallet<mark style="color:red;">\*</mark> | String | Wallet address |

**Response Body (Empty JSON)**

{% tabs %}
{% tab title="200 OK" %}

{% endtab %}

{% tab title="400: Bad Request Api access included preference is turned off. Please turn on it!" %}

{% endtab %}
{% endtabs %}

**Response JSON attributes**

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

**Request Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets/delete' \
--header 'X-EX-APIKEY: <string>' \
--header 'X-EX-PAYLOAD: <string>' \
--header 'X-EX-SIGNATURE: <string>' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
    "wallet": "wallet_address"
}'
```

**Example Curl**

```powershell
curl --location --request POST 'https://app.thedex.cloud/api/v1/preferences/merchant/whitelist/wallets/delete' \
--header 'X-EX-APIKEY: abcd1234apikeyexample' \
--header 'X-EX-PAYLOAD: eyJ3YWxsZXQiOiAiMHhlOWMwODAxRjdFYTNBNzFCRjBiYTRlMDI5MWQ4NTVBYTY3RmNkMkFiIn0=' \
--header 'X-EX-SIGNATURE: 8f92bcabc4ff1b3a7df6e2dc2e1bcee24d2f2c791bb7b8ec6d5b5c2e9fa32e1c' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data '{
    "wallet": "0xe9c0801F7Ea3A71BF0ba4e0291d855Aa67Fcd2Ab"
}'
```


# WHMCS

Crypto Payment Integration for WHMCS

### [⬇️ Download WHCMS Plugin](https://thedex.cloud/cms/thedex-whmcs-plugin.zip)

## Installing Thedex cryptocurrency payment gateway for WHMCS

### Installing the plugin:

1. Unzip the downloaded [archive ](https://thedex.cloud/cms/thedex-whmcs-plugin.zip)to your computer or hosting.
2. Move all files and subfolders from `thedex-whmcs-plugin` into: *`WHMCS` → `modules` → `gateways`*.

### Setting up Thedex Payment Gateway for WHMCS

1. Log in to your [Thedex](https://thedex.cloud/) account and create a Merchant for your business, then generate an API key. If you don't have an account, sign up for one.
2. In the upper right corner, find the wrench icon.
3. Hover over it and select **System Settings** in the pop-up menu, and then **Apps & Integrations**.\
   \\

   <figure><img src="/files/oy6JR6jXIscuKxmYOpNB" alt=""><figcaption></figcaption></figure>
4. Go to the **Search** tab and type **Thedex** in the search.\
   \\

   <figure><img src="/files/FGxPCrFF4oIqP08exuRH" alt=""><figcaption></figcaption></figure>
5. Enter the Merchant ID and API key data in the appropriate fields on the Thedex module settings page for WHMCS.\ <br>

   <figure><img src="/files/uMR7fbExjq3kje0w1BLN" alt=""><figcaption></figcaption></figure>
6. Thedex payment gateway is ready to use.


# WooCommerce (WordPress)

## ⬇️[ Download WordPress Plugin](https://thedex.cloud/cms/thedex-woocommerce-plugin.zip)

## Installing Thedex cryptocurrency payment gateway for WordPress

1. Make sure the WooCommerce plugin is installed and activated.
2. Navigate to the Plugins → Add plugin tab in your WordPress admin dashboard.<br>

   <figure><img src="/files/MMYmPMcbd2ijOTiVd0xV" alt=""><figcaption></figcaption></figure>
3. Upload a plugin and click Install Now.<br>

   <figure><img src="/files/Oggn4lpYfUdivDdf6iYO" alt=""><figcaption></figcaption></figure>
4. Activate plugin<br>

   <figure><img src="/files/q1xled5UHS0qPwssxLAe" alt=""><figcaption></figcaption></figure>
5. Go to Plugins → Installed Plugins, find Thedex plugin, and press “Configure”.<br>

   Configuration Steps:

   1. Enable the plugin by checking the Enabled box.
   2. Fill in the following fields using credentials from your Merchant Cabinet:
      * Merchant API Key
      * Merchant Secret Key
      * Merchant ID
   3. Click Save changes to apply the configuration.<br>

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

      <figure><img src="/files/AB0doiq9ci2tFMB1lst3" alt=""><figcaption></figcaption></figure>
6. To ensure successful callback processing:
   1. Go to Settings → Permalinks
   2. Select the “Post name” option as the permalink structure
   3. Click Save Changes
7. Thedex payment gateway is ready to use.


