> ## 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.

# COD Form Setup

> Turn the COD Form on, choose where the COD button shows, set the countries, phone verification and address suggestions.

The **Setup** page is where the COD Form is switched on and where you decide who sees it. To open it, go to **COD King → Settings → COD FORM → Setup**.

![Open COD Form Setup from the COD FORM menu](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-02-open-cod-form-setup.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=3bf9752a4aec12cfc59d9cfc23e2bdaf)

## 1. Check the app embed

At the top of the page, the **App embed** card tells you whether the COD Form app embed is active in your theme. When everything is right, it shows **On in your theme**.

* **Check again** re-checks your theme after you change something.
* **Open theme editor** opens your Shopify theme editor, where you can switch the **COD Form** app embed on.

The **COD Form** card below it shows whether the form itself is **On**. Use **Turn off** to stop the form from opening, or **Turn on** to start it again.

![App embed and COD Form status on the Setup page](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-03-setup-app-embed.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=9c404be52a9d55ed5eef959c57ccb6f3)

> [!TIP]
>
> If you change a setting and the storefront does not update, use **Resync settings to storefront** at the top right of the page.

## 2. Choose the form language

Under **Form language**, pick the language of the COD button, quantity offers, bundles, upsells and the whole order form.

By default it uses **Storefront language (default)**, so shoppers see the form in the language they browse your store in. You can also pick a fixed language, and you can edit every text in the [Form designer → Texts](https://codking.tech/documentation/cod-form/form-designer.md#4-texts) tab.

![Form language setting](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-04-setup-form-language.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=6e992f5feed1569c6cc8d54357c93e41)

## 3. Set up phone verification (OTP)

Verify the shopper's phone number with a one-time code before the order is placed.

* **Ask buyers to verify their phone number with a code** — turns verification on for the COD Form. It applies to the COD Form only; your other COD King checkout settings are not changed.
* **Let buyers get the code on WhatsApp** — SMS is always offered. With this on, the shopper can choose WhatsApp instead.
* **Codes a buyer can request** — how many codes one shopper can ask for.
* **Wait before resending** — how many seconds a shopper must wait before asking for a new code.

Then choose **When to ask for the code**:

* **Before the order is created** *(recommended)* — no order exists until the phone number is verified.
* **Create the order first, then verify** — the order is created straight away and tagged once the shopper verifies.
* **Only for medium-risk buyers** — uses COD King's return-risk score. Low-risk buyers skip the code.

![OTP verification settings](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-05-setup-otp-verification.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=b1843ed50495d7f95df6302a49ddd58b)

### What your buyer sees

With verification on and **Before the order is created** selected, the buyer enters a phone number and taps **Continue**. A **Verify your phone number** screen then asks for the 4-digit code that was sent to that number. The buyer can wait for the **Resend code** timer, ask for the code on WhatsApp, or tap **Change number**. **Verify and continue** moves on to the address form.

![The verify-your-phone-number screen on the storefront](https://mintcdn.com/codking/-7j5WFh9RKYI6UNg/images/cf-60-store-otp.png?fit=max\&auto=format\&n=-7j5WFh9RKYI6UNg\&q=85\&s=69bd8e363368aae60bf93231147bc4cb)

> [!WARNING]
>
> If a COD Form shows the OTP screen even though **Ask buyers to verify their phone number with a code** is off, check the [Form designer](https://codking.tech/documentation/cod-form/form-designer.md#custom-fields). The option **Ask for the phone number first** works together with OTP, and the form asks for a code whenever it is on.

> [!NOTE]
>
> Changes you save here reach your storefront after a short delay. If the storefront still shows the old behaviour, click **Resync settings to storefront** at the top of this page, then reload the product page.

## 4. Choose where the COD button shows

Under **Where the COD button shows**, tick the places that should get the COD button:

* **Product page**
* **Cart page**
* **Cart drawer**
* **Quick buy on home and collection pages**

Then choose **Products**:

* **All products** — every product gets the COD button.
* **Selected products and collections** — only the ones you pick.

Under **Never show on**, use **Select products** and **Select collections** to exclude items that should never get the COD button.

Keep **Hide the COD button for out-of-stock variants** ticked to avoid offering COD on something shoppers cannot buy. Products that fail a **Limit COD** rule never get the COD button either; those rules are set once, in **Limit COD**.

![Where the COD button shows](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-06-setup-button-placement.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=c1baffe20a175ee13216e45d88e21a17)

## 5. Choose the countries

Under **Countries**, search and add the countries where the COD button should appear. Shoppers in other countries get your normal checkout.

If no country is selected, the form is available in every country.

![Countries setting](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-07-setup-countries.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=180a686ca84e02e7da1dc2b066905caa)

## 6. Turn on address suggestions

**Address autocomplete** suggests full addresses while the shopper types, so fewer orders come back with a wrong address. You bring your own key from an address provider, and the provider bills you directly for its use.

1. Tick **Suggest addresses while the buyer types**.
2. Choose an **Address provider**: **Ola Maps Places (India)** or **Google Places**.
3. Paste your provider's API key into the key field below it.
4. Save, then test the form on your store and type a few letters of an address.

![Address autocomplete settings](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-08-setup-address-autocomplete.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=e109a9304ac7295d1678a4828b468bf2)

### Get an Ola Maps API key

Best for stores shipping inside India.

1. Register for [Krutrim Cloud](https://cloud.olakrutrim.com/signUp) and sign in.
2. Open the **Developer Portal** and go to **Credentials**.
3. Click **New Credentials** at the top right.
4. Enter a **name** (for example "COD King address suggestions") and a description.
5. Check that the new credential appears in the credentials table, then click its name.
6. Copy the **API Key** from the details page. Ignore the OAuth2 values.
7. In the same details page, add your store domains (comma separated, for example `yourstore.com, yourstore.myshopify.com`) and click the add button to whitelist them.
8. Wait a few minutes: Ola activates the credential with its default plan shortly after you create it.
9. Back in COD King, choose **Ola Maps Places (India)**, paste the key into **Ola Maps API key**, and save.

### Get a Google Places API key

Best for stores shipping in many countries.

1. Sign in to the [Google Cloud console](https://console.cloud.google.com) and create or pick a **project**.
2. Open **Billing** and link a billing account to the project. Places APIs need billing on.
3. Go to **APIs & Services → Library**, search for **Places API (New)**, and click **Enable**.
4. Go to **APIs & Services → Credentials**, click **Create credentials**, and choose **API key**.
5. Click the new key to edit it. Under **Application restrictions** choose **Websites** and add your store domains, for example `https://yourstore.com/*` and `https://yourstore.myshopify.com/*`.
6. Under **API restrictions** choose **Restrict key** and pick **Places API (New)** only.
7. Save and copy the key.
8. Back in COD King, choose **Google Places**, paste the key, and save.

> [!TIP]
>
> Create a separate key for COD King. If it is ever leaked, you can delete it without affecting anything else.

### What your buyer sees

When address suggestions are working, the buyer starts typing in the **Address** box and a list of matching addresses drops down. Tapping one fills in the street, PIN code and state at once, so the buyer types less and makes fewer mistakes.

![Address suggestions dropping down under the Address box](https://mintcdn.com/codking/-7j5WFh9RKYI6UNg/images/cf-57-store-address-suggest.png?fit=max\&auto=format\&n=-7j5WFh9RKYI6UNg\&q=85\&s=a4e8403b485698d1484ba5bb2501d473)

### If suggestions do not appear

* The key is wrong or has extra spaces. Paste it again.
* The domain is not whitelisted or restricted correctly. Add both your custom domain and your `myshopify.com` domain.
* The provider API is not enabled or billing is off (Google), or the credential is not active yet (Ola).
* The buyer's country is not in **Enabled countries** (step 5).

> [!WARNING]
>
> Treat your address provider API key like a password. Never paste it into screenshots, support chats or public pages.

> [!NOTE]
>
> Steps follow the provider docs: [Ola Maps authentication](https://maps.olakrutrim.com/docs/auth) and [Google Places API keys](https://developers.google.com/maps/documentation/places/web-service/get-api-key). Provider consoles change, so labels may differ slightly.

## 7. Read the Health check

The **Health check** card lists anything that stops the COD Form from working properly, with an **Open** button that takes you straight to the page where you can fix it.

Below it, **Form orders this month** shows how many orders the COD Form created in the current calendar month. Test orders and prepaid redirects are not counted.

![Health check and form orders this month](https://mintcdn.com/codking/Yn-PScIyACqIzwd1/images/cf-09-setup-health-check.png?fit=max\&auto=format\&n=Yn-PScIyACqIzwd1\&q=85\&s=e7e375cca367f0e42b26badc6051df34)

***

> [card] [Next: Buttons](https://codking.tech/documentation/cod-form/buttons.md)
>
> Change the text, colours and placement of the COD button.

> [card] [Fraud protection](https://codking.tech/documentation/cod-form/fraud-protection.md)
>
> Add order limits and block lists before you go live.


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