# 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.md) 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.md)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| 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.md), 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>


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://docs.thedex.cloud/documentation/invoices/deprecated/create-quick-invoice.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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