Payments
Read a payment
GET
/api/v2/payments/:paymentIdThe live state of one sale — status, amount, the invoice that was issued, and when it settled.
- Scoped to the calling merchant. A payment belonging to someone else returns 404, never another merchant's data.
- Authentication is required — unlike v1, a payment id is not a public handle. Poll from your server, not the customer's browser.
paid_atis null until the payment settles.
Authentication
Accepts either an API key (X-API-Key) or a dashboard JWT (Authorization: Bearer …).
Path parameters
paymentIdstringrequiredthe payment_id returned by POST /api/v2/payments
GET
/api/v2/payments/:paymentIdcurl "https://api.trevi.cash/api/v2/payments/PAYMENT_ID" \
--header "X-API-Key: $TREVI_API_KEY"200Sample response
{
"success": true,
"payment": {
"payment_id": "pay_abc123def456abc123def456abc123de",
"external_order_id": "order-12345",
"amount_sats": 150000,
"invoice": "lnbc1500u1p…",
"payment_hash": "9f2c8e1a…",
"status": "paid",
"expires_at": "2026-08-13T12:15:00.000Z",
"paid_at": "2026-08-13T12:04:11.000Z"
}
}Was this page helpful?
