Search pages in the SMS Pay documentation.
The Android SMS Agent runs on the merchant-controlled phone that receives mobile wallet SMS messages. Its job is simple: read trusted provider SMS messages and forward them to the gateway as SMS events.
The agent does not create payment intents and does not decide whether a payment is paid. The server stores the SMS event and runs reconciliation.
The device signs the exact raw JSON body with HMAC-SHA256 using the API key.
import crypto from "node:crypto";
const apiKey = process.env.SMS_PAY_LIVE_KEY!;
const payload = {
sender: "bKash",
message:
"You have received payment Tk 500.00 from 01711111111. Ref ORDER-10045. Fee Tk 0.00. Balance Tk 10000.00. TrxID ABCD1234 at 05/05/2026 10:00",
receiverMsisdn: "01700000001",
receivedAt: "2026-05-05T10:00:00.000Z",
deviceId: "merchant-phone-01"
};
const rawBody = JSON.stringify(payload);
const signature =
"sha256=" + crypto.createHmac("sha256", apiKey).update(rawBody).digest("hex");
Validate the device:
POST /v1/sms-events/validate-device
X-Api-Key: sk_live_xxxxxxxxxxxxxxxxx
X-Signature: sha256=<hmac>
Content-Type: application/json
{
"deviceId": "merchant-phone-01"
}
{
"valid": true,
"deviceId": "merchant-phone-01",
"environment": "LIVE",
"allowedPaymentMethods": ["BKASH_PAYMENT"]
}
Send an incoming SMS event:
POST /v1/sms-events/incoming
X-Api-Key: sk_live_xxxxxxxxxxxxxxxxx
X-Signature: sha256=<hmac>
Content-Type: application/json
{
"sender": "bKash",
"message": "You have received payment Tk 500.00 from 01711111111. Ref ORDER-10045. Fee Tk 0.00. Balance Tk 10000.00. TrxID ABCD1234 at 05/05/2026 10:00",
"receiverMsisdn": "01700000001",
"receivedAt": "2026-05-05T10:00:00.000Z",
"deviceId": "merchant-phone-01"
}
{
"id": "sms_123",
"status": "RECEIVED",
"queued": true,
"duplicate": false
}
Check statuses sent by the same device:
POST /v1/sms-events/status-batch
X-Api-Key: sk_live_xxxxxxxxxxxxxxxxx
X-Signature: sha256=<hmac>
Content-Type: application/json
{
"deviceId": "merchant-phone-01",
"smsEventIds": ["sms_123"]
}
receiverMsisdn should match the wallet number shown on checkout.