Verify Payment
POST
/api/public/v1/verify-paymentVerifies a payment by invoice_id and returns its current status. Call this endpoint from your success_url handler before you deliver goods or unlock an account. It is the single source of truth for whether a payment has actually been captured. Relying only on the success-page redirect is unsafe — a malicious user can type the URL directly without paying. This call is idempotent and free; you can call it as many times as you want for the same invoice.
Request headers
| Field | Type | Required | Description |
|---|---|---|---|
| Authorization | string | required | Your test or live API key. Example: pg_live_xxx |
| Content-Type | string | required | Must be application/json. Example: application/json |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| invoice_id | string | required | The invoice_id returned by Create Checkout, also passed to your success_url as a query param. 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 "transaction_id": "8GD7H2K3L1",10 "customer": {11 "full_name": "Tasin Fahim",12 "email": "tasin@example.com"13 },14 "metadata": { "order_id": "ORD-1001" },15 "paid_at": "2026-05-30T14:06:21Z"16}Possible status values are completed, pending, failed, and cancelled. Only ship the product when status is completed.
TipMatch amount and metadata
Compare the returned
amount and metadata.order_id to your local order before fulfilment. This protects you from edge cases where two checkouts for different orders somehow get confused.Error codes
| Field | Type | Required | Description |
|---|---|---|---|
| 400 | missing_invoice_id | optional | invoice_id was not provided. |
| 401 | unauthorized | optional | API key is missing or invalid. |
| 403 | wrong_storefront | optional | The invoice belongs to a different storefront. |
| 404 | not_found | optional | No invoice exists for the given id. |
WarningNever trust the success_url alone
Anyone can open your success URL. Verify the payment server-side every single time before delivering anything of value.