New Multi-Method Aggregator Live: bKash, Nagad, Rocket, Card, USDT & Binance Pay
Developer Documentation

SMS Sync Pay API & Integration

Accept automated bKash, Nagad, Rocket, Card, and Crypto payments directly through our central aggregator platform. Use our zero-dependency embed button or full RESTful JSON API.

Base URL: https://karianaquran.com/pay/api/v1

1. Quickstart Integration Flow

Step 1: Obtain Keys

Register as a merchant or copy your live pk_live_... key from the Merchant Dashboard.

Step 2: Initiate Session

POST to /payment/initiate or use the pay-embed.js button on your site.

Step 3: Webhook Delivery

Receive instant HMAC signed JSON webhooks as soon as payments are verified by our SMS daemon.

2. Zero-Dependency Embed Script (`pay-embed.js`)

Live Interactive Demo →

The easiest way to integrate SMS Sync Pay into an HTML, WordPress, or Shopify site is using our client-side SDK. It creates a responsive popup checkout window with automatic redirect fallback.

<!-- Include script once in your page -->
<script src="https://karianaquran.com/pay/js/pay-embed.js"></script>

<!-- Attach data-syspay to any button -->
<button data-syspay
        data-amount="500"
        data-order="ORD-1002"
        data-key="pk_live_aBcDeFgHiJkLmNoPqRsT"
        data-method="bkash"
        data-layout="bottom_sheet" <!-- 'bottom_sheet' | 'popup' | 'page' -->
        data-customer-name="Tanvir Ahmed"
        class="checkout-btn">
    Pay with bKash / Card
</button>
Bottom Sheet

Fixed to bottom with native drag handle. Optimized for mobile apps, webviews, and touch-first devices.

layout=bottom_sheet
Modal Popup

Centered floating dialog with dimmed backdrop. Ideal for desktop web shops and inline checkout iframe/modals.

layout=popup
Full Page

Dedicated hosted payment screen with merchant branding. Perfect for direct redirects from WooCommerce / Shopify.

layout=page

3. Supported Payment Methods Matrix

Method Code Channel Name Verification Mechanism Environment Mode
bkash bKash Send Money Real-time Android SMS listener matching LIVE
nagad Nagad Money Received Real-time Android SMS listener matching LIVE
rocket DBBL Rocket 16216 Real-time Android SMS listener matching LIVE
card Visa / Mastercard / Amex Simulated instant card gateway authorization DEMO SANDBOX
crypto USDT-TRC20 & Bitcoin Payer TXID hash submitted for admin manual approval REVIEW QUEUE
binance_pay Binance Pay ID Binance order ref submitted for admin approval REVIEW QUEUE

4. Package Commission Rates (Transparent Flat + %)

Plan BDT Commission Formula USD Commission Min Payout Setup Fee
Starter ৳10 + 2.00% $0.10 + 2.00% ৳1,000 Free
Professional ৳7 + 1.70% $0.07 + 1.70% ৳2,000 ৳5,000
Business ৳5 + 1.50% $0.05 + 1.50% ৳5,000 ৳15,000
Enterprise ৳2 + 1.00% $0.02 + 1.00% ৳10,000 Free
POST

/api/v1/payment/initiate

Initializes a hosted payment session with fee preview and returns a hosted checkout URL.

cURL Request Example
curl -X POST https://karianaquran.com/pay/api/v1/payment/initiate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer pk_live_aBcDeFgHiJkLmNoPqRsT" \
  -d '{
    "amount": 500,
    "order_id": "ORD-12345",
    "method": "bkash",
    "customer_name": "Rahim Ahmed",
    "customer_email": "rahim@gmail.com"
  }'
JSON Response (201 Created)
{
  "success": true,
  "message": "Payment session initialized.",
  "data": {
    "order_id": "ORD-12345",
    "amount": 500,
    "currency": "BDT",
    "method": "bkash",
    "receiver": "01712345678",
    "estimated_fee": 12.5,
    "estimated_net": 487.5,
    "payment_url": "https://karianaquran.com/pay/payment?a=500&p=bkash&orderId=ORD-12345",
    "status": "pending"
  }
}
POST

/api/v1/payment/verify

Verify a customer payment by submitting their MFS TrxID or card credentials.

curl -X POST https://karianaquran.com/pay/api/v1/payment/verify \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer pk_live_aBcDeFgHiJkLmNoPqRsT" \
  -d '{
    "order_id": "ORD-12345",
    "trx_id": "8A1B2C3D4E",
    "method": "bkash"
  }'
GET

/api/v1/balance

Query merchant wallet available balance, withdrawable balance, total withdrawn, and active tier rates.

{
  "success": true,
  "data": {
    "balance": 3594.50,
    "withdrawable_balance": 3094.50,
    "total_withdrawn": 2000.00,
    "currency": "BDT",
    "package": {
      "name": "Business",
      "slug": "business",
      "flat_fee_bdt": 5.00,
      "percent_fee": 1.5,
      "min_withdrawal": 5000.00
    }
  }
}

8. Webhooks & HMAC-SHA256 Signature

Configure your Webhook URL in Merchant Dashboard Settings. Every verified payment delivers an HTTP POST request signed with your private secret_key via the X-Signature-SHA256 header.

<?php
// Verification in PHP
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_SIGNATURE_SHA256'] ?? '';
$secret = 'sk_live_YOUR_SECRET_KEY';

$expected = hash_hmac('sha256', $payload, $secret);

if (hash_equals($expected, $signature)) {
    $event = json_decode($payload, true);
    // Payment verified: credit user order $event['order_id']
    http_response_code(200);
} else {
    http_response_code(401);
}