When creating a new invoice, the following parameters are the most important ones:
Parameter name | Required | Description | Example | Dedicated Section |
---|---|---|---|---|
invoice.amount | Yes | The original invoice's amount | 100 | Invoice original amount |
invoice.currencyFrom | Yes | Code of the original invoice's asset | USD | Invoice original amount |
invoice.currencyTo | No | Code of the payment asset | BTC | Invoice payment asset |
settlement.currency | Yes* | Code of the settlement asset | EUR | Invoice settlement asset |
* Technically, it's settlement
(not settlement.currency
) attribute which is required, i.e. sending a request with an empty settlement
attribute is also valid (and it's equivalent to sending a request with settlement.currency = null
).
Invoice original amount
Parameter invoice.currencyFrom
(code of the original invoice's asset) can be set to almost any world fiat currency (USD
, EUR
, CHF
, … ) and also to BTC
, please refer to Get assets endpoint to get list of the currently supported assets (those with merchantAsset=true
).
Invoice payment asset
Parameter invoice.currencyTo
is highly recommended to be set to null. If set to null, the invoice is created and the status of the invoice is set to prepared which allows the customer to select any supported payment methods. Supported payment methods can be enabled/disabled in the dashboard.
It's also possible to set it to:
BTC
to pre-select payment via native BitcoinBTC
(alongside with parameterinvoice.layer2ProtocolName
set toLIGHTNING
) to pre-select payment via Bitcoin
LightningLTC
to pre-select payment via native Litecoin
Should you need to create an invoice with other predefined payment method, please contact us at [email protected].
Invoice settlement asset
Parameter settlement.currency
configure s the settlement asset in which we credit merchant balance. There are two main options to choose from described in the following subsections.
Without conversion (Keep in kind)
If you set settlement.currency = null
when creating an Invoice, all the payments sent to the Invoice will be credited to the merchant account in the same crypto asset as the customer used for the payment. For instance, if the customer chooses to pay with TRX, the payment will be credited to the merchant's TRX balance.
With conversion
You can choose in which asset you want to be credited. To do so, use settlement.currency = <supported-asset-code>
. In this case, all the payments to the Invoice will be converted to the settlement asset you set.
Currently, we support the following settlement assets:
settlement.currency | Asset name | Asset type |
---|---|---|
BTC | Bitcoin | Crypto |
CZK | Czech koruna | Fiat |
EUR | Euro | Fiat |
GBP | British pound sterling | Fiat |
HUF | Hungarian forint | Fiat |
PLN | Polish zloty | Fiat |
USD | United States dollar | Fiat |
USDC | USD Coin | Crypto (stablecoin) |
USDT | Tether USD | Crypto (stablecoin) |
Sample combinations
invoice.currencyFrom | invoice.currencyTo | invoice.layer2ProtocolName | settlement.currency | Description |
---|---|---|---|---|
USD | null | EUR | USD invoice to be paid by a customer-chosen method and credited in EUR | |
GBP | null | USDC | GBP invoice to be paid by a customer-chosen method and credited in USDC | |
BTC | BTC | LIGHTNING | USDT | BTC invoice to be paid by Bitcoin Lightning and credited in USDT |
EUR | null | null | EUR invoice to be paid by a customer-chosen method and credited in the payment asset | |
CHF | LTC | BTC | CHF invoice to be paid by Litecoin and credited in BTC |