curl -X POST "https://api.liddie.io/invoice/exampleslug1/select-currency" \
-H "Content-Type: application/json" \
-d '{"currency":"LTC"}'
// Public endpoint — no credentials required, safe from the payer's browser.
const res = await fetch(
'https://api.liddie.io/invoice/exampleslug1/select-currency',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ currency: 'LTC' }),
}
);
const quote = await res.json();
console.log(quote.publicKey, quote.amount);
{
"publicKey": "LtcDemoAddressDoNotSendFunds123456",
"amount": 0.46398161,
"currency": "LTC",
"expiresAt": "2026-07-14T02:25:58.314Z",
"quoteExpiresAt": "2026-07-14T02:20:58.314Z",
"status": "WAITING",
"amountPaid": 0
}
Public checkout
Select pay currency
Lock the pay currency for an AWAITING_CURRENCY Liddie invoice and receive the deposit address, network, and crypto payment quote for the payer.
POST
/
invoice
/
{invoiceId}
/
select-currency
curl -X POST "https://api.liddie.io/invoice/exampleslug1/select-currency" \
-H "Content-Type: application/json" \
-d '{"currency":"LTC"}'
// Public endpoint — no credentials required, safe from the payer's browser.
const res = await fetch(
'https://api.liddie.io/invoice/exampleslug1/select-currency',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ currency: 'LTC' }),
}
);
const quote = await res.json();
console.log(quote.publicKey, quote.amount);
{
"publicKey": "LtcDemoAddressDoNotSendFunds123456",
"amount": 0.46398161,
"currency": "LTC",
"expiresAt": "2026-07-14T02:25:58.314Z",
"quoteExpiresAt": "2026-07-14T02:20:58.314Z",
"status": "WAITING",
"amountPaid": 0
}
Locks the pay currency for an
After selection, poll Get invoice status for payment progress.
AWAITING_CURRENCY invoice, derives the deposit address and returns the crypto quote. This powers the hosted invoice page, and it’s safe to call from the payer’s browser if you’re building a custom checkout UI. All data is redacted — no fees, no merchant internals.
Authorization
None — this endpoint is public. It only accepts the public invoice id (the last segment ofinvoiceUrl, e.g. exampleslug1); raw 24-hex payment ids are rejected so payments can’t be enumerated. Rate limit: 20/min.
Parameters
string
required
The public invoice id — the last segment of the payment’s
invoiceUrl. Raw 24-hex payment ids are rejected.string
required
The currency the payer chose (e.g.
LTC). Must be one of the currencies returned by List currency options.Always fetch List currency options first and only offer currencies it marks
available: true — anything else is rejected here.curl -X POST "https://api.liddie.io/invoice/exampleslug1/select-currency" \
-H "Content-Type: application/json" \
-d '{"currency":"LTC"}'
// Public endpoint — no credentials required, safe from the payer's browser.
const res = await fetch(
'https://api.liddie.io/invoice/exampleslug1/select-currency',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ currency: 'LTC' }),
}
);
const quote = await res.json();
console.log(quote.publicKey, quote.amount);
{
"publicKey": "LtcDemoAddressDoNotSendFunds123456",
"amount": 0.46398161,
"currency": "LTC",
"expiresAt": "2026-07-14T02:25:58.314Z",
"quoteExpiresAt": "2026-07-14T02:20:58.314Z",
"status": "WAITING",
"amountPaid": 0
}
Response
string
The freshly derived deposit address for the selected currency.
number
The crypto amount payable at the current quote.
string
The locked pay currency.
string
ISO timestamp when the invoice expires.
string
ISO timestamp when the crypto quote expires.
string
Invoice status after selection (
WAITING).number
Crypto amount received so far.
See also
- List currency options — the previous step: discover which currencies the payer may pick.
- Get invoice status — poll payment progress and quote refreshes after the currency is locked.
- Cancel invoice (payer) — let the payer abandon the invoice while it is still unpaid.