Telegram Support

Developer Documentation

Welcome to the EasyPay API Reference! EasyPay enables developers and e-commerce stores to automate personal & merchant Mobile Banking (bKash, Nagad, Rocket, Upay, Cellfin), Bank Transfers, and International Cards with 0% transaction fees.

Base API URL: All API requests must be made over HTTPS to https://easypaybd.online/api/

Quick Integration Flow

  1. Generate API Key: Copy your X-API-Key from your Merchant Dashboard -> API Settings.
  2. Initiate Charge: Make a POST request to /api/create-payment to obtain a secure checkout_url.
  3. Redirect Customer: Customer enters their TrxID on the sleek Electric Blue checkout.
  4. Instant Webhook: Our Android app instantly matches the SMS notification and notifies your website webhook with payment status completed.

Authentication

Authenticate all API requests by providing your Merchant API Key in the HTTP request headers.

Header Name Type Description
X-API-Key String Your public merchant API key (e.g. ep_xxxx...).
Content-Type String Must be set to application/json.

Android App & SIM Automation Sync

EasyPay utilizes an intelligent Android background listener that automatically parses incoming banking SMS notifications (bKash, Nagad, Rocket, Upay, Cellfin, and Bank Alerts) and matches customer TrxIDs with less than 3 seconds latency.

Multi-SIM Support: You can link multiple Android devices or dual-SIM phones to distribute transactions across different bKash/Nagad accounts.

3-Step Quick Device Setup

  1. Download & Install: Download the latest EasyPay Gateway APK from your Merchant Dashboard -> SMS Data section.
  2. Link Merchant Account: Open the app, scan your account QR code or paste your Device Secret Key.
  3. Allow Background Permissions: Grant SMS reading permission and disable battery optimization so the app runs 24/7 without being closed by Android OS.
Important: Ensure the phone has active internet access (Wi-Fi or Mobile Data) and that SMS storage is not full.

Create Payment Intent

Create a new transaction invoice and generate a customer checkout redirection URL.

POST https://easypaybd.online/api/create-payment

Request Body Parameters

Parameter Type Required Description
amount Numeric Required Payment amount (e.g. 750.00).
currency String Optional Currency code (default: BDT).
customer_name String Required Customer full name.
customer_email String Optional Customer email address.
customer_phone String Required Customer mobile number (e.g. 017XXXXXXXX).
callback_url String (URL) Required Redirection URL after payment is completed or cancelled.
webhook_url String (URL) Optional Server webhook URL to receive instant IPN notifications.

Code Samples

<?php
$apiKey = 'ep_your_merchant_api_key';

$payload = [
    'amount'         => 750.00,
    'currency'       => 'BDT',
    'customer_name'  => 'Tanvir Ahmed',
    'customer_phone' => '01712345678',
    'customer_email' => '[email protected]',
    'callback_url'   => 'https://yourwebsite.com/payment/callback',
    'webhook_url'    => 'https://yourwebsite.com/payment/webhook'
];

$ch = curl_init('https://easypaybd.online/api/create-payment');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'X-API-Key: ' . $apiKey
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
if (!empty($data['status']) && $data['status'] === true) {
    // Redirect customer to checkout URL
    header('Location: ' . $data['checkout_url']);
    exit;
} else {
    echo 'Payment creation failed: ' . ($data['message'] ?? 'Error');
}
?>

Success Response (200 OK)

{
  "status": true,
  "transaction_id": "EP-TXN-98471203",
  "amount": 750.00,
  "fee": 0.00,
  "currency": "BDT",
  "checkout_url": "https://easypaybd.online/payment/EP-TXN-98471203",
  "created_at": "2026-11-10 07:52:35"
}

Verify Payment Status

Check the real-time status of a transaction anytime using its Transaction ID.

POST https://easypaybd.online/api/verify-payment
// POST Body:
{
  "transaction_id": "EP-TXN-98471203"
}

// Response:
{
  "status": true,
  "payment_status": "completed",
  "trx_id": "BL87X99A1",
  "amount": 750.00,
  "currency": "BDT",
  "sender_number": "01712345678",
  "payment_method": "bkash-personal"
}

Instant Webhooks & IPN

EasyPay webhooks send real-time HTTP POST notifications directly to your server as soon as a payment is verified by our Android automated SIM engine.

Response Requirement: Your webhook receiver script MUST respond with an HTTP status code 200 OK within 5 seconds to confirm receipt.

Webhook Payload Structure

{
  "event": "payment.completed",
  "transaction_id": "EP-TXN-98471203",
  "status": "completed",
  "amount": 750.00,
  "fee": 0.00,
  "currency": "BDT",
  "payment_method": "bkash-personal",
  "sender_number": "01712345678",
  "trx_id": "BL87X99A1",
  "customer_name": "Tanvir Ahmed",
  "customer_phone": "01712345678",
  "metadata": {
    "order_id": "ORD-94812",
    "user_id": 45
  },
  "timestamp": "2026-11-10 07:52:35"
}

PHP Webhook Listener Example

<?php
// webhook.php - Listen for incoming payment notifications
$rawPayload = file_get_contents('php://input');
$data = json_decode($rawPayload, true);

if (!empty($data) && isset($data['status']) && $data['status'] === 'completed') {
    $txnId = $data['transaction_id'];
    $trxId = $data['trx_id'];
    $amount = $data['amount'];
    
    // 1. Update order status in your database
    // updateOrderStatus($txnId, 'paid', $trxId);

    // 2. Respond with 200 OK
    http_response_code(200);
    echo json_encode(['status' => 'success', 'message' => 'Webhook received']);
    exit;
} else {
    http_response_code(400);
    echo json_encode(['status' => 'failed', 'message' => 'Invalid payload']);
    exit;
}
?>

WooCommerce & Ready-to-use Plugins

Integrate EasyPay into your WordPress WooCommerce store, Laravel web app, or custom PHP platform in under 2 minutes.

WooCommerce Gateway Extension for EasyPay

Installation Steps:

  1. Download the easypay-woocommerce.zip plugin from your Merchant Dashboard.
  2. Go to WordPress Admin -> Plugins -> Add New -> Upload Plugin.
  3. Activate the plugin and navigate to WooCommerce -> Settings -> Payments -> EasyPay.
  4. Paste your API URL (https://easypaybd.online) and X-API-Key, then click Save Changes.

Error Codes & Rate Limits

EasyPay uses standard HTTP response codes to indicate the success or failure of an API request.

HTTP Code Status Name Description
200 OK Success Request executed successfully.
400 Bad Request Client Error Missing required fields, invalid amount, or malformed JSON payload.
401 Unauthorized Auth Error Invalid, inactive, or missing X-API-Key header.
404 Not Found Not Found Transaction ID does not exist or has expired.
429 Rate Limited Velocity Limit Too many requests submitted. Anti-fraud velocity lock active for 15 minutes.
500 Server Error Server Error Temporary internal error. Please retry or contact support.

Developer Support & Integration Help

Need assistance connecting your custom framework, configuring multi-SIM Android sync, or debugging webhooks? Our developer team is available 24/7 on Telegram.

Contact on Telegram: @mitul_islam