Skip to content
The InfiQ GlossaryFeature

Templates

Coupon Code Template

A WhatsApp marketing template with a copy-code button that puts a promo code on the customer's clipboard, so it can be pasted at checkout in one tap.

Also called: Copy offer code template · Promo code template · COPY_CODE button (marketing) · Discount code template

InfiQ Glossaryreviewed Practitioner

What is a coupon code template?

A coupon code template is a marketing template that carries a single copy-code button. The customer reads the offer, taps the button, and WhatsApp copies the promo code to the phone's clipboard, ready to paste into a website or app checkout. It removes the most error-prone step of a discount campaign: retyping a code such as DIWALI25 correctly from memory.

Structurally it is an ordinary marketing template with one extra button type. The body (up to 1,024 characters) explains the offer and can repeat the code as a variable; an optional text header of up to 60 characters adds a headline; and the BUTTONS component holds one COPY_CODE button with an example code, optionally next to a quick-reply button such as "Stop promotions". The code itself is supplied at send time, up to 20 characters, so each customer can get a unique, single-use code. The button label is fixed by WhatsApp and cannot be customised, and a template can have only one copy-code button.

It is easy to confuse with two neighbours. The copy-code button on an authentication template looks similar but carries a verification code, with Meta's fixed wording and the authentication rate; a coupon template is marketing, needs marketing opt-in and is charged at the marketing rate (₹0.94 per delivered message in India). A limited-time offer template can also include a copy-code button, but adds an expiry timer and an offer heading in the bubble; a coupon template has no timer, so any deadline lives in your body text.

Key takeaways

  • A coupon code template is a marketing template whose copy-code button puts a promo code on the customer's clipboard in one tap.
  • The code is a send-time parameter of up to 20 characters, so one approved template can carry a unique code for every customer.
  • A template can hold only one copy-code button, and WhatsApp sets its label; it cannot be customised.
  • Coupon templates are billed at the marketing rate and are not supported in the WhatsApp web client, so repeat the code in the body.

Figure 1

Will your coupon fit? Type and see

8 / 20 characters

Fits, with 12 characters to spare.

Sent as coupon_code at send time. Short, unique codes paste cleanly.

29 / 60 characters

Fits, with 31 characters to spare.

Optional headline above the body.

172 / 1,024 characters

Fits, with 852 characters to spare.

Repeat the code here so web and desktop users still see it.

15 / 25 characters

Fits, with 10 characters to spare.

The opt-out button that can sit beside the copy-code button.

Counted in Unicode code points, so an emoji, ₹ or an accented letter counts as one character.

The limits that decide whether a coupon template sends: the code on the button, the headline, the offer text and the opt-out label. Edit any field and watch its counter change colour.

Example: Single-use Diwali codes for a Lucknow lamp maker

A Lucknow brass-lamp maker sends a coupon code template to 12,000 customers who opted in to offers. The body reads "Hi {{1}}, our Diwali collection is live. Use {{2}} at checkout for 25% off until 3 November." and the copy-code button carries a unique eight-character code per customer. Because every code is single-use and stored against the customer and the message ID, the team sees that 7% of delivered messages led to an order and spots one code being tried by several accounts, which it blocks.

— Single-use Diwali codes for a Lucknow lamp maker

Why it matters

Why does a coupon code template matter?

Discount campaigns lose customers at the moment of redemption: codes mistyped on a small keyboard, forgotten between the chat and the checkout, or shared screenshots that leak to coupon sites. A copy-code button closes the gap between the message and the cart, and unique per-customer codes let a business tie each redemption back to the exact WhatsApp send that produced it.

How does a coupon code template work?

  1. Write the offer and pick the code style

    Decide between one shared code and unique single-use codes generated per customer. Unique codes give clean attribution and are harder to leak.

  2. Create the marketing template

    Submit a MARKETING template with a body, an optional text header and a BUTTONS component containing one COPY_CODE button with an example code. Add a quick-reply opt-out if you like; the copy-code label itself is fixed.

  3. Supply the code at send time

    In the send request, add a button component with sub_type: copy_code, the button's index and a parameter of type: coupon_code holding the customer's code, up to 20 characters.

  4. Redeem and attribute

    Validate the code at checkout, mark it used, and join the redemption to the message ID so the campaign report shows sends, reads and orders per template.

Common mistakes with a coupon code template

  • Using a code longer than 20 characters

    Codes from some e-commerce platforms run long. Generate short codes for WhatsApp, or the send fails at the copy-code parameter.

  • Body code and button code disagree

    If the body shows one code and the button copies another, customers paste the wrong one. Fill both from the same variable in your send logic.

  • Promising a deadline the message cannot show

    A coupon template has no expiry timer. State the end date plainly in the body, or use a limited-time offer template when a visible countdown matters.

  • Forgetting desktop and web users

    Coupon templates are not supported on the WhatsApp web client, and a quick reply mixed with other button types cannot be viewed on desktop. Repeat the code in the body so nobody is left without it.

A coupon code template in code

{
"messaging_product": "whatsapp",
"to": "919812345678",
"type": "template",
"template": {
"name": "diwali_coupon",
"language": { "code": "en" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Meera" },
{ "type": "text", "text": "DIWA7K2Q" }
]
},
{
"type": "button",
"sub_type": "copy_code",
"index": 1,
"parameters": [
{ "type": "coupon_code", "coupon_code": "DIWA7K2Q" }
]
}
]
}
}

POST this to /{PHONE_NUMBER_ID}/messages. Index 1 because a quick-reply button sits at index 0 in this template.

Best practices for a coupon code template

  • Prefer unique single-use codes for attribution and leak control; shared codes are fine for small, low-value offers.
  • Avoid ambiguous characters such as O and 0 or I and 1 in generated codes.
  • Add a "Stop promotions" quick reply and honour it immediately; opt-outs are cheaper than blocks.
  • Give time-bound offers a template time-to-live (message_send_ttl_seconds) shorter than the offer, so a phone that was offline never receives an expired code.

Coupon Code Template FAQs

Can I change the text on the copy-code button?
No. On coupon code templates the copy-code button label is set by WhatsApp and cannot be customised. Put your call to action in the body instead.
Can every customer get a different code?
Yes. The code is a send-time parameter, so each message can carry its own code of up to 20 characters while using the same approved template.
Is a coupon code template cheaper because it contains a code?
No. It is a marketing template and each delivered message is charged at the marketing rate. Only verification codes in authentication templates are charged at the authentication rate.
Why can't some customers use the copy-code button?
Coupon code templates are not supported by the WhatsApp web client, so people reading there may not get a working button. Always repeat the code in the body text so every reader can still copy or type it at checkout.

See InfiQ pricing

* Per-message rates for India, ex-GST: marketing, utility and authentication effective 1 July 2026; service messages ₹0.145 since 1 October 2026 (they were ₹0 until 30 September 2026). Volume commitments earn discounts — final rate is confirmed on your account; applicable GST extra. Rates for other countries differ (see the international rate table on /pricing).

Try it on the official WhatsApp Business API

InfiQ is an official Meta Business Partner. Start a 7-day free trial — no card needed — and see this running on your own number.