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
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | required | Your test or live API key. Example: pg_live_xxx |
URL parameters
| Field | Type | Required | Description |
|---|---|---|---|
| invoice_id | string | required | The 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
| Field | Type | Required | Description |
|---|---|---|---|
| 401 | unauthorized | optional | API key is missing or invalid. |
| 403 | wrong_storefront | optional | Invoice belongs to a different storefront. |
| 404 | not_found | optional | No invoice exists for the given id. |