NewDirect Send — reply after WhatsApp's 24-hour window without a template. Free on every plan. See how it works →
Lead Pattern

WhatsApp OTP · Authentication templates

WhatsApp OTP for your app and website

Send sign-up, login and password-reset codes to your users on WhatsApp, from your own business number. Your app calls the Lead Pattern API, Meta's authentication template delivers the code with a Copy Code button, and in India you pay Meta's ₹0.115 per delivered OTP (plus GST) with zero markup.

₹0.115 per delivered OTP + GST · Copy Code button · Plans from ₹1,500*/month · 14-day free trial on Growth

✨ Ask AI about this page:ChatGPT logoChatGPTClaude logoClaudePerplexity logoPerplexity
9:41
Lead Pattern

Your business

Authentication template

⚡ Automated

482913 is your verification code. For your security, do not share this code. This code expires in 10 minutes.
Copy Code

Quick answer

What is a WhatsApp OTP?

A WhatsApp OTP is a one-time passcode sent as a WhatsApp message instead of an SMS. It uses Meta's Authentication template: fixed wording, your code and a Copy Code button. To send one with Lead Pattern you need the official WhatsApp Business API (we help you set it up), an approved authentication template, and a developer who connects your app to our API. In India each delivered OTP costs ₹0.115 + GST at Meta's rate.

Use cases

When your app sends a code

Use the same authentication template for all of them — your app decides when to send it.

Sign-up

Confirm a new user's phone number before you create the account.

Login

Send a login code, or a second step after the password.

Password reset

Prove it's really the account owner before the password changes.

Payment confirmation

Ask for a code before you confirm a payment or an important order change.

Send a WhatsApp verification code to your customers

Every WhatsApp OTP uses Meta's Authentication template. You can't write your own text — Meta sets the wording and you supply the code:

  • The message: "<code> is your verification code."
  • Optional security note: "For your security, do not share this code."
  • Optional expiry line: "This code expires in <N> minutes." — you choose 1 to 90 minutes.
  • One button: with Lead Pattern it is always Copy Code. The user taps it and pastes the code into your app or website.
  • Code length: up to 15 characters.
  • No links, media or emojis — Meta doesn't allow them in authentication templates. Keep offers in separate marketing templates.

Each delivered code costs ₹0.115 + GST in India (Meta's authentication rate; Lead Pattern adds no markup).

Security: the code only shows on the user's main phone. If they open WhatsApp on a linked device (such as WhatsApp Web), they see a prompt to view the message on their main phone instead. Meta switches this on for every authentication message and it can't be turned off.

How it works

Send your first OTP in four steps

1

Create the authentication template

Create it through the API with POST /template/auth: a name, a language, and two options — addSecurityRecommendation adds the security note, codeExpirationMinutes (1–90) adds the expiry line. Meta writes the wording and the Copy Code button, then reviews the template.

2

Create an API key

Make a named API key for your app. It's shown once; usage logs show every request and you can lock it to your server's IP address.

3

Send the code from your app

Each time a user needs a code, your server calls POST /whatsapp/message/auth-template with the user's number (with country code), the template name, its language and the code. Lead Pattern builds the OTP button for you.

4

Check delivery

A successful send returns 201 with a WhatsApp messageId. On Growth, webhooks (message_status_update) tell your system when the message is delivered.

What your user sees

Which button will my user see?

Every row is from Meta's documentation. Lead Pattern creates Copy Code templates only.

Where the user opens the messageWhat they get with Lead Pattern (Copy Code)
Android phoneA Copy Code button — tap to copy, then paste into your app.
iPhone on iOS 26 or laterA Copy Code button, and the code is also offered as a keyboard suggestion — no extra work for you.
Older iPhoneA Copy Code button.
WhatsApp Web or another linked deviceA prompt to open the message on the main phone — the code itself shows only there.
Message not delivered within its time-to-liveNothing — WhatsApp drops it, so the user never gets an out-of-date code.

Meta also offers one-tap autofill and zero-tap buttons (Android only, and both need changes in your Android app). Lead Pattern does not offer these: its authentication templates always use Copy Code.

How long the code lasts

Two different timers matter:

  • Code expiry (your choice): the "This code expires in N minutes" line, set from 1 to 90 minutes with codeExpirationMinutes. Your app is the one that actually rejects an old code, so make your check match the number you show.
  • Time-to-live (Meta): how long WhatsApp keeps trying to deliver the message. For authentication templates Meta's default is 10 minutes (Meta allows 30 seconds to 15 minutes). A message that can't be delivered in that time is dropped, and Meta charges only for delivered messages.

Meta's advice is to keep the time-to-live equal to or shorter than the code's expiry. The Lead Pattern API docs don't list a time-to-live setting, so plan around Meta's 10-minute default — for example, an expiry of 10 minutes or more.

Cost in India

What WhatsApp OTPs cost

Meta charges authentication messages per delivered message. In India the rate is ₹0.115 per OTP, before GST, and Lead Pattern passes it on with zero markup.

OTPs deliveredMeta fee at ₹0.115 (before GST)
1,000₹115
10,000₹1,150
1,00,000 (1 lakh)₹11,500
10,00,000 (10 lakh)₹1,15,000

Meta rates last checked on 27 November 2026 (Meta's India rate card effective 1 October 2026). Your Lead Pattern plan is charged separately.

Cost rules to know

  • Charged only when delivered. Meta bills authentication messages per delivered message at its published rate.
  • The 1,000 free messages don't cover OTPs. The first 1,000 free messages a month are for service replies inside an open chat only.
  • Free inside a Click-to-WhatsApp free window. If the user came from a Click-to-WhatsApp ad and you replied within 24 hours, Meta opens a free entry point window of up to 7 days, and messages in it — OTPs included — cost nothing.
  • Indian business, Indian users: ₹0.115. A business always pays the normal domestic rate in its own country.
  • Business based outside India: Meta can charge the higher authentication-international rate (₹2.4971 per OTP) to Indian numbers, but only once the business is eligible: more than 750,000 messages outside service windows in a moving 30-day period to users in the countries that have this rate. Meta says that once a business is eligible, it stays eligible.
  • Your plan: Starter is ₹1,500 + GST a month with 1,000 REST API calls a month and no webhooks; Growth is ₹3,500 + GST a month with 1,00,000 API calls a month and webhooks. If you send one OTP per API call, Starter covers about 1,000 OTPs a month. See pricing →

Compare WhatsApp and SMS costs → · WhatsApp rates by country →

WhatsApp vs SMS

WhatsApp OTP vs SMS OTP

WhatsApp OTPSMS OTP
Who can receive itOnly people who have WhatsApp on that numberAny mobile number
Setup in IndiaMeta business verification + an approved authentication templateDLT registration of your business, sender ID and templates (TRAI rules)
Message textMeta's fixed wording with your codeYour own registered template
Copy buttonYes — Copy Code (plus a keyboard suggestion on iOS 26+)—
Sender shownYour business nameA short sender ID, e.g. AB-SHOPCO
Price per code (India)₹0.115 per delivered OTP + GST (Meta's rate)Set by your SMS provider
Sent by Lead Pattern—

Lead Pattern sends WhatsApp only. Keep your SMS provider as a backup for users who don't have WhatsApp — Meta's own advice is not to make WhatsApp the only way to get a code.

WhatsApp OTP API

Two endpoints do the work. Send your API key as-is in the Authorization header (no "Bearer" prefix); the base URL is https://public.leadpattern.com.

  • POST /template/auth — submits a new authentication template to Meta. Fields: name, language, addSecurityRecommendation (default false) and codeExpirationMinutes (1–90). The button label is always Copy Code.
  • POST /whatsapp/message/auth-template — sends an approved authentication template. Each item in messages needs to (the number with country code) and content with templateName, language and code. Use this endpoint for OTPs: the general template endpoint doesn't build the OTP button. One request can send to several numbers.

API limits by plan: Starter includes 1,000 REST API calls a month and no webhooks; Growth includes 1,00,000 calls a month, unlimited API keys and webhooks. Full API reference → · More code examples →

1 · Create the authentication template (once)bash
curl -X POST https://public.leadpattern.com/template/auth \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "otp_login",
    "language": "en_US",
    "addSecurityRecommendation": true,
    "codeExpirationMinutes": 10
  }'
2 · Send a code each time a user needs onebash
curl -X POST https://public.leadpattern.com/whatsapp/message/auth-template \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      {
        "to": "+91XXXXXXXXXX",
        "content": {
          "templateName": "otp_login",
          "language": "en_US",
          "code": "482913"
        }
      }
    ]
  }'
Success response (201)json
{
  "type": "success",
  "data": {
    "messages": [
      {
        "status": "SENT",
        "recipient": "91XXXXXXXXXX",
        "messageId": "wamid.abc123"
      }
    ]
  }
}

Checklist

Code not arriving for your customer?

CheckWhy it matters
Is the number on WhatsApp, with the country code?Only WhatsApp users can receive it. Send to the full number (e.g. +91…), and tell users the code will arrive on WhatsApp.
Is the template approved and in the Authentication category?Only approved authentication templates can be sent through POST /whatsapp/message/auth-template.
What did the API answer?201 means accepted. 401 = API key problem, 402 = plan quota used up or subscription inactive, 422 = phone number not valid, 429 = too many requests (wait for Retry-After).
Was it delivered within the time-to-live?If WhatsApp couldn't deliver it within 10 minutes (Meta's default), it was dropped. Let the user ask for a new code.
Is the user looking at WhatsApp Web?The code shows only on their main phone. A linked device just shows a prompt to open it there.
Do you track delivery?On Growth, the message_status_update webhook tells your system when each message is delivered.

Frequently asked questions

What is WhatsApp OTP?+

A one-time passcode sent as a WhatsApp message instead of an SMS. Businesses send it with Meta's Authentication template when a user signs up, logs in, resets a password or confirms a payment.

How much does a WhatsApp OTP cost in India?+

₹0.115 per delivered OTP at Meta's authentication rate for India, before GST. Lead Pattern adds no markup. For example, 10,000 OTPs cost ₹1,150 and 1 lakh OTPs ₹11,500, plus GST, on top of your plan.

Can I send a WhatsApp OTP without an authentication template?+

Through Lead Pattern's API, yes — once Meta enables it for your account. Meta's Direct Send for authentication messages is in alpha and needs Meta's approval; codes are then sent with POST /whatsapp/message/direct-send/otp, with a Copy code, one-tap or zero-tap button. Direct Send →

Can I send OTP on WhatsApp for free?+

No. Authentication messages are charged per delivered message. The 1,000 free messages a month are for service replies only. The one exception is Meta's free entry point window after a Click-to-WhatsApp ad, where messages cost nothing for up to 7 days.

Can I write my own OTP text?+

No. Meta uses fixed wording: “<code> is your verification code.” You choose only the optional security note and the expiry line (1–90 minutes).

Does Lead Pattern support one-tap or zero-tap autofill?+

Not today. Lead Pattern's authentication templates always use the Copy Code button. One-tap and zero-tap are Meta options for Android that need changes in your Android app. iPhones on iOS 26 or later also offer the code as a keyboard suggestion, with no work on your side.

How long is the code valid?+

You choose an expiry of 1 to 90 minutes, shown in the message. Separately, if WhatsApp can't deliver the message within its time-to-live — 10 minutes by default for authentication templates — it is dropped.

What if the user doesn't have WhatsApp?+

They can't receive a WhatsApp OTP. Lead Pattern sends WhatsApp only, so keep an SMS provider as a backup — Meta advises not to make WhatsApp the only way to get a code.

Is WhatsApp OTP secure?+

Meta adds protections: the code shows only on the user's main phone (linked devices see a prompt instead), you can add “For your security, do not share this code.”, and links, media and emojis aren't allowed in authentication templates.

Do I need a developer?+

Yes. OTPs are sent by your app or website at the moment a user needs a code, so a developer connects it to the Lead Pattern REST API.

Will a foreign company pay more to send OTPs to Indian users?+

It can. Meta charges the authentication-international rate (₹2.4971 per OTP to Indian numbers) only to businesses based outside India that have become eligible by sending more than 750,000 messages outside service windows in a moving 30-day period. An Indian business sending to Indian users always pays the normal ₹0.115.

I'm not getting WhatsApp's own login code. Can you help?+

This page is for businesses that send codes to their customers. The code WhatsApp sends to log in to your own WhatsApp account comes from WhatsApp itself — please use the help options in the WhatsApp app. We can't help with personal WhatsApp accounts.

Lead Pattern

Send login codes where your users already are.

14-day free trial on Growth · Plans from ₹1,500*/month

Ask AI about this page

Get a quick summary of this page from your favourite AI assistant — based only on leadpattern.com. Be one of the first to try it.