Skip to main content

AnyAmount Invoices

AnyAmount invoices allow the client to decide how much to pay. These are useful for donations, tips, or custom payments.

Key Differences from Regular Invoices
  • Items do not require a price field
  • Wrong and Refunded statuses are not applicable (no expected amount is defined, so underpayment and refunding are impossible)
  • Best practice is to use only one item/service/purpose per AnyAmount invoice

Create New AnyAmount Invoice

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

POST /api/invoices/v1/unlimited

Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer YOUR_PUBLIC_TOKEN

Request Body

FieldTypeRequiredDescription
itemsarrayYesItem or service provided by invoice. Can contain multiple items, but best practice for AnyAmount is one item/service/purpose
items[].namestringYesAny desirable item name. Items don't require price for AnyAmount invoices as their concept is to let the client decide the amount
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

cURL

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

Body:

{
"items": [
{
"name": "Product 1"
}
],
"isMerchantPaysFee": null,
"paymentCurrency": null,
"redirectURL": "https://google.com"
}

Response

View response body
{
"id": "invoice_id",
"status": "created",
"createdAt": "YYYY-MM-DDTHH:MM:SS.000Z",
"type": "unlimited",
"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": "Product 1" }
],
"paymentCurrency": "usdc",
"isMerchantPaysFee": false,
"redirectURL": "%url_for_DONE_statused_invoices_redirection%"
}
}

Response Fields

FieldDescription
idInvoice identifier. Open on frontend: https://pay.solopayment.com/%invoice_id%
statusCurrent invoice state: created, pending, processing, done, failed, expired. Note: wrong and refunded are not applicable for AnyAmount invoices
createdAtInvoice creation date and time
typeInvoice type: regular, unlimited, or business
companyMerchant's company information: name, logoUrl, assets (list of accepted assets with isAllowed flag)
invoiceContentPrimary invoice info: items list, invoiceCurrency, paymentCurrency, isMerchantPaysFee
redirectURLURL for redirect after "Done" status. null means no redirect

Fill AnyAmount Invoice with Client Info

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

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

Headers

HeaderValue
Content-Typeapplication/json

Authorization is not required as the invoice is provided to a non-registered client.

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 previously provided during creation
paymentAmountnumberYesAmount entered by the client as a reference of amount to be received in invoiceCurrency. Required for frontend correct work, can have any desirable value for API-only processing
invoiceCurrencystringNoInvoice currency for payment amount reference to be calculated. Required for frontend correct work, can be ignored for API-only processing

cURL

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

Body:

{
"paymentCurrency": "usdc",
"clientEmail": "client@example.com",
"paymentAmount": 100,
"invoiceCurrency": "eur"
}

Response

View response body
{
"id": "%invoice_id%",
"status": "%invoice_status%",
"createdAt": "YYYY-MM-DDTHH:MM:SS.000Z",
"type": "unlimited",
"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": {
"items": [
{ "name": "Product 1" }
],
"paymentCurrency": "trc20usdt",
"isMerchantPaysFee": false,
"paymentAmount": "100"
},
"redirectURL": "%url_for_DONE_statused_invoices_redirection%",
"clientEmail": "client_mail@service.domain",
"address": {
"id": "%payment_address_id%",
"address": "%payment_address%",
"tag": null,
"asset": "trc20usdt",
"qrCodeURL": "string link to address QR-code generated",
"qrCodeBase64": "string link to address QR-code generated in Base64"
},
"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, qrCodeURL, qrCodeBase64
paymentDetails.rateinvoiceCurrency → paymentCurrency exchange rate
paymentDetails.invoiceFeeFees in paymentCurrency
expiredAtInvoice expiration time. 30 min for all assets, 120 min for BTC

Get AnyAmount Invoice Info

Use the same endpoint as Regular Invoices:

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

See Regular Invoices — Get Invoice Info for details.