Naafi Pay

Get Payment

GET/api/payment/{invoice_id}

Returns the full record for a single payment, including gateway-specific details, customer information, all status transitions, the underlying webhook deliveries, and every metadata field you originally attached. This is the most detailed view of a payment available through the API and is the one to use when building a customer support tool or an audit trail. Unlike the List Payments endpoint which returns summary objects, this endpoint returns every field NaafiPay stores for the payment.

Request headers

FieldTypeRequiredDescription
AuthorizationstringrequiredYour test or live API key.
Example: pg_live_xxx

URL parameters

FieldTypeRequiredDescription
invoice_idstringrequiredThe invoice_id returned by Create Checkout.
Example: inv_01HZX5JM3W7QZK8YF7N9P0RTS2

Response

200 OK
1{
2 "invoice_id": "inv_01HZX5JM3W7QZK8YF7N9P0RTS2",
3 "status": "completed",
4 "amount": 1500,
5 "currency": "BDT",
6 "fee": 22.5,
7 "net": 1477.5,
8 "gateway": "bkash",
9 "gateway_details": {
10 "sender_wallet": "017XXXXXXXX",
11 "transaction_id": "8GD7H2K3L1",
12 "reference": "NP-7K3R"
13 },
14 "customer": {
15 "full_name": "Tasin Fahim",
16 "email": "tasin@example.com",
17 "id": "cus_01HZW..."
18 },
19 "metadata": { "order_id": "ORD-1001" },
20 "history": [
21 { "status": "pending", "at": "2026-05-30T14:02:00Z" },
22 { "status": "completed", "at": "2026-05-30T14:06:21Z" }
23 ],
24 "webhook_deliveries": [
25 { "url": "https://yourstore.com/webhooks", "status": 200, "delivered_at": "2026-05-30T14:06:22Z" }
26 ],
27 "created_at": "2026-05-30T14:02:00Z",
28 "paid_at": "2026-05-30T14:06:21Z"
29}
TipUse this for support tools
Build an internal “look up a payment” page for your support team that calls this endpoint. The webhook_deliveries array tells you whether your own system received the event.

Error codes

FieldTypeRequiredDescription
401unauthorizedoptionalAPI key is missing or invalid.
403wrong_storefrontoptionalInvoice belongs to a different storefront.
404not_foundoptionalNo invoice exists for the given id.
Updated at: May 30, 2026