API Documentation
SyncPay BD API
Add bKash, Nagad, Rocket, and Upay payment verification to any platform via a single REST API. JSON-based, simple authentication, and real-time response.
BASE URL
https://api.syncpaybd.site/v1
Overview
The SyncPay BD API is a RESTful HTTP API. All requests and responses are in JSON format. HTTPS is required.
- Content-Type:
application/json - All responses include
success: true/false - Rate limit: 100 req/minute per API key
- Sandbox:
https://sandbox.syncpaybd.site/v1
Test in the Sandbox environment first. Get your live API key from the dashboard.
Authentication
Send a Bearer token in the Authorization header with every request.
# Add this header to all requests Authorization: Bearer pf_live_xxxxxxxxxxxxxxxx Content-Type: application/json
Create Invoice
Create a new payment invoice. Ask the customer to pay against this invoice.
POST/invoice/create
Request Body
| Parameter | Type | Description | |
|---|---|---|---|
| amount | number | Amount in BDT | required |
| provider | string | bKash | Nagad | Rocket | Upay | required |
| order_id | string | Internal order ID from your system | optional |
| expires_in | number | Expiry time (seconds), default: 1800 | optional |
POST /v1/invoice/create { "amount": 500, "provider": "bKash", "order_id": "ORD-2024-001" }
{
"success": true,
"invoice_id": "inv_9xKj2mPq",
"amount": 500,
"status": "pending"
}Payment Verify
Verify customer payment transaction.
POST/verify
Request Body
| Parameter | Type | Description | |
|---|---|---|---|
| trx_id | string | MFS transaction ID | required |
| amount | number | Expected amount in BDT | required |
| provider | string | bKash | Nagad | Rocket | Upay | required |
POST /v1/verify { "trx_id": "8J1B2C3K4L", "amount": 500, "provider": "bKash" }
{
"success": true,
"verified": true,
"trx_id": "8J1B2C3K4L",
"amount": 500
}