Accept payments
Invoices & hosted checkout
An invoice is a price without a coin. The customer chooses how to pay on our hosted checkout; choosing a coin creates the underlying payment.
Create an invoice
POST
/v1/invoicesBody
price_amountstringrequiredPositive decimal string.
price_currencystringrequiredFiat code (USD, KES, NGN…) or an asset code.
allowed_assetsstring[]Restrict the coin picker, e.g.
["USDT_TRC20","BTC"]. Default: every coin enabled on your account.order_idstringYour reference.
descriptionstringShown on the checkout.
ipn_callback_urlurlWebhook URL for payments created from this invoice.
success_urlurlCustomer is sent here after paying.
cancel_urlurl“Return to merchant” link.
customer_emailstringFor your records.
metadataobjectCopied onto every payment the invoice creates.
expires_in_minutesinteger15 to 43200 (30 days). Default 1440 (24 h). Each payment attempt still has its own 60-minute window.
curl https://lipacoin.io/api/v1/invoices \
-H "Authorization: Bearer $LIPACOIN_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"price_amount": "2500",
"price_currency": "KES",
"order_id": "inv-2291",
"description": "Pro plan — 1 month",
"success_url": "https://shop.example/thanks"
}'Response
{
"id": "inv_0Nf3kQ9a7Kd1yU3nR8bS2xMc",
"object": "invoice",
"status": "open",
"livemode": false,
"price_amount": "2500",
"price_currency": "KES",
"order_id": "inv-2291",
"description": "Pro plan — 1 month",
"allowed_assets": [],
"invoice_url": "https://lipacoin.io/i/inv_0Nf3kQ9a7Kd1yU3nR8bS2xMc",
"success_url": "https://shop.example/thanks",
"cancel_url": null,
"customer_email": null,
"metadata": {},
"expires_at": "2026-11-24T10:00:00.000Z",
"created_at": "2026-11-23T10:00:00.000Z"
}Invoice status is open until one of its payments is confirmed, then paid. The resulting payment carries invoice_id, so your webhook handler can match it back.
Retrieve an invoice
GET
/v1/invoices/:idThe hosted checkout
Every invoice and every payment has a hosted page at https://lipacoin.io/i/<id> — invoice_url on invoices, checkout_url on payments. It shows your business name, logo and brand color (set them in Settings), and handles:
- a searchable coin picker grouped into stablecoins and coins, with clear network warnings;
- a QR code (BIP-21 for BTC/LTC, EIP-681 for ETH, plain address otherwise), copy buttons and a countdown;
- live progress: waiting → confirming (n/N confirmations) → paid, plus partial-payment and expiry states;
- a redirect to
success_urlafter payment.
If the customer switches coins, a new payment is created for the new coin; the invoice always shows the latest attempt.
Embedding in an iframe
Checkout pages may be framed by your site. Allow top navigation so the success redirect can leave the frame:
HTML
<iframe
src="https://lipacoin.io/i/inv_0Nf3kQ9a7Kd1yU3nR8bS2xMc"
style="width:100%;max-width:460px;height:760px;border:0;border-radius:16px"
sandbox="allow-scripts allow-same-origin allow-popups allow-top-navigation-by-user-activation allow-top-navigation"
allow="clipboard-write"
></iframe>Don't rely on the redirect for fulfilment — customers close tabs. Fulfil from the webhook.