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/paymentsBody
price_amountstringrequiredPrice as a positive decimal string, e.g. "49.00".
price_currencystringrequiredFiat (
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_assetstringrequiredorder_idstringYour reference, up to 200 chars. Filterable when listing.
descriptionstringShown to the customer. Up to 500 chars.
ipn_callback_urlurlPer-payment webhook URL (HTTPS, public host). Signed with your IPN secret. See webhooks.
success_urlurlWhere the hosted checkout sends the customer after payment.
cancel_urlurlShown as a “Return to merchant” link on the checkout.
customer_emailstringCustomer's email, for your records.
metadataobjectArbitrary key/value data, returned on the payment and in webhooks.
ttl_minutesintegerPayment 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
| Field | Description |
|---|---|
status | Lifecycle status — see below. |
pay_address | Address the customer pays. Unique to this payment. |
pay_amount | Exact amount of pay_asset expected. |
memo | Destination tag / memo if the network needs one, otherwise null. |
amount_received | Total confirmed so far. |
amount_pending | Seen on-chain but not yet fully confirmed. |
fee_amount / net_amount | Our fee on the received amount, and what you're credited. |
settlement | hold (balance) or forward (swept to your wallet); forward_txid once swept. |
flags | late and/or overpaid. |
transactions | Each incoming transfer: txid, amount, confirmations, status, explorer_url. |
required_confirmations | Confirmations needed on this network before funds count. |
checkout_url | Hosted page for this payment (or its invoice). |
rate | price_currency units per 1 pay_asset at quote time. |
Statuses & lifecycle
| Status | Meaning |
|---|---|
waiting | Address issued, nothing seen yet. |
confirming | A transfer was seen and is gaining confirmations. |
partially_paid | Confirmed total is below the requested amount (beyond tolerance). The customer can top up to the same address. |
confirmed | Fully paid and confirmed. For forward settlement, a sweep to your wallet is queued. |
sending | Forward settlement: the sweep to your wallet is broadcast. |
finished | Done. Hold: credited to your available balance. Forward: sweep confirmed. |
expired | The window closed with no funds received. |
failed / refunded | Terminal 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_paidand the hosted checkout asks the customer to send the remainder. - Overpaid. Everything received is credited and the payment gets the
overpaidflag, 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 flaggedlate.
Fees are always computed on the amount actually received:
fee_amount = amount_received × 0.5%.Retrieve a payment
GET
/v1/payments/:idReturns the payment object including its transactions. Use it to reconcile if you missed a webhook.
List payments
GET
/v1/paymentsQuery
limitinteger1–100, default 20.
starting_afterstringA payment id; returns payments created before it (newest first). Use the last id of the previous page.
statusstringFilter by status.
order_idstringFilter 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.