Updated on November 24, 2026
A dynamic URL button is a website button in a WhatsApp template whose URL ends with a {{1}} variable: the fixed part (domain and path) is approved by Meta along with the template, and the ending changes on every send. That is how a single approved template takes each customer to their own order tracking page, their own payment slip or the cart they left behind. Meta allows one variable per URL, always at the end, and up to two URL buttons per template.
This guide walks through three complete cases (tracking, boleto and checkout), with the suggested template, its likely category, and the create and send payloads. To measure clicks with UTM parameters in GA4, see the guide to UTM tracking in WhatsApp templates; here the focus is the link that solves the customer’s problem.
How the variable suffix works
When you create the template, you write the URL with {{1}} at the end and provide a sample value. When you send, you pass only the suffix, and WhatsApp joins the two parts:
| Stage | What you send | Example |
|---|---|---|
| Template creation | Base URL with {{1}} + sample | https://www.store.com/track/{{1}} and ["ORD48213"] |
| Message send | Only the suffix value | "text": "ORD90517" |
| What the customer opens | Base + suffix | https://www.store.com/track/ORD90517 |
The suffix can be the end of a path (/track/{{1}}) or the value of the last query string parameter (/checkout?c={{1}}). Either way, the variable sits at the end.
Limits documented by Meta
According to the template components page:
| Rule | Limit |
|---|---|
| URL buttons per template | Up to 2 |
| Total buttons | Up to 10, mixing types |
| Button text | Up to 25 characters |
| URL length | Up to 2,000 characters |
| Variables in the URL | 1, appended to the end |
| Sample value | Required when the URL has a variable |
| Special characters in the suffix | Must be percent-encoded at send time |
In practice:
- The domain is fixed. It is part of the approved text. You cannot use
{{1}}to switch domains per send, because the variable only goes at the end. If you work with several carriers or payment gateways, point the button to a page you own and redirect from there. - One value per button. If you need both order and customer in the URL, generate a single code in your system that stands for both.
- Encode the suffix. Meta warns that unencoded special characters can make the generated URL fail validation and the send fail. A space becomes
%20, a colon%3A,çbecomes%C3%A7. Prefer codes made only of letters, digits, hyphens and underscores: there is nothing to encode. - Buttons without a variable stay out of the send. Only buttons with a dynamic part need a
buttoncomponent in the payload.
For positional versus named parameters, see WhatsApp template variables.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Case 1: order tracking (utility)
A shipping notice with a tracking link is a textbook utility message: Meta’s categorization guide lists shipping notices with tracking details under order management, as long as the text carries no promotion or upsell.
Suggested template:
- Body: “Hi {{1}}! Your order {{2}} has shipped and should arrive by {{3}}. Tap the button to follow your delivery.”
- URL button: “Track order”, pointing to
https://www.store.com/track/{{1}}. - Suggested category: UTILITY.
Creation (Cloud API format, POST /<WABA_ID>/message_templates):
{
"name": "order_shipped_tracking",
"language": "en_US",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}! Your order {{2}} has shipped and should arrive by {{3}}. Tap the button to follow your delivery.",
"example": { "body_text": [["Ana", "#48213", "Nov 28"]] }
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Track order",
"url": "https://www.store.com/track/{{1}}",
"example": ["ORD48213"]
}
]
}
]
}
Send:
{
"messaging_product": "whatsapp",
"to": "15551234567",
"type": "template",
"template": {
"name": "order_shipped_tracking",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Ana" },
{ "type": "text", "text": "#90517" },
{ "type": "text", "text": "Dec 2" }
]
},
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [{ "type": "text", "text": "ORD90517" }]
}
]
}
}
Why your own tracking page instead of the carrier’s link? Because the button’s domain is fixed. With /track/{{1}} on your site, you query the right carrier behind the scenes, switch partners without re-approving the template, and show the status under your brand. The full notification flow (shipped, out for delivery, delivered) is in the guide to WhatsApp delivery notifications.
Case 2: boleto payment slip reminder (utility)
In Brazil, a boleto is a bank payment slip with a due date, widely used in e-commerce. Reminding customers that the boleto for their own purchase is about to expire is a payment notice, and it tends to be categorized as utility when the wording is neutral. The WhatsApp Business Messaging Policy prohibits third-party debt collection: the template must refer to the customer’s own order or invoice with your business.
This case fits two dynamic URL buttons, each with its own variable:
- Body: “Hi {{1}}. The payment slip for order {{2}}, amount {{3}}, is due on {{4}}. If you have already paid, please disregard this message.”
- Button 0: “View payment slip”,
https://pay.store.com/boleto/{{1}}. - Button 1: “View order”,
https://www.store.com/order/{{1}}. - Suggested category: UTILITY.
{
"name": "boleto_due_reminder",
"language": "en_US",
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Hi {{1}}. The payment slip for order {{2}}, amount {{3}}, is due on {{4}}. If you have already paid, please disregard this message.",
"example": { "body_text": [["Carlos", "#77120", "R$ 189.90", "Nov 26"]] }
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "View payment slip",
"url": "https://pay.store.com/boleto/{{1}}",
"example": ["b7Kq2mX9"]
},
{
"type": "URL",
"text": "View order",
"url": "https://www.store.com/order/{{1}}",
"example": ["ORD77120"]
}
]
}
]
}
At send time, each dynamic button gets its own component, identified by index (the button’s position in the template, starting at 0):
{
"messaging_product": "whatsapp",
"to": "5521988888888",
"type": "template",
"template": {
"name": "boleto_due_reminder",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Carlos" },
{ "type": "text", "text": "#77120" },
{ "type": "text", "text": "R$ 189.90" },
{ "type": "text", "text": "Nov 26" }
]
},
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [{ "type": "text", "text": "Zt4wP8rN" }]
},
{
"type": "button",
"sub_type": "url",
"index": "1",
"parameters": [{ "type": "text", "text": "ORD77120" }]
}
]
}
}
A security note: anyone with the link can open the payment slip. Do not use sequential order numbers as the suffix of a payment page; generate a random token per slip, with an expiry, and keep the mapping in your database. If you would rather send the PDF inside the chat, use a template with a document header.
Case 3: checkout recovery (marketing)
An abandoned cart or checkout reminder is marketing. Meta’s categorization guide treats “you left items in your cart” messages as retargeting, and retargeting is marketing even when the customer asked for it. Budget for the marketing rate and only send to people who opted in.
- Body: “{{1}}, your items are still on hold for a few hours. Want to pick up your purchase where you left off?”
- Button 0 (URL): “Complete purchase”,
https://www.store.com/checkout?c={{1}}. - Button 1 (quick reply): “Stop promotions”.
- Suggested category: MARKETING.
{
"name": "checkout_recovery",
"language": "en_US",
"category": "MARKETING",
"components": [
{
"type": "BODY",
"text": "{{1}}, your items are still on hold for a few hours. Want to pick up your purchase where you left off?",
"example": { "body_text": [["Julia"]] }
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "URL",
"text": "Complete purchase",
"url": "https://www.store.com/checkout?c={{1}}",
"example": ["r9Hd3kQ1"]
},
{ "type": "QUICK_REPLY", "text": "Stop promotions" }
]
}
]
}
At send time, the dynamic URL button (position 0) receives the cart token:
{
"messaging_product": "whatsapp",
"to": "15557654321",
"type": "template",
"template": {
"name": "checkout_recovery",
"language": { "code": "en_US" },
"components": [
{
"type": "body",
"parameters": [{ "type": "text", "text": "Julia" }]
},
{
"type": "button",
"sub_type": "url",
"index": "0",
"parameters": [{ "type": "text", "text": "a2Lm8xVc" }]
}
]
}
}
The c=a2Lm8xVc suffix is a token your checkout uses to restore the cart (items, shipping, coupon). If your store platform already generates a long recovery link, save it in your database under a short code and redirect from your own domain. Timing, sequences and pending PIX or boleto payments are covered in recovering PIX, boleto and abandoned carts on WhatsApp.
Common errors
| Symptom | Likely cause | Fix |
|---|---|---|
| Send fails with a parameter error | Missing dynamic button component, or index does not match the position | Count the template’s buttons from 0 |
| Broken URL when opened | Suffix with spaces, accents or / left unencoded | Use encodeURIComponent or alphanumeric codes |
| Template rejected or recategorized | Missing sample, or promotion mixed into the notice | Send the example and keep notices separate from offers |
| Link opens another customer’s page | Predictable suffix (sequential ID) | Random token with an expiry |
The table of parameter error codes is in how to send a template message via the API. Inside the 24-hour window, without a template, the equivalent is an interactive message with a CTA URL button.
How to do it with Vectalk
Vectalk is a proxy for the official WhatsApp Business API: the JSON in this article stays the same. Create the template in the dashboard (Templates, with the Template Library) or through the Create Template endpoint, using an instance token. Send to POST https://apis.vectalk.com.br/api/messages; the send template reference includes an order tracking example with a dynamic button parameter.
curl -X POST https://apis.vectalk.com.br/api/messages \
-H "Authorization: Bearer $VECTALK_TOKEN" \
-H "Content-Type: application/json" \
-d @order_shipped_tracking.json
The tracking, payment and checkout pages, the tokens and the triggers (order shipped, slip close to due date, stalled checkout) live in your e-commerce platform, ERP or automation tool. Each delivered message is deducted from your prepaid balance, with no card registered at Meta. To compare utility and marketing costs, use the pricing calculator. Create your account.
Frequently asked questions
Can a template have two dynamic URL buttons?
Yes. Meta allows up to two URL buttons per template, and each URL accepts one variable at the end. At send time, include one button component for each, with the right index.
Can I put the variable in the middle of the URL or change the domain?
No. The variable is appended to the end of the URL, and the rest is part of the approved template. For variable destinations, use a page or redirect on your own domain.
How much does each of these templates cost?
For recipients in Brazil, since October 1, 2026: utility R$ 0.0350 and marketing R$ 0.3217 per message (BRL). Tracking and boleto reminders tend to be utility; checkout recovery is marketing. Meta sets the final category at approval; see WhatsApp template categories.
Can I use a dynamic URL button for debt collection?
For your own customer’s invoice or payment slip with your business, yes. Third-party debt collection is prohibited by the WhatsApp Business Messaging Policy.
Do I need to encode the suffix value?
Yes, if it contains special characters. Meta requires percent-encoding before sending. With alphanumeric-only codes, the issue never comes up.
Official sources checked on November 24, 2026: Template components, Template categorization, Utility templates, WhatsApp Business Messaging Policy, Vectalk: send template, Vectalk: create template.
Put your business on the official WhatsApp
Create your account, connect your number to the official API (you can keep the app with coexistence) and start serving customers and sending messages.
