COD Order Verification by SMS
Fake or careless Cash on Delivery orders cost you shipping both ways. With COD verification, Payflow sends the customer a 6-digit code by SMS right after a COD order. The customer enters it on the Thank you or Order status page. Confirmed orders get a tag. Orders not confirmed in time are cancelled or tagged, as you choose.
The code is sent after the order is placed, not inside checkout. Shopify does not let apps ask for a code before the order exists. See OTP or phone verification at checkout.
How it works
Section titled “How it works”- A customer places an order with your Cash on Delivery payment method. The order is unpaid, as COD orders are until the courier collects.
- Payflow sends a 6-digit code by SMS to the phone number on the order.
- The customer enters the code in the COD verification block on the Thank you page. If they leave, they can enter it later on the Order status page, after logging in to their customer account.
- Confirmed orders get the tag
cod-verified. When the time to confirm runs out, an unconfirmed order is cancelled, or only taggedcod-unverifiedif you turned cancelling off.
When the time runs out, Payflow leaves the order alone if it is already paid or fulfilled, or already has your confirmed tag. So if you confirm an order by phone, add the confirmed tag (cod-verified by default) by hand to stop the cancellation.
The customer can ask for a new code twice, so an order gets at most three SMS. After 5 wrong codes the customer has to request a new one. The SMS is short and without diacritics, in the customer’s checkout language when it is Czech, Slovak, Polish, German, Hungarian or English. Otherwise Payflow picks the language from the phone number’s country, and English for the rest.
Set it up
Section titled “Set it up”In Payflow, open COD verification in the app menu.
1. Checkout setup
Section titled “1. Checkout setup”The Checkout setup card helps with three things:
- Thank you page: click Add block to open the checkout editor with the COD verification block. Save the checkout.
- Order status page: add the same block here, so customers can confirm later from their order.
- Phone number at checkout: codes go by SMS, so set the phone number to required in Shopify admin → Settings → Checkout.
The two pages show Added or Not added. The block appears only on COD orders that still need confirming.
2. Settings
Section titled “2. Settings”| Setting | What it does |
|---|---|
| Verify cash on delivery orders | Turns verification on or off. |
| COD payment methods | Which payment methods count as COD. Use Is exactly or Contains text with the method name. If you leave it empty, any method named like cash on delivery counts. If you have a Cash on Delivery Setup, Payflow suggests its payment methods. |
| Verify orders shipping to | All countries or Selected countries. |
| Store name in the SMS | Your store name in the message, up to 40 characters. |
| Tag confirmed orders | Tag for confirmed orders. cod-verified by default. |
| Cancel orders that are not confirmed | On: the order is cancelled and restocked, and Shopify notifies the customer. Off: the order is only tagged. On by default. |
| Time to confirm | 15 or 30 minutes, or 1, 2, 4, 8 or 24 hours. 30 minutes by default. |
| Tag unconfirmed orders | Tag for orders not confirmed in time. cod-unverified by default. |
Click Save in the save bar.
To tag and cancel orders, Payflow needs permission to edit orders. If it is missing, a banner asks you to Grant permission. Until you grant it, codes are still sent, but orders get no tags and nothing is cancelled.
Who sends the SMS and what it costs
Section titled “Who sends the SMS and what it costs”Payflow decides by the country of the phone number, not of your store.
European numbers: Payflow credits
Section titled “European numbers: Payflow credits”Payflow sends codes to numbers in the EU, Iceland, Liechtenstein, Norway, Switzerland and the United Kingdom, and charges them to prepaid credits.
- Pro includes $1 of credit every month. Unused credit does not carry over.
- A code costs from $0.05 to $0.12, depending on the country. Prices per country in the Codes to European numbers card lists them.
- A resent code costs the same. A code that fails to send is refunded.
- Buy more credit with Buy (fixed amounts) or Other amount ($1 to $1,000). Credit activity lists every code, resend, refund and purchase.
Monthly spending limit
Section titled “Monthly spending limit”Monthly spending limit caps the paid credit spent per calendar month. The free monthly credit does not count toward it. Leave the field empty for the default of $20, or enter your own amount. The help text under the field shows how much you spent this month.
When the limit is reached, no more codes go out until next month, and orders get only the tag cod-verify-skipped-spend-limit. They are not cancelled. The limit protects your credit from fake orders placed to trigger SMS.
Other countries: your own SMS account
Section titled “Other countries: your own SMS account”For numbers outside Europe, connect your own Twilio or MSG91 account in the Codes to other countries card. Codes then go out at your provider’s price, with no Payflow credit. For MSG91 you need a DLT-approved OTP template with the ##OTP## variable. Click Send test SMS to check the setup.
Turn on Use it for European numbers too to send all codes through your own account. No credits are used then.
Without your own account, orders to numbers outside Europe are only tagged cod-verify-skipped-no-sender, never cancelled.
When an order gets no code
Section titled “When an order gets no code”The order gets a tag and is never cancelled when:
| Tag | Reason |
|---|---|
cod-verify-skipped-no-phone | The order has no phone number. |
cod-verify-skipped-invalid-phone | The phone number is not valid. |
cod-verify-skipped-no-sender | The number is outside Europe and no own SMS account is connected. |
cod-verify-skipped-no-credit | Not enough credit. |
cod-verify-skipped-spend-limit | The monthly spending limit is reached. |
cod-verify-skipped-sms-limit | Too many codes to one number (5 a day) or from your store (200 in an hour). |
cod-verify-not-sent | The code could not be sent. The credit is refunded. |
These orders get no code and no tag:
- paid orders, and orders with a payment method that is not on your COD list,
- orders shipping to a country outside Selected countries,
- orders placed without the online checkout, such as draft orders or orders created by a COD form app. Their customers could never reach the code box.
The Last 30 days card shows how many codes were sent, how many orders were confirmed and how many were cancelled.