Smart COD Control supports two SMS providers for OTP verification: Twilio and Vonage. This guide walks you through setting up Twilio — the most widely used SMS API worldwide — step by step.
What You Will Need
A Twilio account (free trial is fine for testing)
Smart COD Control v1.3.1 or newer installed and active
A verified Twilio phone number
Step 1: Create a Twilio Account
Go to twilio.com and sign up for a free account.
Verify your email address and phone number during signup.
Once logged in, you will land on the Twilio Console Dashboard.
Step 2: Get Your API Credentials
Find the Account Info section on the dashboard.
Copy your Account SID — it starts with AC.
Copy your Auth Token — click the eye icon to reveal it.
Step 3: Get a Twilio Phone Number
Go to Phone Numbers → Manage → Buy a Number.
Filter by your country and ensure the number has SMS capability.
Click Buy (free trial accounts get one number at no charge).
Copy the number in E.164 format, e.g. +14155552671.
Note: On a free trial, Twilio can only send SMS to verified numbers. Upgrade to a paid account to send to any number.
Step 4: Configure Smart COD Control
Go to WooCommerce → Smart COD Control → OTP Settings.
Toggle Enable OTP Verification to ON.
Under SMS Provider, select Twilio.
Paste your Account SID and Auth Token.
Enter your Twilio phone number in the From Number field (include the + and country code).
Click Save Settings.
Step 5: Customise the OTP Message
Use the placeholder {otp} where you want the code to appear. Example:
Your verification code for your COD order at MyStore is {otp}. Valid for 10 minutes.
Step 6: Test It
Open your store in an incognito window and add a product to cart.
At checkout, select Cash on Delivery.
Enter a verified phone number, click Send Code, and enter the received OTP.
Complete the order to confirm everything works.
Troubleshooting
SMS not arriving — Double-check your Account SID, Auth Token, and From Number. Trial accounts can only send to verified numbers.
Invalid credentials error — Re-copy credentials from the console and watch for accidental whitespace.
Country not supported — Some countries require a local Twilio number. Check Twilio coverage docs.
Once connected, customers receive OTP codes within seconds and your COD cancellation rate will start dropping immediately.