Search pages in the SMS Pay documentation.
API keys authenticate merchant server-side integrations. They are scoped to one merchant and one environment. Sandbox keys can create sandbox payment intents and sandbox SMS events. Live keys create live payment intents and accept live Android SMS events.
Merchant API authentication uses X-Api-Key.
X-Api-Key: sk_test_xxxxxxxxxxxxxxxxx
Dashboard-only routes use a logged-in dashboard JWT session. Do not use dashboard JWTs for merchant backend integrations.
X-Api-Key header.const gateway = {
baseUrl: "https://api.smspaybd.com",
apiKey: process.env.SMS_PAY_SANDBOX_KEY!,
};
async function gatewayFetch(path: string, init: RequestInit = {}) {
return fetch(`${gateway.baseUrl}${path}`, {
...init,
headers: {
"Content-Type": "application/json",
"X-Api-Key": gateway.apiKey,
...init.headers,
},
});
}
GET /v1/payments/intents?limit=10
X-Api-Key: sk_test_xxxxxxxxxxxxxxxxx
{
"data": [
{
"id": "b5012f33-207e-4999-bf8d-5a1ebb10988e",
"environment": "SANDBOX",
"amount": "500",
"currency": "BDT",
"status": "PENDING",
"customerReference": "ORDER-10045",
"receiverMsisdn": "01700000001",
"checkoutUrl": "https://smspaybd.com/checkout/b5012f33-207e-4999-bf8d-5a1ebb10988e",
"expiresAt": "2026-05-05T10:05:00.000Z"
}
],
"total": 1,
"page": 1,
"limit": 10
}
| Endpoint family | Authentication |
|---|---|
/v1/payments/intents | X-Api-Key |
/v1/webhooks/* | X-Api-Key |
/v1/sms-events/incoming | X-Api-Key plus X-Signature |
/v1/sandbox/sms-events/simulate | Sandbox X-Api-Key only |
/v1/checkout/:id | Public, no API key |
/v1/sandbox/test-cases/* | Dashboard JWT session |
/v1/sandbox/simulator/run | Dashboard JWT session |
environment field; the server derives environment from the key.X-Api-Key.