WezoPay API
Accept mobile banking payments (bKash, Nagad, Rocket, Upay) from your website, app, or platform using the WezoPay REST API. No official gateway approval needed.
Base URL: https://wezopay.com/api/v1
Authentication
All API requests require an X-API-Key header. Get your API key from the merchant dashboard.
curl -X POST https://wezopay.com/api/v1/payments/create \
-H "X-API-Key: wpk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{...}'
Create Payment
POST
/api/v1/payments/create
Creates a payment and returns a URL to redirect your customer.
Request Body
{
"amount": 250.00,
"currency": "BDT",
"invoice_id": "INV-001",
"customer_name": "Rahim Khan",
"customer_email": "rahim@example.com",
"customer_phone": "01712345678",
"success_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel",
"webhook_url": "https://yoursite.com/webhook",
"metadata": {"order_id": "ORD-123"}
}
Response 201
{
"success": true,
"data": {
"token": "pay_abc123xyz",
"payment_url": "https://wezopay.com/p/pay_abc123xyz",
"expires_at": "2026-06-08T12:30:00Z"
}
}
Verify Payment
GET
/api/v1/payments/verify?invoice_id=INV-001
Returns current status of a payment. Also accepts ?token=pay_abc123xyz.
{
"success": true,
"data": {
"token": "pay_abc123xyz",
"invoice_id": "INV-001",
"status": "paid",
"amount": 250.00,
"trx_id": "8N2K3TEST12",
"paid_at": "2026-06-08T11:45:00Z"
}
}
List Payments
GET
/api/v1/payments/list
Query params: status, page, per_page (max 100)
Webhooks
WezoPay sends a signed POST request to your webhook_url when payment status changes.
Payload
{
"event": "payment.completed",
"token": "pay_abc123xyz",
"invoice_id": "INV-001",
"status": "paid",
"amount": 250.00,
"trx_id": "8N2K3TEST12",
"paid_at": "2026-06-08T11:45:00Z"
}
Verify Signature (PHP)
$payload = file_get_contents('php://input');
$sig = $_SERVER['HTTP_X_WEZOPAY_SIGNATURE'];
$expected = hash_hmac('sha256', $payload, $secret);
if (!hash_equals($expected, $sig)) {
http_response_code(401);
exit;
}
// Safe to process
Error Codes
| Code | Meaning |
|---|---|
| 200 | OK — request succeeded |
| 201 | Created — payment created |
| 400 | Bad Request — invalid params |
| 401 | Unauthorized — invalid or missing API key |
| 403 | Forbidden — key lacks required ability |
| 404 | Not Found — invoice/token not found |
| 422 | Validation Error — check error field in response |
| 429 | Too Many Requests — rate limited |
| 500 | Server Error — contact support |
Platform Integrations
Download ready-made WezoPay plugins for popular platforms — available from your merchant dashboard.
WooCommerce
Shopify
WHMCS
WiseCP
Tutor LMS
Perfex CRM
Magento
PrestaShop
OpenCart
Drupal
Joomla
Blesta
EDD
Clientexec
FossBilling
Payventer
Paid Memberships Pro
Login to your merchant dashboard to download modules.