Quick answer
Our OTP SMS API is the same HTTPS endpoint as every other SMS: POST https://whitelabled.securesmsc.com/api/v2/sms/send with your DLT header and the OTP text. Your server creates the 6-digit code, stores a hash of it, sends it through the API and checks what the user types; there is no hosted verify endpoint. OTP SMS cost the same as other SMS, ₹0.20 or ₹0.15 per delivered SMS plus 18% GST, with no per-verification fee. Since TRAI's Third Amendment of 18 September 2026, log-in, password-reset and two-factor OTPs are Service messages, so register their templates in the Service category on DLT.
This page is for developers who build the OTP step into an app or website. For an overview of our OTP service and where businesses use it, see OTP SMS service.
How an OTP flow works on our API
- The user asks for a codeYour app sends the mobile number to your own server. Never call our API from a mobile app or browser JavaScript: anyone could read the API key there.
- Your server checks its limitsIs the number a valid Indian mobile number? Has it had a code in the last minute, or too many this hour? Is this IP address sending too many requests? Refuse early if so (see the security checklist).
- Your server makes the codeSix digits from a cryptographic random generator. Store a keyed hash of it with an expiry (5–10 minutes), a try counter and the time it was sent. Never store the code itself.
- Your server sends the SMSOne call to
POST /api/v2/sms/sendwithsender_id(your DLT header),recipientandmessage: your approved template with the code filled in. HTTP 200 with amessage_idmeans the platform accepted and queued the SMS, not that it was delivered. - The operator delivers itThe operator checks the header and text against your DLT registration and delivers the SMS, usually within seconds. The final status reaches your push URL or the status endpoint.
- The user types the codeYour server counts the try, checks the expiry, compares hashes in constant time and deletes the code when it matches, so it works once.
- Resend or fall backAfter the cooldown, let the user ask for a new code by SMS, which replaces the old one. If you have a WhatsApp Business API plan, you can offer WhatsApp as a second channel (see fallback).
| Task | Your server | Our API and platform |
|---|---|---|
| Generate the code | Yes | No |
| Store hash, expiry, tries | Yes | No |
| Send the SMS | Calls POST /sms/send | Checks the key, sender ID and balance, queues the SMS and hands it to the operator |
| DLT checks | Register header and template once | Matches the text to your templates; the operator scrubs it against DLT |
| Delivery report | Receives the push or polls the status | Sends the final status (delivered, failed, expired) |
| Verify the code | Yes | No (no verify endpoint) |
How fast OTP SMS arrive
OTP SMS are usually delivered within seconds. We don't publish an average delivery time or a delivery rate, because the parts that decide it are outside any gateway's control: the operator, whether the phone is switched on and in coverage, and whether your text matches its DLT template (a mismatch is rejected, not delayed).
Three things work in your favour:
- Single sends don't wait behind bulk jobs. Messages sent one at a time through
POST /sms/sendgo on their own queue, which the platform works through before bulk campaigns. An OTP doesn't sit behind a 50,000-number promotion. - Service messages ignore DND and time windows. Customers' DND preferences block promotional SMS, not Service or transactional ones, and promotional SMS go only between 9 AM and 9 PM. An OTP can go to a DND number at 2 AM.
- One SMS, not two. Keep the text within 160 plain characters. A ₹ sign, a curly apostrophe or an emoji switches the whole message to Unicode, where one SMS holds only 70 characters.
Before launch, send test codes to your own numbers on Jio, Airtel, Vi and BSNL and compare the send time with the delivery report.
TRAI change: authentication OTPs are now Service messages
TRAI's Telecom Commercial Communications Customer Preference (Third Amendment) Regulations, 2026, notified on 18 September 2026, rewrite the definition of a Service message. Part (i) now covers messages to your own customer about a product or service they use, including "OTPs for authentication, such as app login, password reset, two-factor authentication etc.", and says such messages "do not require Explicit Consent". TRAI's explanatory note says "OTPs for apps login" had been listed under Transactional messages by mistake, so it moved them to Service.
- Register OTP templates as Service. DLT portals file Service templates as Service Implicit or Service Explicit. A log-in OTP to your own user falls under part (i), which needs no explicit consent; confirm the right option on your portal.
- The header gets the -S suffix. Operators add a suffix from the template category, so your OTPs show as, for example, ACMEIN-S. See what -P, -S, -T and -G mean.
- Transactional is narrower now. It means a response to a transaction the customer started, sent within 30 minutes.
- Check your existing templates. If your OTP templates are registered as Transactional, ask your DLT portal whether they need to be filed again as Service. We can help you file them.
The amendment takes effect in stages: most of it 30 days after publication in the Official Gazette, some parts after 60 or 90 days. The full DLT process is in our DLT registration guide.
DLT OTP template examples
Register the text with the code as a variable. Use the numeric type for the code: {#num#} on the Vi and BSNL portals (older templates use {#var#}; other portals have their own notation). One variable is enough for an OTP; a template can have two, but not side by side. The variable types are explained in DLT template variable tags.
Log-in OTP
Template to register{#num#} is your OTP to log in to Acme. It is valid for 10 minutes. Do not share it with anyone. -Acme
Password reset
Template to registerUse OTP {#num#} to reset your Acme password. It expires in 10 minutes. Acme never asks for this code. -Acme
Sign-up or phone number check
Template to registerWelcome to Acme. Your verification code is {#num#}. It is valid for 10 minutes. -Acme
Android auto-read (SMS Retriever)
Google's SMS Retriever API reads the code without the user typing it. Google's rules: the message must be no longer than 140 bytes, contain the code and include an 11-character hash that identifies your app. The hash is fixed for your app, so it goes into the template as plain text.
Template to register{#num#} is your Acme login OTP. Valid for 10 minutes. Do not share it. -Acme FA+9qCX9VSu
On iPhones and in Safari, mark the input with autocomplete="one-time-code" and the code from the SMS is offered above the keyboard. No change to the SMS is needed.
Rules that stop most rejections
- Send the template word for word. Only the variable may change: same spaces, same punctuation, same brand name. A mismatch returns HTTP 422 with
error_code: TEMPLATE_MISMATCH. Check your text with the DLT template checker. - Plain characters only. Write "Rs", not ₹, and straight quotes. Our API detects Unicode by itself, and one non-ASCII character turns the whole SMS into Unicode (70 characters per SMS). Count with the SMS character counter.
- Say what the code is for, and that you never ask for it. It helps users spot a fraudster who asks them to read out a code.
- DLT IDs are optional. If you send both
dlt_entity_idanddlt_template_id, the platform skips its own template matching. Operators still check the text against DLT.
Fallback channels: resend, WhatsApp and voice
| Channel | Available? | What you need |
|---|---|---|
| SMS resend | Yes | The same API call after your cooldown. Send a new code that replaces the old one. |
Yes, through POST /api/v2/whatsapp/send | A WhatsApp Business API plan (₹999, ₹2,499 or ₹4,999 a month plus a one-time setup fee; Meta's per-message charges are extra; see WhatsApp API pricing) and an approved authentication template | |
| Voice call that reads out the code | Not offered | Our API has no voice OTP endpoint. |
How the WhatsApp fallback works. Meta's authentication templates have fixed wording with a "Copy code" button. Once your template is approved, you send its name and the code as the only parameter, and the platform puts the code in both the message and the button. Give the number with the country code (91…). The WhatsApp endpoint answers in its own format, with status "success" or "error" instead of success true or false. It returns 403 if WhatsApp isn't enabled for your account, 404 if the template isn't approved and 402 if your WhatsApp wallet is too low.
# Fallback: send the code with your approved WhatsApp authentication template.
# Same base URL and API key; needs a WhatsApp Business API plan on your account.
curl -X POST "https://whitelabled.securesmsc.com/api/v2/whatsapp/send" \
-H "Authorization: Bearer $SMS_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"to":"919876543210","template":"acme_login_otp","params":["482913"]}'
# 200: {"status":"success","data":{"message_id":"wamid.…","id":456,"to":"919876543210"}}
# Errors: {"status":"error","message":"…"}, e.g. 403 "WhatsApp is not enabled for this account…"
Don't send SMS and WhatsApp for every log-in. Offer WhatsApp as a choice when the user taps "Didn't get the code?" after the SMS cooldown, and keep one code, expiry and try counter across both channels.
Security checklist for OTP over SMS
- 6 digits from a secure random generator. Use
random_int(PHP),crypto.randomInt(Node.js) orsecrets(Python), neverrand()orMath.random(). - Short expiry: 5 to 10 minutes. One live code per number and purpose; a new code replaces the old one.
- Store only a keyed hash. A 6-digit code has just 10,00,000 values, so a plain SHA-256 of it can be reversed in seconds if your database leaks. Use HMAC-SHA256 with a secret kept outside the database, and include the phone number.
- Limit wrong tries. Void the code after 5 wrong attempts, and count each attempt before you compare, so parallel requests can't get extra guesses.
- Resend cooldown. Wait 30 to 60 seconds between codes to one number, and cap codes per number per hour, for example 5. Tune the numbers to your traffic.
- Rate limits per number and per IP. Apply them in your own endpoint before calling our API. Add a CAPTCHA if a public form is abused. Each of our API keys also has its own limit (60 requests a minute and 10,000 a day by default, adjustable per key up to 1,000 and 1,00,000), which works as a final ceiling.
- Watch for SMS pumping. In SMS pumping (toll fraud), bots fill your form with many numbers to make you pay for thousands of OTPs. Accept only the countries you serve (for most Indian apps, 10-digit mobile numbers starting with 6 to 9), apply the limits above, and alert when daily OTP sends rise far above sign-ups and log-ins.
- Never log OTPs. Keep codes and message text out of app logs, analytics, error trackers and support tools; log the
message_idand the result instead. A template-mismatch error repeats the start of your message indetails.message_preview, so don't log raw API responses for OTP sends. Like any SMS, the text is also kept in your SMS reports on our platform, and the status endpoint returns it, so limit who can open your dashboard. - Compare in constant time and use each code once.
hash_equals,crypto.timingSafeEqualorhmac.compare_digest; delete the code when it matches. Keep log-in and password-reset codes apart. - Protect the API key. Keep it on the server. Each key is locked to the first IP address that uses it, so add your server IPs under API & Integrations → API Management → IP Whitelisting before the first call, and use a separate key for OTP traffic.
Code: generate, store, send and verify an OTP
Get a free API key + 100 test SMS. Create an account at whitelabled.securesmsc.com/register and create a key under API & Integrations → API Management. Verified businesses also get 100 free SMS after KYC and DLT mapping. You need an approved header and OTP template before live messages go out.
All four samples follow the checklist above: 6-digit code, HMAC stored instead of the code, 10-minute expiry, 5 tries, 60-second resend cooldown and constant-time comparison. They only use POST /sms/send, so you don't need to turn on GET for the key. Set SMS_API_KEY and a long random OTP_SECRET as environment variables, and replace ACMEIN and the text with your approved header and template. There is no official SDK or package; these are plain HTTPS calls.
PHP (cURL and PDO)
<?php
// OTP over SMS with the OnlineSMSService API v2: generate, store a hash, send, verify.
// PHP 8.1+ with the curl and pdo extensions. One table (MySQL or SQLite):
// CREATE TABLE otp_codes (phone VARCHAR(15) PRIMARY KEY, code_hash CHAR(64) NOT NULL,
// expires_at INT NOT NULL, attempts INT NOT NULL DEFAULT 0, sent_at INT NOT NULL);
const SMS_API = 'https://whitelabled.securesmsc.com/api/v2';
const SENDER_ID = 'ACMEIN'; // your approved DLT header
const OTP_TTL = 600; // the code is valid for 10 minutes
const MAX_TRIES = 5; // wrong guesses before the code stops working
const RESEND_AFTER = 60; // seconds before the same number can get a new code
function otp_hash(string $phone, string $code): string
{
// HMAC with a server-side secret: a plain SHA-256 of a 6-digit code is easy to reverse.
return hash_hmac('sha256', $phone . '|' . $code, getenv('OTP_SECRET'));
}
function send_otp(PDO $db, string $phone): int
{
if (!preg_match('/^[6-9]\d{9}$/', $phone)) {
throw new InvalidArgumentException('Enter a 10-digit Indian mobile number.');
}
$q = $db->prepare('SELECT sent_at FROM otp_codes WHERE phone = ?');
$q->execute([$phone]);
$sentAt = $q->fetchColumn();
if ($sentAt !== false && time() - (int) $sentAt < RESEND_AFTER) {
throw new RuntimeException('Please wait a minute before asking for a new code.');
}
$code = sprintf('%06d', random_int(0, 999999));
// Must match your approved DLT template word for word ({#num#} is the code).
$text = "$code is your OTP to log in to Acme. It is valid for 10 minutes. Do not share it with anyone. -Acme";
$ch = curl_init(SMS_API . '/sms/send');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SMS_API_KEY'),
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['sender_id' => SENDER_ID, 'recipient' => $phone, 'message' => $text]),
]);
$raw = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$out = json_decode((string) $raw, true) ?: [];
if ($status !== 200 || empty($out['success'])) {
// Log this reason, never the code or the message text.
$reason = $out['error_code'] ?? $out['error'] ?? curl_error($ch);
throw new RuntimeException(trim("SMS failed ($status): $reason " . ($out['message'] ?? '')));
}
// Store only the hash, after the API accepted the SMS. A new code replaces the old one.
$db->prepare('REPLACE INTO otp_codes (phone, code_hash, expires_at, attempts, sent_at) VALUES (?, ?, ?, 0, ?)')
->execute([$phone, otp_hash($phone, $code), time() + OTP_TTL, time()]);
return (int) $out['data']['message_id'];
}
function verify_otp(PDO $db, string $phone, string $code): bool
{
// Count the attempt first, in one statement, so parallel guesses can't get past MAX_TRIES.
$u = $db->prepare('UPDATE otp_codes SET attempts = attempts + 1 WHERE phone = ? AND attempts < ? AND expires_at >= ?');
$u->execute([$phone, MAX_TRIES, time()]);
if ($u->rowCount() !== 1) {
return false; // no code, expired, or too many wrong tries
}
$q = $db->prepare('SELECT code_hash FROM otp_codes WHERE phone = ?');
$q->execute([$phone]);
if (!hash_equals((string) $q->fetchColumn(), otp_hash($phone, trim($code)))) {
return false;
}
$db->prepare('DELETE FROM otp_codes WHERE phone = ?')->execute([$phone]); // single use
return true;
}
// Usage, e.g. in your log-in controller:
// $db = new PDO('mysql:host=localhost;dbname=app', 'app_user', getenv('DB_PASSWORD'));
// send_otp($db, '9876543210'); // the user asked for a code
// if (verify_otp($db, '9876543210', $_POST['otp'] ?? '')) { /* sign the user in */ }
Node.js (18 or later)
// OTP over SMS with the OnlineSMSService API v2 (Node.js 18+, built-in fetch and crypto).
const crypto = require('node:crypto');
const SMS_API = 'https://whitelabled.securesmsc.com/api/v2';
const SENDER_ID = 'ACMEIN'; // your approved DLT header
const OTP_TTL_MS = 10 * 60 * 1000; // the code is valid for 10 minutes
const MAX_TRIES = 5; // wrong guesses before the code stops working
const RESEND_AFTER_MS = 60 * 1000; // wait before the same number can get a new code
// phone -> { hash, expiresAt, attempts, sentAt }. With more than one process, use Redis or your database.
const otps = new Map();
const otpHash = (phone, code) =>
crypto.createHmac('sha256', process.env.OTP_SECRET).update(`${phone}|${code}`).digest();
async function sendOtp(phone) {
if (!/^[6-9]\d{9}$/.test(phone)) throw new Error('Enter a 10-digit Indian mobile number.');
const prev = otps.get(phone);
if (prev && Date.now() - prev.sentAt < RESEND_AFTER_MS) {
throw new Error('Please wait a minute before asking for a new code.');
}
const code = String(crypto.randomInt(0, 1000000)).padStart(6, '0');
// Must match your approved DLT template word for word ({#num#} is the code).
const message = `${code} is your OTP to log in to Acme. It is valid for 10 minutes. Do not share it with anyone. -Acme`;
const res = await fetch(`${SMS_API}/sms/send`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.SMS_API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({ sender_id: SENDER_ID, recipient: phone, message }),
signal: AbortSignal.timeout(15000),
});
const out = await res.json().catch(() => ({}));
if (!res.ok || !out.success) {
// Log this reason, never the code or the message text.
throw new Error(`SMS failed (${res.status}): ${out.error_code ?? out.error ?? ''} ${out.message ?? ''}`.trim());
}
// Store only the hash, after the API accepted the SMS. A new code replaces the old one.
otps.set(phone, { hash: otpHash(phone, code), expiresAt: Date.now() + OTP_TTL_MS, attempts: 0, sentAt: Date.now() });
return out.data.message_id;
}
function verifyOtp(phone, code) {
const rec = otps.get(phone);
if (!rec || Date.now() > rec.expiresAt || rec.attempts >= MAX_TRIES) return false;
rec.attempts += 1;
if (!crypto.timingSafeEqual(rec.hash, otpHash(phone, String(code).trim()))) return false;
otps.delete(phone); // single use
return true;
}
module.exports = { sendOtp, verifyOtp };
Python (requests)
# OTP over SMS with the OnlineSMSService API v2 (Python 3.8+, pip install requests).
import hashlib
import hmac
import os
import re
import secrets
import time
import requests
SMS_API = "https://whitelabled.securesmsc.com/api/v2"
SENDER_ID = "ACMEIN" # your approved DLT header
OTP_TTL = 600 # the code is valid for 10 minutes
MAX_TRIES = 5 # wrong guesses before the code stops working
RESEND_AFTER = 60 # seconds before the same number can get a new code
# phone -> {"hash", "expires_at", "attempts", "sent_at"}. With more than one process, use Redis or your database.
otps = {}
def otp_hash(phone, code):
key = os.environ["OTP_SECRET"].encode()
return hmac.new(key, f"{phone}|{code}".encode(), hashlib.sha256).hexdigest()
def send_otp(phone):
if not re.fullmatch(r"[6-9]\d{9}", phone):
raise ValueError("Enter a 10-digit Indian mobile number.")
prev = otps.get(phone)
if prev and time.time() - prev["sent_at"] < RESEND_AFTER:
raise ValueError("Please wait a minute before asking for a new code.")
code = f"{secrets.randbelow(1_000_000):06d}"
# Must match your approved DLT template word for word ({#num#} is the code).
message = f"{code} is your OTP to log in to Acme. It is valid for 10 minutes. Do not share it with anyone. -Acme"
r = requests.post(
f"{SMS_API}/sms/send",
headers={"Authorization": f"Bearer {os.environ['SMS_API_KEY']}", "Accept": "application/json"},
json={"sender_id": SENDER_ID, "recipient": phone, "message": message},
timeout=15,
)
try:
out = r.json()
except ValueError:
out = {}
if r.status_code != 200 or not out.get("success"):
# Log this reason, never the code or the message text.
reason = out.get("error_code") or out.get("error") or ""
raise RuntimeError(f"SMS failed ({r.status_code}): {reason} {out.get('message') or ''}".strip())
# Store only the hash, after the API accepted the SMS. A new code replaces the old one.
otps[phone] = {"hash": otp_hash(phone, code), "expires_at": time.time() + OTP_TTL,
"attempts": 0, "sent_at": time.time()}
return out["data"]["message_id"]
def verify_otp(phone, code):
rec = otps.get(phone)
if not rec or time.time() > rec["expires_at"] or rec["attempts"] >= MAX_TRIES:
return False
rec["attempts"] += 1
if not hmac.compare_digest(rec["hash"], otp_hash(phone, str(code).strip())):
return False
del otps[phone] # single use
return True
cURL (bash script for testing)
#!/usr/bin/env bash
# The whole OTP flow from a terminal with bash, openssl and cURL. Good for testing your
# DLT template and API key; use the PHP, Node.js or Python code in your app.
# Needs SMS_API_KEY and OTP_SECRET in the environment.
set -euo pipefail
SMS_API="https://whitelabled.securesmsc.com/api/v2"
PHONE="9876543210" # your own test number
OUT=$(mktemp); trap 'rm -f "$OUT"' EXIT
hmac() { printf '%s|%s' "$PHONE" "$1" | openssl dgst -sha256 -hmac "$OTP_SECRET" -r | cut -d' ' -f1; }
# 1. Generate a 6-digit code and keep only its HMAC, a 10-minute expiry and a try counter
OTP=$(printf '%06d' $(( $(od -An -N4 -tu4 /dev/urandom | tr -d ' ') % 1000000 )))
HASH=$(hmac "$OTP"); EXPIRES=$(( $(date +%s) + 600 )); TRIES=0
# 2. Send it. The text must match your approved DLT template.
MSG="$OTP is your OTP to log in to Acme. It is valid for 10 minutes. Do not share it with anyone. -Acme"
HTTP=$(curl -sS -o "$OUT" -w '%{http_code}' -X POST "$SMS_API/sms/send" \
-H "Authorization: Bearer $SMS_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d "{\"sender_id\":\"ACMEIN\",\"recipient\":\"$PHONE\",\"message\":\"$MSG\"}")
unset OTP MSG
if [ "$HTTP" != "200" ] || ! grep -q '"success":true' "$OUT"; then
echo "SMS failed ($HTTP): $(grep -oE '"(error_code|error|message)":"[^"]*"' "$OUT" | tr '\n' ' ')"
exit 1
fi
echo "Sent. $(grep -oE '"message_id":[0-9]+' "$OUT")"
# 3. Verify what you type: 5 tries, before the code expires
while [ "$TRIES" -lt 5 ] && [ "$(date +%s)" -le "$EXPIRES" ]; do
read -r -p "Code: " INPUT
TRIES=$((TRIES + 1))
if [ "$(hmac "$INPUT")" = "$HASH" ]; then echo "Verified"; exit 0; fi
echo "Wrong code"
done
echo "Code expired or too many tries"; exit 1
How we tested them (7 November 2026). Each sample was run against the live API with a dummy key, which answers HTTP 401 {"success":false,"error":"Unauthorized","message":"Invalid API key"}; the samples raised that error and stored nothing. Against a local test server returning the 200 response below, each sample stored a hash (never the code), and the verify step accepted the right code once, rejected a wrong code, rejected the right code after 5 wrong tries and after expiry, and refused a second send inside the cooldown. The test harness isn't part of this page.
Responses to handle
# 200: the API accepted the SMS (queued, not yet delivered)
{"success":true,"message":"SMS queued successfully","data":{"message_id":123,"queue_id":123,"status":"queued","estimated_delivery":"2026-11-07T10:32:00.000000Z"}}
# 422: the text doesn't match an approved DLT template
{"success":false,"error":"Template Verification Failed","message":"…","error_code":"TEMPLATE_MISMATCH","details":{"sender_id":"ACMEIN","message_preview":"…","suggestion":"…"}}
- 401 Unauthorized: missing, wrong, disabled or expired key, or an inactive account.
- 403 Forbidden: "IP address not allowed…": the call came from an IP that isn't on the key's list.
- 400 Invalid sender ID: the header isn't approved on your account. 400 SMS dispatch failed: see
errors, for example "Insufficient credits. Required: X, Available: Y". - 422: "Validation failed" (a field is missing or wrong) or
TEMPLATE_MISMATCH. - 429 Rate limit exceeded: wait for
retry_afterseconds (also in theRetry-Afterheader). Don't retry in a loop.
For any of these, tell the user "We couldn't send the code. Please try again in a minute." and keep the details in your logs. The full list of endpoints and errors is in our API documentation, and you can try a send in the API playground.
How to choose a service for sending OTP SMS
Look past the headline price. These are the questions that decide whether codes arrive and what they really cost:
- DLT: will they help register your header and Service templates, and can you link an existing DLT entity?
- Price: per SMS or per delivered SMS? Is there a per-verification fee, a minimum pack or recharge, and do credits or discounted rates expire?
- Reports: do you get a final delivery status by push and by API?
- Key safety: can you lock keys to IP addresses and set your own rate limits?
- Fallback: which second channels exist, and what do they cost?
- Support: who answers when codes stop arriving, in which hours and languages?
| OTP price (before GST) | Hosted verification | Other OTP channels | |
|---|---|---|---|
| OnlineSMSService | ₹0.20 or ₹0.15 per delivered SMS; no verification fee, no minimum top-up | No; your server verifies (code above) | WhatsApp with a WhatsApp Business API plan; no voice OTP |
| MSG91 | SendOTP packs from ₹0.25 down to ₹0.18 per OTP | OTP widget with no monthly fee | Voice, WhatsApp and email, billed per their rate card |
| Fast2SMS | ₹0.25 down to ₹0.11 per SMS by recharge size, same as other DLT SMS | See their site | See their site |
| Twilio Verify | US$0.05 per successful verification plus the SMS fee (US$0.0832 per SMS to India) | Yes | See their site |
Another service can be the better fit. If you want a hosted verification step or a voice OTP without writing the verify code, MSG91's OTP widget and Twilio Verify do that. If you can prepay ₹1,30,000 or more in one recharge, Fast2SMS's rate (₹0.13, or ₹0.11 from ₹6,00,000) is below ours for as long as the discounted rate lasts. If you send under 1,00,000 OTPs a month, want to pay only for delivered SMS without a minimum, and are happy to own the verify step, we are a good fit. Detailed comparisons: vs MSG91, vs Fast2SMS, vs Twilio and Twilio alternatives in India.
What OTP SMS cost
One rate for OTP, transactional and promotional SMS, billed per delivered message: ₹0.20 per SMS on Starter (up to 10,000 a month) and ₹0.15 on Business (up to 1,00,000 a month), plus 18% GST. Custom pricing above 1,00,000. No setup fee, no monthly fee, no minimum top-up, and credits never expire.
| Example month | SMS sent | Cost | With 18% GST |
|---|---|---|---|
| 10,000 log-ins, no resends | 10,000 | ₹2,000 (Starter, ₹0.20) | ₹2,360 |
| The same, 1 in 10 users taps Resend | 11,000 | ₹2,200 (₹0.20) | ₹2,596 |
| 50,000 log-ins | 50,000 | ₹7,500 (Business, ₹0.15) | ₹8,850 |
See all plans on the pricing page.