Skip to main content

Regular Invoices

Regular invoices have a fixed amount defined by the merchant. The client pays the exact specified amount.

Create New Regular Invoice

This endpoint creates a new invoice under merchant's account.

POST /api/invoices/v1/regular

Headers

HeaderValue
AuthorizationBearer YOUR_PUBLIC_TOKEN
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
invoiceCurrencystringYesInvoice items price currency. Can be eur, usd, or one of crypto assets (usdt, usdc, btc, eth, ton, sol, bnb, bch, ltc, trx)
itemsarrayYesList of invoice items. Each item should contain name and price. Can contain as many items as needed
items[].namestringYesAny desirable item name
items[].pricenumberYesItem price in invoiceCurrency. Can be zero or negative if total price of all items is greater than 0. Precision is rounded per currency (see below)
isMerchantPaysFeebooleanNofalse — client pays total + fees, merchant receives full amount. true — client pays total only, merchant receives total minus fees
paymentCurrencystringNoCrypto asset the merchant wants to receive. If not provided or null, the client chooses
redirectURLstringNoURL to redirect after invoice reaches "Done" status. If null or absent, the default from Settings/Payment is used

Price Precision by Currency

CurrencyDecimal places
usd, eur, usdt, usdc2
sol, ton4
btc, eth6
bnb, bch, ltc, trx8

cURL

curl --location 'https://my.solopayment.com/api/invoices/v1/regular' \
--header 'Authorization: Bearer YOUR_PUBLIC_TOKEN' \
--header 'Content-Type: application/json' \
--data '<body>'

Body:

{
"invoiceCurrency": "eur",
"items": [
{
"name": "Coffee",
"price": 10.99
},
{
"name": "Sugar",
"price": 1
},
{
"name": "Regular client discount",
"price": -3
},
{
"name": "Coffee gift (1+1 promo)",
"price": 0
}
],
"isMerchantPaysFee": false,
"paymentCurrency": "usdc",
"redirectURL": "https://myshop.com/payment-success"
}

Response

View response body
{
"id": "invoice_id",
"status": "created",
"createdAt": "YYYY-MM-DDTHH:MM:SS.000Z",
"company": {
"name": "%company_name",
"logoUrl": "%logo_url%",
"assets": [
{ "asset": "btc", "isAllowed": false },
{ "asset": "eth", "isAllowed": false },
{ "asset": "usdt", "isAllowed": false },
{ "asset": "sol", "isAllowed": false },
{ "asset": "ton", "isAllowed": false },
{ "asset": "usdc", "isAllowed": false },
{ "asset": "bnb", "isAllowed": false },
{ "asset": "ltc", "isAllowed": false },
{ "asset": "near", "isAllowed": false },
{ "asset": "trx", "isAllowed": false },
{ "asset": "bch", "isAllowed": false }
]
},
"invoiceContent": {
"invoiceCurrency": "eur",
"items": [
{ "name": "Coffee", "price": "10" },
{ "name": "Sugar", "price": "1" },
{ "name": "Regular client discount", "price": "-3" }
],
"paymentCurrency": "usdc",
"isMerchantPaysFee": false,
"redirectURL": "https://myshop.com/payment-success"
}
}

Response Fields

FieldDescription
idInvoice identifier. Open on frontend: https://pay.solopayment.com/%invoice_id%
statusCurrent invoice state (see Invoice Statuses)
createdAtInvoice creation date and time
companyMerchant's company information: name, logoUrl, assets (list of accepted assets with isAllowed flag)
invoiceContentPrimary invoice info: items list, prices, invoiceCurrency, paymentCurrency, isMerchantPaysFee
redirectURLURL for redirect after "Done" status. null means no redirect

Fill Invoice with Client Info

This endpoint fills a regular invoice with client's info — email address and payment asset (if not pre-defined by merchant during creation).

POST /api/invoices/v1/regular/%invoice_id%/proceed

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer YOUR_PUBLIC_TOKEN (optional)

Authorization is not required as the invoice is provided to a non-registered client and uses their email to identify the person as an invoice payee.

Request Body

FieldTypeRequiredDescription
clientEmailstringYesClient's email. Should meet standard email format
paymentCurrencystringYesAsset name + network the client wants to pay with. Values: btc, eth, trc20usdt, usdterc20, sol, ton, usdc, bnb, ltc, trx, bch. Ignored if paymentCurrency was previously provided during invoice creation or its value was null

cURL

curl --location 'https://my.solopayment.com/api/invoices/v1/regular/%invoice_id%/proceed' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_PUBLIC_TOKEN' \
--data '<body>'

Body:

{
"paymentCurrency": "sol",
"clientEmail": "client@example.com"
}

Response

View response body
{
"id": "%invoice_id%",
"status": "%invoice_status%",
"createdAt": "YYYY-MM-DDTHH:MM:SS.000Z",
"company": {
"name": "%company_name%",
"logoUrl": "%logo_url%",
"assets": [
{ "asset": "btc", "isAllowed": true },
{ "asset": "eth", "isAllowed": false },
{ "asset": "usdt", "isAllowed": true },
{ "asset": "sol", "isAllowed": false },
{ "asset": "ton", "isAllowed": false },
{ "asset": "usdc", "isAllowed": false },
{ "asset": "bnb", "isAllowed": false },
{ "asset": "ltc", "isAllowed": false },
{ "asset": "near", "isAllowed": false },
{ "asset": "trx", "isAllowed": false },
{ "asset": "bch", "isAllowed": false }
]
},
"invoiceContent": {
"invoiceCurrency": "eur",
"items": [
{ "name": "Coffee", "price": "1000" },
{ "name": "Sugar", "price": "1" },
{ "name": "Regular client discount", "price": "-3" }
],
"paymentCurrency": "trc20usdt",
"isMerchantPaysFee": false
},
"redirectURL": "%url_for_DONE_statused_invoices_redirection%",
"clientEmail": "client_mail@service.domain",
"address": {
"id": "%payment_address_id%",
"address": "%payment_address%",
"tag": null,
"asset": "trc20usdt"
},
"paymentDetails": {
"rate": "1.16843920",
"invoiceFee": "12.728032"
},
"expiredAt": "YYYY-MM-DDTHH:MM:SS.000Z"
}

Additional Response Fields

Fields available after the invoice is filled (not available for "Created" status):

FieldDescription
clientEmailClient's email
addressPayment address: id, address, tag (null if not TON), asset
paymentDetails.rateinvoiceCurrency → paymentCurrency exchange rate
paymentDetails.invoiceFeeFees in paymentCurrency
expiredAtInvoice expiration time. 30 min for all assets, 120 min for BTC

Get Invoice Info

This endpoint allows to receive invoice info. For clients it's necessary to see their invoice. For merchants it's necessary to have invoice info on the "Invoices" page.

GET /api/invoices/v1/regular/%invoice_id%

Headers

HeaderValue
Content-Typeapplication/json

Authorization is not required.

cURL

curl --location 'https://my.solopayment.com/api/invoices/v1/regular/%invoice_id%' \
--header 'Content-Type: application/json'

Response

Response will differ depending on the invoice's status and its corresponding content.

View full response body
{
"id": "%invoice_id%",
"status": "%invoice_status%",
"createdAt": "YYYY-MM-DDTHH:MM:SS.000Z",
"company": {
"name": "%company_name%",
"logoUrl": "%logo_url%",
"assets": [
{ "asset": "btc", "isAllowed": true },
{ "asset": "eth", "isAllowed": false },
{ "asset": "usdt", "isAllowed": true },
{ "asset": "sol", "isAllowed": false },
{ "asset": "ton", "isAllowed": false },
{ "asset": "usdc", "isAllowed": false },
{ "asset": "bnb", "isAllowed": false },
{ "asset": "ltc", "isAllowed": false },
{ "asset": "near", "isAllowed": false },
{ "asset": "trx", "isAllowed": false },
{ "asset": "bch", "isAllowed": false }
]
},
"invoiceContent": {
"invoiceCurrency": "eur",
"items": [
{ "name": "Coffee", "price": "1000" },
{ "name": "Sugar", "price": "1" },
{ "name": "Regular client discount", "price": "-3" }
],
"paymentCurrency": "trc20usdt",
"isMerchantPaysFee": false
},
"redirectURL": "%url_for_DONE_statused_invoices_redirection%",
"clientEmail": "client_mail@service.domain",
"address": {
"id": "%payment_address_id%",
"address": "%payment_address%",
"tag": null,
"asset": "trc20usdt"
},
"paymentDetails": {
"rate": "1.16843920",
"invoiceFee": "12.728032"
},
"invoiceTransactions": [
{
"id": "%transaction_id%",
"amount": "34.1054",
"from": "usdt",
"txHash": "https://tronscan.org/#/transaction/%tx_id%",
"companyId": "%company_id%",
"invoiceId": "%invoice_id%",
"addressId": "%payment_address_id%",
"createdAt": "YYYY-MM-DDTHH:MM:SS.000Z"
}
],
"expiredAt": "YYYY-MM-DDTHH:MM:SS.000Z"
}

Additional Response Fields (vs Fill Invoice)

FieldDescription
invoiceTransactionsList of invoice transactions (deposits, autoswaps). Unavailable until at least one transaction has occurred. Content is dynamically added as new transactions are created