Get your API Key from Dashboard → Brands. Send the X-API-KEY header with every request. Keep the key only on the server.
POST https://pay.peodeveloper.com/api/create.php
{
"amount": 500,
"customer_name": "Rahim",
"customer_contact": "01700000000",
"success_url": "https://shop.com/success",
"cancel_url": "https://shop.com/cancel",
"webhook_url": "https://shop.com/webhook",
"metadata": {"order_id": "A100"}
}Response:
{"success":true,"payment_id":"…","payment_url":"https://pay.peodeveloper.com/pay.php?id=…"}Send the customer to the payment_url.
GET https://pay.peodeveloper.com/api/verify.php?payment_id=ID
{"success":true,"payment_id":"…","amount":"500.00","status":"completed","trx_id":"…","sender_number":"…","metadata":{"order_id":"A100"}}Status: created, pending, completed, rejected. Before fulfilling an order, always check that status = completed and the amount matches.
$ch = curl_init('https://pay.peodeveloper.com/api/create.php');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['X-API-KEY: YOUR_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode(['amount' => 500, 'success_url' => 'https://shop.com/success']),
]);
$res = json_decode(curl_exec($ch), true);
header('Location: ' . $res['payment_url']);When the status changes, a JSON POST is sent with X-Signature = HMAC-SHA256(body, Secret Key). It is sent only once, so also use the verify API.
$body = file_get_contents('php://input');
if (!hash_equals(hash_hmac('sha256', $body, $secret), $_SERVER['HTTP_X_SIGNATURE'] ?? '')) { http_response_code(401); exit; }For instant redirect checkout (customer pays with PIN on the provider's page), add your merchant API credentials under Brand → Wallets → Merchant API Details: bKash needs App Key, App Secret, Username, Password and Base URL; Nagad needs Merchant ID, Merchant Number, PG Public Key and Merchant Private Key; Upay needs Merchant ID and Merchant Key. Secrets are encrypted at rest and shown only as “Saved — type to change”.
Each wallet has a Sandbox / Live switch (Sandbox by default). Test with the Test Connection button first — it only checks the credentials, it never moves money. Switch to Live only with production credentials.
Callback / webhook URLs to give the provider (or copy into their merchant panel):
bKash: https://pay.peodeveloper.com/bkash.php?id=PAYMENT_TOKEN Nagad: https://pay.peodeveloper.com/api/nagad-webhook.php Upay: https://pay.peodeveloper.com/api/upay-webhook.php
API methods appear in the checkout Auto tab only when the wallet is enabled for that brand. Every callback is re-verified server-side (status + exact amount) before a payment is marked completed — a forged redirect can never pay an order.
Manual — the customer sends money to your personal/agent number, submits the details (and a screenshot), and you Approve or Reject it from the admin panel.
Auto (TrxID + SMS) — the customer sends money and enters the TrxID; the server matches it against the payment SMS from your connected phone and completes the payment itself, within 15 minutes.
Auto (API) — the customer is redirected to bKash, Nagad or Upay, approves with their PIN, and is sent back; the server verifies the payment with the provider and completes it instantly.