Supreme COD Fee and OTP for Cash on Delivery
Price
15 USD, paid license
SHORT DESCRIPTION (first lines of the description)
Stop fake and failed Cash on Delivery orders. Ask buyers to confirm their phone number with a one-time password (OTP) before a COD order is placed, and add a Cash on Delivery handling fee to the order totals. Works with OpenCart 2.3, 3.0, 4.0 and 4.1.
Detailed description
Cash on Delivery is popular, but it brings fake orders, wrong phone numbers and refused parcels. Supreme COD Fee and OTP fixes this with two tools that work together or on their own:
1. A phone verification step (OTP) for Cash on Delivery orders.
2. A Cash on Delivery fee that is added to the order total only when the buyer chooses COD.
How the otp step works
SMS DELIVERY: DUMMY MODE AND REAL GATEWAY
- The buyer picks Cash on Delivery at checkout.
- A clean card appears above the Confirm Order button: "Confirm your phone number for Cash on Delivery".
- The buyer presses Send OTP. A one-time password is sent to the phone number they typed in their order details. The number is masked on screen, for example *******567.
- On OpenCart 4.0 and 4.1 the Telephone field is shown on the My Account > Edit Account page while the module is on, so logged-in customers can add the number the OTP is sent to.
- The buyer types the code and presses Verify. A green message confirms the number.
- Only then can the order be confirmed. If the buyer presses Confirm Order too early, they see a clear message and the order is not placed.
- The check is also enforced on the server, so it cannot be skipped by tampering with the page.
- Test mode (dummy SMS): no SMS is sent. The OTP and the phone number are written to a log file in your OpenCart storage logs folder (system/storage/logs/cod_otp.log). You can see exactly what would have been sent, which makes setup and demos easy and costs nothing.
- SMS gateway mode: connect any SMS provider that has a simple web address (HTTP API). Enter the gateway URL, choose GET or POST, and use the placeholders {phone} {message} {otp} in the URL or the POST body. Values are encoded for you.
- Write your own SMS text and use {otp} and {minutes}. A live SMS preview in the admin shows what the buyer will receive.
Otp rules you control
- Switch the OTP requirement on or off.
- Require it only for orders above a chosen sub-total (0 means always).
- OTP length from 4 to 8 digits.
- How many minutes an OTP stays valid.
- How many seconds a buyer must wait before asking for another OTP.
- Maximum OTPs per phone number per hour, to stop SMS abuse.
The cash on delivery fee
- Adds a "Cash on Delivery Fee" line to the order totals, only when COD is the chosen payment method.
- Fixed amount, a percentage of the order total, or both together.
- Optional minimum fee and maximum fee.
- Free above a sub-total you choose (for example, free COD above 100).
- Optional tax class, a custom title and a sort order so the line sits where you want it.
- A live order preview in the admin shows how the fee changes the total before you save.
- Example: fixed 2.00 plus 1 percent. On an order that reaches 207.00 before the fee, the fee line shows 4.07.
Safety and privacy
- The OTP is sent only to the phone number of the current order, never to a number typed into the verify request.
- Codes are stored as secure hashes, not as plain text. They expire, and after 5 wrong tries a new code is needed.
- Rate limits protect your SMS budget.
- Does not change any core OpenCart file. It works with OpenCart events and the standard Order Total system.
- Uninstalling removes the settings, the events and the OTP table.
Works with
- Supreme One Page Checkout (fully tested together).
- Any checkout that uses the standard OpenCart Cash on Delivery payment extension. The OTP card is added to that payment step, and the fee uses the standard Order Total system.
- OpenCart 2.3.x, 3.0.x, 4.0.x and 4.1.x. A separate, ready-to-install package is included for each version.
- Tested on 2.3.0.2, 3.0.5.1, 4.0.2.3 and 4.1.0.4 with Supreme One Page Checkout: install, settings, fee line in the totals, sending and verifying an OTP, blocking of unverified orders, rate limits, switching features off, uninstall and reinstall.
Installation
1. Go to Extensions > Installer and upload the package that matches your OpenCart version.
2. Go to Extensions > Extensions, choose Modules, find Supreme COD OTP Confirmation, click Install, then Edit. Leave Test mode on while you try it.
3. Go to Extensions > Extensions, choose Order Totals, find Supreme COD Fee, click Install, then Edit. Set your fee and a sort order that places it after Shipping.
4. Make sure Cash on Delivery is enabled in your payment methods.
5. Place a test order with Cash on Delivery. Press Send OTP, open system/storage/logs/cod_otp.log to read the dummy code, enter it and press Verify.
6. When you are happy, switch Delivery mode to SMS gateway and enter your provider details.
OpenCart 2.3 note: the 2.3 installer copies files over FTP, so enter your FTP details in Settings first, or upload the contents of the "upload" folder to your store root.
Frequently asked questions
Do I need an SMS provider?
Not to try it. Test mode writes the OTP to a log file. For live use you need an SMS provider with a web address (HTTP API).
Can I use only the fee, without the OTP?
Yes. Install only the Order Total, or switch the OTP requirement off.
Can I use only the OTP, without the fee?
Yes. Just do not install the Order Total.
Which phone number is verified?
The phone number the buyer entered in their order details (or the one on their account when logged in).
Will it work with my one page checkout?
It is tested with Supreme One Page Checkout. Other checkouts should work if they show the standard Cash on Delivery payment step, but please try it on a test order first.
Support
Questions or problems? Send a message through the extension page and we will help you get it working.