Webhooks
We POST a signed JSON event to your endpoint every time a payment or payout changes state.
Endpoints
There are two ways to receive events:
- Webhook endpoints — add URLs under Developers → Webhooks, subscribe each to specific events,
payment.*/payout.*wildcards or*. Each endpoint has its own signing secret (whsec_…). ipn_callback_url— set on a payment, invoice or payout to receive that object's events. These are signed with your account's IPN secret for the mode, shown in the dashboard.
URLs must be HTTPS on a public host. Endpoints are per mode: test events only go to test endpoints.
Events
| Event | When |
|---|---|
payment.waiting | A customer picked a coin on an invoice checkout (payment created). |
payment.confirming | A transfer was detected and is gaining confirmations. |
payment.partially_paid | Confirmed amount is short of the requested amount. |
payment.confirmed | Fully paid; forward sweep queued (forward settlement). |
payment.sending | Forward sweep broadcast. |
payment.finished | Fulfil the order. Credited (hold) or swept to your wallet (forward). |
payment.expired | Window closed with no funds. |
payout.awaiting_approval | Payout needs compliance approval. |
payout.processing | Payout queued for broadcast. |
payout.broadcast | Payout sent; txid available. |
payout.finished | Payout confirmed. |
payout.failed / payout.rejected | Payout not sent; funds returned to your balance. |
finished once confirmed. If you settle by forwarding, you can fulfil on payment.confirmed — the funds are final on-chain; finished only means the sweep to your wallet landed.Payload
Every delivery has the same envelope. data is the full object, exactly as the API returns it.
{
"id": "evt_0Nf3kRbX9dS2aW5pT0dU4zOe",
"type": "payment.finished",
"created": 1795432800,
"livemode": false,
"data": {
"id": "pay_0Nf3kQ8z4Hc2xT7mP1aR9wLb",
"object": "payment",
"status": "finished",
"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": "49",
"amount_pending": "0",
"fee_amount": "0.245",
"net_amount": "48.755",
"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
}
}| Header | Value |
|---|---|
Content-Type | application/json |
Lipacoin-Signature | t=1795432800,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd |
X-Event-Id | The event id — use it to de-duplicate. |
User-Agent | Lipacoin-Webhooks/1.0 |
Verifying signatures
The signature is an HMAC-SHA256, keyed with your signing secret, over the timestamp, a literal dot and the raw request body:
v1 = hex( HMAC_SHA256( secret, t + "." + raw_body ) )- Split the header on
,and readtandv1. - Compute the HMAC over
${t}.${raw_body}using the raw bytes you received — re-serialized JSON won't match. - Compare in constant time, and reject timestamps older than ~5 minutes to stop replays.
import crypto from "node:crypto";
// Use the RAW request body — not a re-serialized JSON object.
export function verifyLipacoin(rawBody, header, secret, toleranceSec = 300) {
const parts = Object.fromEntries(
String(header).split(",").map((p) => p.trim().split("=", 2)),
);
const t = Number(parts.t);
if (!t || !parts.v1) return false;
if (Math.abs(Date.now() / 1000 - t) > toleranceSec) return false; // replay guard
const expected = crypto
.createHmac("sha256", secret)
.update(`${t}.${rawBody}`)
.digest("hex");
const a = Buffer.from(expected), b = Buffer.from(parts.v1);
return a.length === b.length && crypto.timingSafeEqual(a, b);
}
// Express
app.post("/webhooks/lipacoin", express.raw({ type: "application/json" }), (req, res) => {
const raw = req.body.toString("utf8");
if (!verifyLipacoin(raw, req.get("Lipacoin-Signature"), process.env.LIPACOIN_WEBHOOK_SECRET)) {
return res.sendStatus(400);
}
const event = JSON.parse(raw);
if (event.type === "payment.finished") fulfil(event.data.order_id);
res.sendStatus(200);
});Delivery & retries
Respond with any 2xx within 10 seconds. Anything else — a non-2xx status, a timeout, a connection error, or a redirect (redirects aren't followed) — is retried with backoff:
That's 7 attempts over roughly 33 hours, after which the delivery is marked failed. You can inspect and manually resend any delivery from the dashboard.
id, and when ordering matters re-fetch the object (GET /v1/payments/:id) for its current status.