Nothing kills a signup faster than an OTP that never arrives. The user waits, taps resend, waits again — and then leaves. In Pakistan, where most signups, logins and payment confirmations depend on a one-time code sent by SMS, a failed OTP is not a small glitch: it is a lost customer, a stalled checkout or a support ticket.
This guide walks through the reasons OTP SMS fails in Pakistan, how to diagnose each one, and what to change so your codes arrive on time.
The most common reasons OTP SMS fails
1. The number is wrong — or in the wrong format
This is the single most common cause, and it is also the easiest to fix. A mistyped digit, a missing digit, or a number entered in a format the gateway cannot parse will fail before it ever reaches a network. Pakistani numbers should be sent in international format, for example +923001234567 (the Pak Sender API also accepts the local format 03001234567 and converts it to +92 automatically). Normalising at the point of entry removes a whole class of errors. When a number cannot be parsed at all, the API returns an INVALID_NUMBER error, so your code can catch it and ask the user to check the number instead of silently failing.
2. The phone is unreachable
Sometimes the message is fine and the phone is the problem. A switched-off handset, a phone out of coverage, an inactive SIM or a number that has been ported between networks can all delay or block delivery. In these cases the message usually shows as sent in your delivery report but never reaches delivered, which is the status recorded only when the handset confirms receipt.
3. The message is blocked or filtered
Some users have Do Not Disturb (DND) settings active, or their handset filters promotional-looking messages into a spam folder. Messages sent from an unrecognised sender are more likely to be filtered than messages from a short code or an approved sender ID the user has seen before.
4. The route is congested
SMS networks get busy. Peak hours, mass campaign traffic and network maintenance can all slow delivery, so a code that normally arrives in seconds can take minutes. If your logs show messages delivered late rather than failed, congestion is the likely cause, and the fix is on the design side: give the code a sensible expiry window and make the resend button easy to find, rather than assuming every send is instant.
5. The code expired before it was used
Every OTP has a lifetime. On the Pak Sender verification API the expiry is configurable from 1 to 30 minutes, with a 10-minute default. If a user requests a code, gets distracted, and types it in after it has expired, verification fails with a CODE_EXPIRED error — the message itself was delivered fine. A window of a few minutes is typical for most apps; whatever you choose, show the user how long the code is valid for and offer a resend when it expires.
6. The account side is blocked
Not every failure is about the phone or the network. Short-code SMS on Pak Sender requires the account's SMS permission and approved KYC — if KYC is not complete, the API returns a KYC_REQUIRED error (HTTP 403). Short-code and SIM API calls also only work from an approved website, app or IP address, which you submit in the dashboard for admin approval. A low balance stops sends as well, since messages are charged from your PKR balance. And if your app fires too many requests at once, the 60-requests-per-minute rate limit returns HTTP 429.
A checklist to run when an OTP doesn't arrive
- Check the API response. Was the send accepted (
"status": "success")? An error code such asINVALID_NUMBERorKYC_REQUIREDtells you exactly what went wrong. - Check the delivery status.
sentmeans the message left the gateway;deliveredmeans the handset confirmed it. Stuck atsentpoints to the phone or the network. - Verify the number. Confirm the digits with the user and that the number is in international format (+92).
- Check expiry and attempts. Was the code entered after it expired? After 5 wrong tries a verification locks (
CODE_LOCKED) and a fresh code is needed. - Check the account. KYC approved? Domain or IP allow-listed? Balance topped up? Rate limit respected?
- Ask the user to check spam and DND. A quick check of the blocked-messages folder solves more cases than most developers expect.
How to prevent OTP failures in the first place
- Validate numbers at entry. Normalise to +92 international format and reject obviously invalid numbers before sending.
- Show the countdown. Tell the user how long the code is valid and make resending one tap away.
- Handle errors in code. Branch on the stable
error_codefield, not the message text, soCODE_INVALID,CODE_EXPIREDandCODE_LOCKEDeach get the right user-facing response.
For more on the reporting side, see our guide on how to improve SMS delivery rates and avoid failed messages.
When SMS can't get through: use voice OTP
Some users will never reliably receive SMS — poor coverage, aggressive filters, or a handset that blocks unknown senders. For them, a voice call that reads the code aloud is the most reliable fallback. Pak Sender's voice OTP costs Rs 5.00 per call and is refunded if the call is not answered. The result is unambiguous: delivered means the call was answered, expired means it was not answered, and failed means busy, rejected or failed. You can read more in our guide to voice OTP in Pakistan and our comparison of SMS OTP vs WhatsApp OTP vs voice OTP.
If you are integrating OTP for the first time, the API documentation covers the full verification flow.
Frequently asked questions
Why is my OTP SMS delayed in Pakistan?
Delay is usually caused by network congestion at peak times, a phone that is temporarily out of coverage, or a message queued behind bulk traffic. Check the delivery status: sent means it left the gateway, delivered means the handset confirmed it.
What should I do if the OTP never arrives at all?
First check the number and its format, then check the API response and delivery status. Ask the user to check their spam or blocked-messages folder and DND settings.
How long should an OTP code stay valid?
A few minutes is typical for most apps. The Pak Sender verification API lets you set expiry from 1 to 30 minutes, with a 10-minute default.
Can I resend an OTP if the first one fails?
Yes. Start a new verification to generate a fresh code — the old code is replaced. After 5 wrong attempts a verification locks (CODE_LOCKED), so the user needs a new code at that point anyway.