Invoice Creation

Detailed description of the request to create an invoice.

In order to create an invoice, you need to send a POST request.

Invoice creation

POST https://api.cryptocloud.plus/v2/invoice/create

Query Parameters

Name
Type
Description

locale

string

?locale=en, ?locale=ru

Headers

Name
Type
Description

Authorization*

string

Token <API KEY>

Request Body

Name
Type
Description

shop_id*

string

Unique identifier of the store from personal account

amount*

decimal

Payment amount in USD

currency

string

Available currencies for conversion: USD, UZS, KGS, KZT, AMD, AZN, BYN, AUD, 'TRY', AED, CAD, CNY, HKD, IDR, INR, INR, JPY, PHP, SGD, THB, VND, MYR, RUB, UAH, EUR, GBP. The default currency is USD

add_fields

dict

Additional parameters

order_id

string

Arbitrary invoice number in the external system.

email

string

Email address of the customer

{
    "status": "success",
    "result": {
        "uuid": "INV-XXXXXXXX",
        "created": "2023-01-01 12:00:00.000000",
        "address": "",
        "expiry_date": "2023-01-02 12:00:00.000000",
        "side_commission": "client",
        "side_commission_cc": "client",
        "amount": 100.0,
        "amount_usd": 100.0,
        "amount_in_fiat": 100.0,
        "fee": 1.4,
        "fee_usd": 1.4,
        "service_fee": 1.9,
        "service_fee_usd": 1.9,
        "type_payments": "crypto",
        "fiat_currency": "USD",
        "status": "created",
        "is_email_required": false,
        "link": "https://pay.cryptocloud.plus/XXXXXXXX",
        "invoice_id": null,    
        "currency": {
            "id": 4,
            "code": "USDT",
            "fullcode": "USDT_TRC20",
            "network": {
                "code": "TRC20",
                "id": 4,
                "icon": "https://cdn.cryptocloud.plus/currency/crypto/TRX.svg",
                "fullname": "Tron"
            },
            "name": "Tether",
            "is_email_required": false,
            "stablecoin": true,
            "icon_base": "https://cdn.cryptocloud.plus/currency/icons/main/usdt.svg",
            "icon_network": "https://cdn.cryptocloud.plus/icons-currency/USDT-TRC20.svg",
            "icon_qr": "https://cdn.cryptocloud.plus/currency/icons/stroke/usdt.svg",
            "order": 1
        },
        "project": {
            "id": 1,
            "name": "TestShop",
            "fail": "https://TestShop.com/fail",
            "success": "https://TestShop.com/success",
            "logo": "None"
        },
        "test_mode": false
    }
}

Parameters description

Parameter name
Data type
Value
Example

shop_id

String

xBAivfPIbskwuEWj

amount

Float, String

100.5, "100.5"

currency

String

'USD', 'UZS', 'KGS', 'KZT', 'AMD', 'AZN', 'BYN', 'AUD', 'TRY', 'AED', 'CAD', 'CNY', 'HKD', 'IDR', 'INR', 'JPY', 'PHP', 'SGD', 'THB', 'VND', 'MYR', 'RUB', 'UAH', 'EUR', 'GBP'

USD

add_fields

Dict

Additional invoice creation parameters. Detailed description below.

Additional parameters description

Parameter name
Data type
Value
Example
Description

time_to_pay

Dict

{ "hours": 24, "minutes": 0 }

Invoice due time

email_to_send

String

email@gmail.com

If you specify an email in the parameter, the invoice will be automatically sent to this email.

available_currencies

List[String]

USDT_TRC20, USDC_TRC20, TUSD_TRC20, USDT_ERC20, USDC_ERC20, TUSD_ERC20, BTC, LTC, ETH

[ "USDT_TRC20", "ETH", "BTC" ]

Payment currencies

cryptocurrency

String

USDT_TRC20, USDC_TRC20, TUSD_TRC20, USDT_ERC20, USDC_ERC20, TUSD_ERC20, BTC, LTC, ETH

ETH

Select the payment currency for the user. The details will be displayed on the payment page when specifying the currency. The address will be given in response to the request.

period

String

month, week, day

week

Period for invoice resubmission (only if email for automatic invoice sending is filled in).


Response parameters description

A successful request receives a response with success status and object result.

  • uuid — unique identifier of the invoice with the INV prefix.

  • created — time of invoice creation in UTC +0 in the format YYYYY-MM-DD HH:MI:SS.FFFFFF.

  • address — payment address. It will be pre-filled only in case of selecting cryptocurrency for payment. To select the currency for the client, it is necessary to specify the currency available in the project in add_fields.cryptocurrency.

  • expiry_date — expiration date of the invoice in UTC +0 in the format YYYY-MM-DD HH:MI:SS.FFFFFFFF. After the expiry date invoice will be transferred to the status canceled, if no payment has been received.

  • side_commissiontransfer fee payment side.

  • side_commission_ssservice fee payment side.

  • amount — invoice amount.

  • amount_usd — invoice amount in USD.

  • amount_in_fiat — invoice amount in creation currency (depends on currency parameter).

  • fee — invoice transfer commission.

  • fee_usd — invoice transfer commission in USD.

  • service_fee — service commission.

  • service_fee_usd — service commission in USD.

  • fiat_currency — code of fiat currency in which the invoice was created.

  • status — invoice status. When sending a request for invoice creation, it is always created. There are also paid, partial, overpaid and canceled statuses.

  • is_email_required — parameter for mandatory email filling in the invoice.

  • link — link to the invoice page.

  • currency — object of the selected cryptocurrency in the invoice. It also contains the object network — information about the selected currency network.

  • project — information about the project.

  • test_mode — test invoice sign.

Request examples

These examples show how you can submit a request to create an invoice. Note that you need to provide your API key in the Authorization header to successfully authorize the request.

curl -X POST \
     -H "Authorization: Token <API KEY>" \
     -H "Content-Type: application/json" \
     -d '{"amount": 100, "shop_id": "xBAivfPIbskwuEWj", "currency": "USD"}' \
     "https://api.cryptocloud.plus/v2/invoice/create"

Last updated