Twilio SMS
Send time-sensitive notifications to bidders via SMS.
What gets sent
| Event | Channel |
|---|---|
| Outbid (final hour) | SMS |
| Auction ending soon (5 min) | SMS |
| Auction won | SMS |
| Payment reminder | SMS |
| Wallet OTP (transfer / withdrawal) | SMS (always) |
| 2FA login code | SMS |
Customers opt in by adding a verified phone number in My Account → Account details.
Configure
Auctions → Settings → Integrations → Twilio
| Field | Option key | Where to find |
|---|---|---|
| Twilio Account SID | wkafw_twilio_sid | Twilio Console → Account Info |
| Twilio Auth Token | wkafw_twilio_token | Twilio Console → Account Info |
| From phone number | wkafw_twilio_from | Your Twilio phone number, E.164 format |
Test numbers
Twilio's free trial gives you a single sandbox phone number. SMS to verified test numbers only. For production, upgrade Twilio account.
Phone verification flow
When a customer adds a phone number:
- Plugin sends OTP via Twilio
- Customer enters OTP within 5 minutes
- Phone marked verified on the customer's account
- Phone is now usable for SMS / OTP
Unverified phones don't receive non-OTP messages (cost protection).
SMS templates
Default templates ship with the plugin and can be overridden:
| Trigger | Template |
|---|---|
| Outbid | You've been outbid on {title}. Bid again: {url} |
| Ending soon | Auction ending in 5 min: {title}. Place final bid: {url} |
| Won | 🎉 You won {title} for {amount}. Pay now: {url} |
| OTP | Your verification code is {code}. Valid 5 min. |
| 2FA | Your login code is {code}. |
Templates are short — SMS has a 160-char single-segment limit. Longer messages cost more (multi-segment).
Cost considerations
Twilio bills per message. Approximate costs:
| Channel | US | UK | India |
|---|---|---|---|
| SMS | $0.008 | $0.04 | $0.005 |
For a high-traffic auction site, SMS costs add up — be selective about which triggers send SMS. Push (Firebase) is free and works for most cases; reserve SMS for time-sensitive / high-value events.
Opt-in / Opt-out
| Setting | Default |
|---|---|
| Opt-in required | yes (phone must be verified) |
| Per-trigger toggles | yes (in Customer notification preferences) |
| STOP keyword | yes (replying STOP unsubscribes the user) |
| HELP keyword | yes (replies with support info) |
The plugin handles inbound STOP / HELP via the Twilio inbound webhook described below.
Inbound webhook
Configure your Twilio number's webhook to: https://yoursite.com/wp-json/wkafw/v1/twilio/webhook
Events handled:
- Inbound SMS (STOP, HELP, custom commands)
- Delivery status callbacks (sent / delivered / failed)
- Failed delivery (cost protection — disables the user's phone after N consecutive failures)
Testing
Use Twilio's test credentials (free) for development:
| Test number | Behavior |
|---|---|
| +15005550006 | Always succeeds |
| +15005550001 | Always fails |
Configure wkafw_twilio_sid to your test SID, wkafw_twilio_token to test token, and use these numbers as recipients.
Common questions
"How do I disable SMS for development?"
Set wkafw_twilio_sid to empty. The plugin skips SMS sending entirely (logged in WP error log).
"Can I send to international numbers?"
Yes — Twilio supports E.164 globally. Verify your Twilio account has international SMS enabled (default in most plans).
"What about A2P 10DLC compliance?"
In the US, A2P (application-to-person) SMS over 10DLC numbers requires brand + campaign registration. Configure in Twilio Console; the plugin's wkafw_twilio_from should be a registered 10DLC number.
"Why aren't OTP messages arriving?"
Most common: phone number isn't in E.164 format (no + prefix). Plugin tries to normalize but for non-US numbers, ensure the user enters with country code.
