Welcome to payment.bondhonpay.com Docs
Complete guide to integrate payment.bondhonpay.com Payment Gateway into any website/app. Create payment URL, redirect customer, then verify transaction status.
Introduction
payment.bondhonpay.com enables merchants to receive money from customers using a hosted payment page. After payment completes, your system should verify status using the Verify API.
APIs
All requests must include header API-KEY and JSON body.
| Endpoint | Method | Purpose |
|---|---|---|
| https://payment.bondhonpay.com/api/payment/create | POST | Create a payment link |
| https://payment.bondhonpay.com/api/payment/verify | POST | Verify payment status + get trx_id |
API Operation
Create Payment → Redirect Customer → Return to success/cancel URL → Verify using transaction_id.
1) transaction_id = System Invoice ID (BondhonPay generates)
2) trx_id = Real Gateway Transaction ID (bKash/Nagad/Rocket/etc)
Parameter Details
Create Payment (JSON)
| Field | Required | Description | Example |
|---|---|---|---|
| amount | Yes | Numeric amount (max 1,000,000) | 10 / 10.50 |
| success_url | Yes | Redirect URL after payment | https://yourdomain.com/success |
| cancel_url | Yes | Redirect URL on cancel/fail | https://yourdomain.com/cancel |
| cus_name | No | Customer name | John Doe |
| cus_email | No | Customer email | john@gmail.com |
| metadata | No | JSON object (not string) | {"order_id":"ORD-1001"} |
| webhook_url | No | Webhook receiver URL | https://yourdomain.com/webhook |
Verify Payment (JSON)
| Field | Required | Description | Example |
|---|---|---|---|
| transaction_id | Yes | System Invoice ID (from redirect/create) | OVKPXW165414 |
Verify Response Fields
| Field | Description | Example |
|---|---|---|
| transaction_id | System invoice ID (BondhonPay generated) | OVKPXW165414 |
| trx_id | Real gateway transaction ID (save this) | DA230YGMJZ |
| status | COMPLETED / PENDING / ERROR | COMPLETED |
| payment_method | Payment method name | bkash |
| amount | Payment amount | 100 |
| metadata | Metadata JSON (may be string or object) | {"order_id":"ORD-1001"} |
Redirect Params (Success / Cancel URL)
After payment, BondhonPay will redirect the customer to your success_url or cancel_url with these query parameters.
| Param | Description | Example |
|---|---|---|
| transactionId | System Invoice ID (use this for verify) | OVKPXW165414 |
| trxId | Real gateway trx id (may be empty for pending/cancel) | DA230YGMJZ |
| paymentMethod | Method name | bkash |
| paymentAmount | Amount | 100 |
| paymentFee | Fee | 2 |
| status | completed / pending / failed | completed |
Webhook
If you provide webhook_url in Create API, BondhonPay will POST JSON to your webhook. Webhook payload contains both transactionId and trxId.
Webhook Payload (JSON)
{ "paymentMethod": "bkash", "transactionId": "OVKPXW165414", "trxId": "DA230YGMJZ", "paymentAmount": 100, "paymentFee": 2, "status": "completed"} Sample Request (Create Payment)
Copycurl -X POST "https://payment.bondhonpay.com/api/payment/create" \ -H "Content-Type: application/json" \ -H "API-KEY: YOUR_API_KEY" \ -d '{ "amount": 100, "success_url": "https://yourdomain.com/success", "cancel_url": "https://yourdomain.com/cancel", "cus_name": "John Doe", "cus_email": "john@gmail.com", "webhook_url": "https://yourdomain.com/webhook/bondhonpay", "metadata": { "order_id": "ORD-1001" } }' Verify Request
Copycurl -X POST "https://payment.bondhonpay.com/api/payment/verify" \ -H "Content-Type: application/json" \ -H "API-KEY: YOUR_API_KEY" \ -d '{ "transaction_id": "OVKPXW165414" }' Sample Verify Response
{ "cus_name": "John Doe", "cus_email": "john@gmail.com", "amount": 100, "transaction_id": "OVKPXW165414", "trx_id": "DA230YGMJZ", "payment_method": "bkash", "status": "COMPLETED", "metadata": { "order_id": "ORD-1001" }} 