> ## Documentation Index
> Fetch the complete documentation index at: https://codking.tech/documentation/llms.txt
> Use this file to discover all available pages before exploring further.

# Post-order OTP

> Verify a COD order after it is placed, on the Thank You and Order Status pages. Covers the theme blocks, OTP box text, retries, auto-cancel, SMS template and the custom script.

Post-order OTP lets the order be placed first and then asks the shopper to verify on the **Thank You** page and the **Order Status** page. Orders that are not verified in time can be cancelled automatically. It is a final checkpoint that confirms the buyer really wants the parcel.

[Post-order OTP demo](https://www.youtube.com/embed/kmPI6KACLRc)

## Open the page and activate

**1. Open COD King → Settings**

Under **COD workflow**, click **Post-order OTP verification**. The **After Order OTP verification** page opens, headed "Set up OTP verification for completed orders in 3 simple steps".

**2. Tick Activate OTP verification**

The status changes to **Active**. Your other settings are saved either way.

![After Order OTP verification page showing the Active status and the Activate OTP verification checkbox](https://mintcdn.com/codking/RvTbwbfi1Bd20aoj/images/otp-10-post-top.png?fit=max\&auto=format\&n=RvTbwbfi1Bd20aoj\&q=85\&s=f772fd4faa0141c771aaf4ebb870bc3b)

## Add the blocks in your theme

Under **Activate in theme** (marked *Required*), the **Setup Guide** says **Enable OTP Extensions in your theme**. There are two required steps.

![Activate in theme with the Open Thank You Settings and Open Order Status Settings buttons](https://mintcdn.com/codking/RvTbwbfi1Bd20aoj/images/otp-11-activate-theme.png?fit=max\&auto=format\&n=RvTbwbfi1Bd20aoj\&q=85\&s=c544c3f7b884fa0c4f7782e39381a1f7)

**1. Thank You page**

Click **Open Thank You Settings** (use **Show instructions** for a reminder). In the editor choose **Add block**, select the COD King thank-you OTP block, and click **Save**.

**2. Order Status page**

Click **Open Order Status Settings**. Choose **Add block**, select the COD King order-status OTP block, and click **Save**.

A **Sample Preview** below shows the box shoppers see: a heading *Verify OTP for faster delivery*, the number the code was sent to with a **change** link, an **Enter OTP** field, **Resend OTP in**, **Get code on WhatsApp** and a **submit** button.

## Configure form text in the OTP box

![Configure form Text in OTP box fields](https://mintcdn.com/codking/RvTbwbfi1Bd20aoj/images/otp-12-form-text.png?fit=max\&auto=format\&n=RvTbwbfi1Bd20aoj\&q=85\&s=faf5d597ba02aa2aa085429b77dcaa0a)

The words shown to customers on the Thank You and Order Status pages.

| Setting | Default |
| - | - |
| **OTP Box Heading Text** | Verify OTP for faster delivery |
| **OTP is sent on Text** | Please enter the OTP sent on |
| **Sending OTP to your Mobile Text** | Sending OTP to your mobile number... |
| **Resend OTP in Text** | Resend OTP in |
| **Whatsapp button text** | Get code on WhatsApp |

## Buttons and confirmation

![Buttons and confirmation fields](https://mintcdn.com/codking/RvTbwbfi1Bd20aoj/images/otp-13-buttons.png?fit=max\&auto=format\&n=RvTbwbfi1Bd20aoj\&q=85\&s=1ca60451a6fc2d776d21dc49a3ad84ee)

| Setting | Default |
| - | - |
| **Verify Button Text** | Verify OTP |
| **OTP Successful Text** | OTP Verification Successful! |
| **Phone number change button text** | change |
| **Submit button text** | submit |

## OTP settings

![OTP settings fields](https://mintcdn.com/codking/RvTbwbfi1Bd20aoj/images/otp-14-otp-settings.png?fit=max\&auto=format\&n=RvTbwbfi1Bd20aoj\&q=85\&s=adcdb8fe15eb93e566adb66955433ca9)

| Setting | What it does |
| - | - |
| **Max SMS retries per order** | The most times a customer can ask for the code again. Range 1 to 5, default 5. |
| **Wait time between 2 retries** | Seconds the **Resend** button stays disabled between two codes. |
| **OTP support or fallback text** | Optional help text shown with the OTP box. HTML is supported. |
| **Include product IDs for verification** | Product IDs, separated by commas, that must be verified whatever the payment method. |

## More settings (required)

![More Settings with Auto cancel orders and Auto Retry Verification](https://mintcdn.com/codking/RvTbwbfi1Bd20aoj/images/otp-15-more-settings.png?fit=max\&auto=format\&n=RvTbwbfi1Bd20aoj\&q=85\&s=db9379be6a23bcaa4a509c4698dbe8f1)

| Setting | What it does |
| - | - |
| **Auto cancel orders if not verified** | Cancels unverified COD orders after the time you choose. **Don't Send** (the default) leaves them alone. |
| **Notify customer on cancelation** | Sends an SMS to the customer when the order is cancelled. Available once auto cancel is on. |
| **Delete the Order itself** | Deletes the order from Shopify with no trace left. Available once auto cancel is on. |
| **Auto Retry Verification After** | Sends a verification reminder after the chosen time if the order is still not verified. |
| **Message template** | The SMS text. The code is filled in by `{{otp}}`. Changing the template may need approval, so chat with us before editing it. |

> [!WARNING]
>
> **Delete the Order itself** is permanent. Use auto cancel without it if you want to keep a record of cancelled orders.

## Custom script

![Custom Javascript box](https://mintcdn.com/codking/RvTbwbfi1Bd20aoj/images/otp-16-custom-script.png?fit=max\&auto=format\&n=RvTbwbfi1Bd20aoj\&q=85\&s=095afa82025d06b29299995602105d78)

**Custom Javascript - Executes post Verification** runs once when the phone number is verified through OTP. It is mostly used to fire analytics events.

## Test it

**1. Place a test COD order on your store**

Use Cash on Delivery.

**2. Look at the Thank You page**

The OTP box appears. Enter the code you receive.

**3. Check the order in Shopify**

A verified order carries your verification tag.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.