← Back
Smart COD Control

How to Set Up Twilio SMS for Smart COD Control OTP Verification

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.

Twilio SMS OTP setup for Smart COD Control

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

  1. Go to twilio.com and sign up for a free account.
  2. Verify your email address and phone number during signup.
  3. Once logged in, you will land on the Twilio Console Dashboard.

Step 2: Get Your API Credentials

  1. Find the Account Info section on the dashboard.
  2. Copy your Account SID — it starts with AC.
  3. Copy your Auth Token — click the eye icon to reveal it.

Step 3: Get a Twilio Phone Number

  1. Go to Phone Numbers → Manage → Buy a Number.
  2. Filter by your country and ensure the number has SMS capability.
  3. Click Buy (free trial accounts get one number at no charge).
  4. 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

  1. Go to WooCommerce → Smart COD Control → OTP Settings.
  2. Toggle Enable OTP Verification to ON.
  3. Under SMS Provider, select Twilio.
  4. Paste your Account SID and Auth Token.
  5. Enter your Twilio phone number in the From Number field (include the + and country code).
  6. 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

  1. Open your store in an incognito window and add a product to cart.
  2. At checkout, select Cash on Delivery.
  3. Enter a verified phone number, click Send Code, and enter the received OTP.
  4. 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.