Documentation
WhatsApp login code: sign in and check out with a code
At the end, your customers type their WhatsApp number on a login page, get a code in WhatsApp and are signed in to your store, without a password. If you choose, shoppers also confirm their number this way before they reach checkout.
What you need
- Any plan, from Starter up (see the plans)
- Your number connected to Meta’s WhatsApp Cloud API, with every check working in Connection Doctor
- An approved template in the Authentication category in Meta
- Customers with a WhatsApp number in Kuwait, Saudi Arabia, the UAE, Qatar, Bahrain or Oman: these six are in the form’s country picker
As of 17 October 2026, Meta charges each login code as an authentication message, at its rate for the customer’s country, to your own WhatsApp account. The hourly limits below stop anyone from running up that bill.
Steps
-
Create an authentication template in Meta
In Meta’s WhatsApp Manager, create a template in the Authentication category, in the language your customers read. Meta gives these templates a fixed text with one blank for the code; you choose the options and the button, for example “Copy code”. Wait until Meta approves it. You can also create it inside WordPress: WAPI Connect → Templates → “New template”, with the “Login code” starting point. The message templates guide has the details.
-
Enter the template in the plugin
Open WAPI Connect → Settings → Templates. Next to “Verification code (OTP)”, write the template’s exact name and its language code (for example
aroren_US), as in WhatsApp Manager. The plugin puts the code in{{1}}and, if the template has one, in the button. -
Turn on the login
Open the “OTP Login” tab and tick “Enable OTP Login” (“Let customers log in with a code sent to their WhatsApp”). Then check the other fields:
- “OTP Length (digits)”: 4 to 8 digits, 6 by default.
- “OTP Expiry (minutes)”: how long a code works, 1 to 30 minutes, 5 by default.
- “Max OTP Attempts”: wrong tries before the customer has to ask for a new code, 5 by default.
- “Rate Limit — per Phone (per hour)” and “Rate Limit — per IP (per hour)”: the most codes one number and one network can ask for in an hour, 10 and 20 by default.
- “Redirect After Login”: where customers go after signing in on the login page. Left empty, they go to checkout (WooCommerce shows the cart page instead when the cart is empty; a site without WooCommerce sends them to the home page). To send them to My account, paste its link here. Shoppers who were sent to the form from checkout always go back to checkout.
- “Authentication Template Button”: the same button your template has. Keep “With a button (Copy code, one-tap or link)” when the template has a button, as most do, and choose “None (body only)” only if it has none.
- “Auto-create Account”: tick it to create a customer account for a number the store does not know yet. If it is off, only customers who already have an account with that phone number can sign in.
Press “Save Settings”.
-
Put the form on a page
When you activate the plugin, it creates a page called “WhatsApp Login” (
/whatsapp-login/) with the form on it. To check, open Settings → Debug: “WhatsApp Login Page” says “Exists” with its link, or shows a “Create Now” button.You can also put the shortcode
[wapi_whatsapp_login]on any page. The settings screen shows the older name[amwca_whatsapp_login]; both show the same form. Add the page to your store’s menu or link to it from your login button.
The form on a phone, after the customer typed a number and the code was sent: the code goes in box by box, or in one go with “Paste code”. The number is hidden except its last digits. Demo store data. -
Make it look like your store
The form speaks the “Customer language” chosen in Settings → General. In Settings → Login page look you can add a “Login Page Logo URL”, change the colours and write your own title and subtitle in Arabic and English under “Login Page Text”.
-
Ask for the code before checkout (optional)
In Settings → General, untick “Checkout Safe Mode”, tick “WhatsApp-Only Checkout” (“Require WhatsApp OTP verification before customers can reach checkout”) and press “Save Settings”. “WhatsApp-Only Checkout” only works while “Checkout Safe Mode” is off.
From then on, a shopper who has not signed in with a WhatsApp code is sent to the WhatsApp Login page with the note “Your order has been saved. Enter your WhatsApp number to continue checkout.”, and goes straight back to checkout after the code. The My account login form becomes the WhatsApp form, and a number without an account gets one. Administrators are never sent to the form, and the WordPress admin login stays as it is.
Checkout Safe Mode is on for a reasonWith “Checkout Safe Mode” on, the plugin never stands between a shopper and the payment. Turn it off only if you want every buyer to confirm a WhatsApp number first, and test a full order on your phone right after.
What your customer sees
- They choose the country, type their WhatsApp number and press “Send code on WhatsApp”. Under the number there is an optional box, “Send me order updates and offers on WhatsApp”, which is never ticked for them. Signing in alone is not consent to offers.
- The code arrives in WhatsApp. “Open WhatsApp” opens the chat, and “Paste code” brings the copied code back into the boxes. On iPhone the code can also appear above the keyboard.
- They press “Verify” (or the form signs them in as soon as the code is complete) and see “You are signed in”.
Customers can type the code in Arabic digits, press “Change number”, or press “Resend code” when the countdown ends.
Check that it worked
- Open the WhatsApp Login page on your phone in a private window (or after signing out) and sign in with your own WhatsApp number.
- The code arrives in WhatsApp from your business number, and after “Verify” you are signed in and taken to the page in “Redirect After Login” (checkout when it is empty).
- WAPI Connect → Health & tools → Message log shows the code message with the context “OTP”.
Common problems
The page is empty: no form shows
The form only shows while “Enable OTP Login” (Settings → OTP Login) or “WhatsApp-Only Checkout” (Settings → General) is on. Save the settings and reload the page.
“We could not send the code on WhatsApp right now. Please try again in a moment.”
WhatsApp refused the message. The usual reasons: the template name or language code in Settings → Templates does not match WhatsApp Manager, the template is not approved yet, or “Authentication Template Button” does not match the template’s button. Health & tools → Message log shows Meta’s exact error.
“This number is not on WhatsApp. Check the number and try again.”
WhatsApp says the number has no WhatsApp account. The customer should check the number and the country.
“Too many requests. Please try again later.”
That number or that network asked for more codes this hour than the rate limits allow. The customer can try again in the next hour, or you can raise the limits in Settings → OTP Login.
“Account not found. Please contact support.”
“Auto-create Account” is off and no customer account has that phone number. Tick “Auto-create Account”, or add the number to the customer’s account.
“Invalid or expired code. Please try again.”
The code was wrong or older than “OTP Expiry (minutes)”. After “Max OTP Attempts” wrong tries the customer sees “Too many failed attempts. Please request a new code.”
Shoppers still reach checkout without a code
“Checkout Safe Mode” is still on, “WhatsApp-Only Checkout” is off, or you are signed in as an administrator. Test in a private window as a customer.
“Login with WhatsApp is not available right now. …”
The plugin cannot send messages at the moment: it is switched off (“Enable Plugin” in Settings → General), the emergency stop is on, or the license ended and its 14-day grace period is over. While that lasts, the form steps aside: customers can still order as guests if your store allows guest checkout, and customers with a password can log in with it. Sending starts again as soon as the cause is fixed.
My customer’s country is not in the list
The form’s country picker has the six Gulf countries only: Kuwait, Saudi Arabia, the UAE, Qatar, Bahrain and Oman.