> For the complete documentation index, see [llms.txt](https://docs.nonstopay.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nonstopay.net/payin-api-documentation/ii-how-to-use-the-api/create-invoice-crypto-post.md).

# Create invoice CRYPTO (POST)

POST

## REQUEST

The query is an HTTP <mark style="color:blue;">**POST**</mark> request where your provided api key will be used as an http header.

{% tabs %}
{% tab title="END POINT" %}
<https://usdc.nonstopay.net/api/btn-create-invoice/get/>
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="HEADERS" %}
API-KEY (Use the api key we’ve sent to you here).&#x20;
{% endtab %}

{% tab title="Example" %}
“API-KEY: 0d8d8e89a6cdcd”
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="BODY PARAMS" %}

<table><thead><tr><th width="210">parameter name</th><th width="299">Example (type)</th><th>Info</th></tr></thead><tbody><tr><td>email</td><td>aaaaaa@domain.fr</td><td>The email of your customer</td></tr><tr><td>amount</td><td>15.04 or 42</td><td>point “.” is a decimal symbol</td></tr><tr><td>devise</td><td>USD</td><td>This is the currency to be used. Set it to USD. You’ll need to do the exchange on your side to USD if you use another currency</td></tr><tr><td>payableCurrencies (Mandatory in S2S)</td><td>String | null</td><td>Payable currencies value (Exp: USDT_polygon)<br><br><a href="/payment-crypto-greater-than-payable-currencies-value-list.md">Here the full list</a></td></tr><tr><td>success_url (optional)</td><td><a href="https://usdc.nonstopay
.net/service/pay/succe
ss/">https://usdc.nonstopay.net/service/pay/success/</a></td><td>After successful payment.. we will redirect the payment page to the page of this URL</td></tr><tr><td>cancel_url (optional)</td><td><a href="https://docs.nonstopay.net/">https://usdc.nonstopay.net/service/pay/cancel/</a></td><td>After canceled payment. we will redirect the payment page to the page of this URL</td></tr><tr><td>failure_url (optional)</td><td>String | null</td><td>After failed or decline payment.. we will redirect the payment page to the page of this URL</td></tr><tr><td>callbackJson (optional)</td><td><p>Data type : json</p><p>Eg : {txId : qktr12eqzg, status : sfrt}</p></td><td>Merchant Data.<br>After successful or canceled payment. we send it to you through the callback url.</td></tr><tr><td>payment_solution_type<br>(optional)</td><td>CARD or UPI or CRYPTO<br><br><em>You can see how to retrieve them via this menu:</em> <a href="/payin-api-documentation/ii-how-to-use-the-api/get-available-payment-solution-type-get.md"><em>Get available payment solution type (GET)</em></a></td><td>To be completed only with the agreement of technical support</td></tr><tr><td>payment_solution_name<br>(optional)</td><td>List of available payment solutions you can use<br><br><em>You can see how to retrieve them via this menu:</em> <a href="/payin-api-documentation/ii-how-to-use-the-api/get-available-payment-solution-name-get.md"><em>Get available payment solution name (GET)</em></a></td><td>To be completed only with the agreement of technical support</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

***

## RESPONSE

<mark style="color:yellow;">Our service will return a JSON object.</mark>

<details>

<summary>For Errors : </summary>

* **50001** : *API-KEY required*
* **50002** : *email required*
* 50003 : *amount required*
* 50004 : *devise required*
* **50005** : *invalid email address*
* **50006** : *this API-KEY can not use this API from this IP address*
* 50007 : *invalid API-KEY*
* **50008** : *You cannot create a sale because your wallet is being validated and activated.You will receive a confirmation email as soon as the treatment process is completed.While waiting for the final activation, you can still change it from* [*https://usdc.nonstopay.net/client/profile*](#for-errors) *the profile page*
* **50009** : *invalid devise*
* **50010** : *No IP is linked to your account. Please enter them in your profile page and API block*
* **50011** : *Your amount is ABOVE the allowed maximum amount*
* 50012 : *Your amount is BELOW the allowed minimum amount*

</details>

#### Example :&#x20;

```json
{ “errorCode”: 50003, “errorMessage” : “amount required” }
```

<details>

<summary>Success Response : </summary>

* &#x20;0 : &#x20;
  * \- redirectUrl : URL\_TO\_PAY

    Use this url if you plan an automated redirection and with S2S direct to valid 3D secure

    \- html :

    Use this to integrate as an html link on your page. It does not exists in S2S direct

    With S2S direct integration we also send :

    \- status : Transaction Status

    \- ID : Transation ID

</details>

#### Example :&#x20;

```json
{
 “errorCode”: 0,
 “redirectUrl”:
“https://usdc.nonstopay.net/widget/sale/create/?token=cyR0YnNOeG99MTE3WW9ne
C56IFc6Q28gR1BHdG83W3FDMzhlfi1WKmpNSUlPfSNTfVh2fTxaUnpES3omZWYqJCRwf3t4fyg%
2BMX90aWt0cWFVdG5pYWo7cXV8MSYmcmZ6dGNhPyInPyFsbXB8YX8zKSg2MSc3ZHVldGp0Z2pnZ
llxc250MTBqZmd5fA%3D%3D”,
 “html”:“<a
href='https://usdc.nonstopay.net/widget/sale/create/?token=cyR0YnNOeG99MTE3
WW9neC56IFc6Q28gR1BHdG83W3FDMzhlfi1WKmpNSUlPfSNTfVh2fTxaUnpES3omZWYqJCRwf3t
4fyg%2BMX90aWt0cWFVdG5pYWo7cXV8MSYmcmZ6dGNhPyInPyFsbXB8YX8zKSg2MSc3ZHVldGp0
Z2pnZllxc250MTBqZmd5fA%3D%3D'></a>”
}
```
