Skip to content
Accept payments

Payments

A payment is a request for a specific amount of a specific coin, paid to a fresh address derived just for it. Use payments when you build your own checkout UI, or let invoices create them for you.

Create a payment

POST/v1/payments
Body
price_amountstringrequired
Price as a positive decimal string, e.g. "49.00".
price_currencystringrequired
Fiat (USD, EUR, GBP, KES, NGN, UGX, TZS, ZAR, GHS) or an asset code/symbol. When it equals the pay asset, pay_amount = price_amount.
pay_assetstringrequired
Asset code such as USDT_TRC20, BTC or USDC_SOL. See currencies.
order_idstring
Your reference, up to 200 chars. Filterable when listing.
descriptionstring
Shown to the customer. Up to 500 chars.
ipn_callback_urlurl
Per-payment webhook URL (HTTPS, public host). Signed with your IPN secret. See webhooks.
success_urlurl
Where the hosted checkout sends the customer after payment.
cancel_urlurl
Shown as a “Return to merchant” link on the checkout.
customer_emailstring
Customer's email, for your records.
metadataobject
Arbitrary key/value data, returned on the payment and in webhooks.
ttl_minutesinteger
Payment window, 15–1440. Default 60.
curl https://lipacoin.io/api/v1/payments \
  -H "Authorization: Bearer $LIPACOIN_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order_1042" \
  -d '{
    "price_amount": "49.00",
    "price_currency": "USD",
    "pay_asset": "USDT_TRC20",
    "order_id": "order_1042",
    "ipn_callback_url": "https://shop.example/webhooks/lipacoin"
  }'

The crypto pay_amount is quoted at creation from our price oracle and rounded up (2 decimals for stablecoins, up to 8 for other coins). It's fixed for the payment's lifetime. Payments below the asset's minimum (see min_amount_usd on currencies) fail with amount_too_small.

Response — the payment object
{
  "id": "pay_0Nf3kQ8z4Hc2xT7mP1aR9wLb",
  "object": "payment",
  "status": "waiting",
  "livemode": false,
  "order_id": "order_1042",
  "description": null,
  "price_amount": "49",
  "price_currency": "USD",
  "pay_asset": "USDT_TRC20",
  "pay_asset_label": "USDT · TRC20",
  "network": "tron",
  "pay_amount": "49",
  "pay_address": "TQ5b8mC1xJ2v9L7aHkR3pW4nYdE6sF0gUt",
  "memo": null,
  "rate": "1",
  "amount_received": "0",
  "amount_pending": "0",
  "fee_amount": "0",
  "net_amount": "0",
  "settlement": "hold",
  "forward_txid": null,
  "flags": [],
  "invoice_id": null,
  "checkout_url": "https://lipacoin.io/i/pay_0Nf3kQ8z4Hc2xT7mP1aR9wLb",
  "customer_email": null,
  "metadata": {},
  "transactions": [],
  "required_confirmations": 20,
  "expires_at": "2026-11-23T11:00:00.000Z",
  "created_at": "2026-11-23T10:00:00.000Z",
  "updated_at": "2026-11-23T10:00:00.000Z",
  "finished_at": null
}

The payment object

FieldDescription
statusLifecycle status — see below.
pay_addressAddress the customer pays. Unique to this payment.
pay_amountExact amount of pay_asset expected.
memoDestination tag / memo if the network needs one, otherwise null.
amount_receivedTotal confirmed so far.
amount_pendingSeen on-chain but not yet fully confirmed.
fee_amount / net_amountOur fee on the received amount, and what you're credited.
settlementhold (balance) or forward (swept to your wallet); forward_txid once swept.
flagslate and/or overpaid.
transactionsEach incoming transfer: txid, amount, confirmations, status, explorer_url.
required_confirmationsConfirmations needed on this network before funds count.
checkout_urlHosted page for this payment (or its invoice).
rateprice_currency units per 1 pay_asset at quote time.

Statuses & lifecycle

Payment lifecycle: waiting to confirming to confirmed, optionally sending, to finished. Side states partially_paid and expired.waitingconfirmingconfirmedsendingfinishedexpiredpartially_paidhold settlementforward onlycustomer tops upno fundsshort
StatusMeaning
waitingAddress issued, nothing seen yet.
confirmingA transfer was seen and is gaining confirmations.
partially_paidConfirmed total is below the requested amount (beyond tolerance). The customer can top up to the same address.
confirmedFully paid and confirmed. For forward settlement, a sweep to your wallet is queued.
sendingForward settlement: the sweep to your wallet is broadcast.
finishedDone. Hold: credited to your available balance. Forward: sweep confirmed.
expiredThe window closed with no funds received.
failed / refundedTerminal states set by operations.

Underpayments, overpayments and late payments

  • Tolerance. A payment counts as paid when the confirmed amount is within 0.5% of pay_amount. This absorbs wallets that shave fees off the amount.
  • Underpaid. Below that, the status is partially_paid and the hosted checkout asks the customer to send the remainder.
  • Overpaid. Everything received is credited and the payment gets the overpaid flag, so you can refund the difference if you choose.
  • Late. Addresses are watched for 3 days after expires_at. A transfer first seen after expiry is still credited and flagged late.
Fees are always computed on the amount actually received: fee_amount = amount_received × 0.5%.

Retrieve a payment

GET/v1/payments/:id

Returns the payment object including its transactions. Use it to reconcile if you missed a webhook.

List payments

GET/v1/payments
Query
limitinteger
1–100, default 20.
starting_afterstring
A payment id; returns payments created before it (newest first). Use the last id of the previous page.
statusstring
Filter by status.
order_idstring
Filter by your order id.
Shell
curl "https://lipacoin.io/api/v1/payments?limit=50&status=finished" \
  -H "Authorization: Bearer $LIPACOIN_SECRET_KEY"
Response
{
  "object": "list",
  "has_more": true,
  "data": [
    "…payment objects…"
  ]
}

List results omit transactions; retrieve a payment individually for its transfers.