Updated on November 4, 2026
Yes, you can collect Pix payments inside WhatsApp with the official API: for Brazil, Meta offers the order_details interactive message and templates with PAYMENT_REQUEST buttons, which show the amount and a button to copy the Pix code, copy the boleto’s digitable line or open a payment link. WhatsApp doesn’t process the money: you generate the Pix or boleto with your bank or payment gateway, send it through the API and confirm the payment on your side. The simplest route is a utility template with a payment button, which doesn’t require integrating the orders API.
For readers outside Brazil: Pix is Brazil’s instant payment system, run by the Central Bank, where the payer scans a QR code or pastes a “copy and paste” code into their bank app. A boleto is a bank payment slip with a numeric “digitable line” the payer types or pastes to pay.
What Meta offers for payments in Brazil
Payments are a module of the official WhatsApp API. The Payments API – Brazil documentation lists the available integrations:
| Integration | What the customer sees | Availability |
|---|---|---|
| Dynamic Pix (copy and paste) | “Copy Pix code” button | Documented |
| Pix with redirect | Picks a bank and WhatsApp opens the bank app pre-filled | Requires manual onboarding (Meta form) |
| Boleto | Button to copy the digitable line | Documented |
| Payment link | Button that opens the gateway checkout in the browser | Documented |
| One-click card payment | Card stored by the merchant (last 4 digits) | Not public yet |
All of these come in two forms:
order_detailsmessage: an interactive message with an order summary (items, shipping, discount, total) and the payment method. Like any free-form interactive message, it can only be sent inside the 24-hour window.- Template: an order details template (
ORDER_DETAILS) or a regular template withPAYMENT_REQUESTbuttons. Templates can be sent outside the window.
One rule applies to all of them: WhatsApp does not reconcile payments. Meta is explicit: the business generates the Pix, confirms receipt and updates the order, integrated with a bank or PSP (payment service provider), using the order’s reference_id.
Option 1: template with a payment button (the practical route)
Payment request CTA templates let you put up to three payment buttons in a template, each with a method (Pix, boleto, link or one-click). You don’t need to build an order object: just an approved template and the code your gateway generates at send time.
Create the template
POST /<WABA_ID>/message_templates:
{
"name": "invoice_ready_pix",
"language": "pt_BR",
"category": "UTILITY",
"components": [
{ "type": "HEADER", "format": "TEXT", "text": "Sua fatura chegou" },
{
"type": "BODY",
"text": "Olá, {{1}}. A fatura {{2}} de R$ {{3}} vence em {{4}}. Pague pelo Pix ou boleto abaixo.",
"example": { "body_text": [["Ana", "2026-11-0042", "189,90", "10/11/2026"]] }
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "PAYMENT_REQUEST",
"text": "Copiar código Pix",
"payment_setting": {
"type": "pix_dynamic_code",
"pix_dynamic_code": { "code": "00020101021226700014br.gov.bcb.pix2548pix.example.com..." }
}
},
{
"type": "PAYMENT_REQUEST",
"text": "Copiar boleto",
"payment_setting": {
"type": "boleto",
"boleto": { "digitable_line": "03399026944140000002628346101018898510000008848" }
}
}
]
}
]
}
The template text is in Portuguese because the customers are in Brazil. The code you enter at creation is only a sample for review; the real, unique code for each charge goes in the send request. The header can be text, image or document; use a document to attach the invoice PDF. The category is UTILITY or MARKETING depending on the content, as explained in WhatsApp template categories.
Send it with the customer’s Pix
POST /<PHONE_NUMBER_ID>/messages:
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "5511999999999",
"type": "template",
"template": {
"name": "invoice_ready_pix",
"language": { "code": "pt_BR" },
"components": [
{
"type": "body",
"parameters": [
{ "type": "text", "text": "Ana" },
{ "type": "text", "text": "2026-11-0042" },
{ "type": "text", "text": "189,90" },
{ "type": "text", "text": "10/11/2026" }
]
},
{
"type": "button",
"sub_type": "payment_request",
"index": "0",
"parameters": [
{
"type": "action",
"action": {
"payment_request": {
"payment_setting": {
"type": "pix_dynamic_code",
"pix_dynamic_code": { "code": "<PIX_CODE_FROM_GATEWAY>" }
}
}
}
}
]
},
{
"type": "button",
"sub_type": "payment_request",
"index": "1",
"parameters": [
{
"type": "action",
"action": {
"payment_request": {
"payment_setting": {
"type": "boleto",
"boleto": { "digitable_line": "<BOLETO_DIGITABLE_LINE>" }
}
}
}
}
]
}
]
}
}
Meta warns that the button stays active in the chat even after the code expires: WhatsApp does not disable the button when the Pix code, boleto or link is no longer valid. Manage expiration in your gateway and issue a new code if the customer asks later.
Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →
Option 2: order_details message with Pix
If the customer is chatting with you (open window), the order_details message shows an order summary with items and a pay button. The simplified example (total only) from the Pix page:
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "5511999999999",
"type": "interactive",
"interactive": {
"type": "order_details",
"body": { "text": "Seu pedido #8812 está pronto para pagamento." },
"action": {
"name": "review_and_pay",
"parameters": {
"reference_id": "order-8812-1",
"type": "physical-goods",
"payment_type": "br",
"payment_settings": [
{
"type": "pix_dynamic_code",
"pix_dynamic_code": {
"code": "<PIX_COPY_AND_PASTE_CODE>",
"merchant_name": "Loja Exemplo Ltda",
"key": "39580525000189",
"key_type": "CNPJ"
}
}
],
"currency": "BRL",
"total_amount": { "value": 18990, "offset": 100 }
}
}
}
}
The rules that cause the most errors, per the orders reference:
reference_idis required, unique per message, up to 60 characters (letters, numbers,_,-and.). To resend the same order, append a sequence suffix.- Amounts are integers with
offset: 100: BRL 189.90 becomes18990. - With the
orderobject,total_amountmust equal subtotal + tax + shipping − discount. key_typeacceptsCPF,CNPJ,EMAIL,PHONEorEVP(random key). CPF and CNPJ are Brazil’s individual and company tax IDs.typeisdigital-goodsorphysical-goods, andcurrencymust beBRL.
To switch Pix for boleto or a link, change the payment_settings item to {"type": "boleto", "boleto": {"digitable_line": "..."}} or {"type": "payment_link", "payment_link": {"uri": "https://..."}}.
Pix with redirect
With "flow_type": "APPSWITCH" inside pix_dynamic_code, the customer picks their bank inside WhatsApp and the bank app opens with the payment pre-filled. The first time, they enter their CPF and accept the WhatsApp payments terms. Today the feature requires manual onboarding through Meta’s form. Customers who can’t use it (WhatsApp Web, Desktop, the Business app, unsupported banks) automatically get copy-and-paste from the same message, so the dynamic Pix code is still required. Meta recommends testing with a small share of your base before expanding.
Update the order status
When your PSP confirms a copy-and-paste Pix payment, send an order_status with payment captured. That’s what shows “paid” to the customer:
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "5511999999999",
"type": "interactive",
"interactive": {
"type": "order_status",
"body": { "text": "Pagamento recebido! Seu pedido já está em separação." },
"action": {
"name": "review_order",
"parameters": {
"reference_id": "order-8812-1",
"payment": { "status": "captured", "timestamp": 1762264800 }
}
}
}
}
With Pix redirect, WhatsApp itself marks the order as paid when the bank completes the payment. Still send captured when your PSP confirms, because the customer may have used the copied code. To stop payment on an offer that’s over, send status canceled or set expiration on the order, and expire the code in your gateway too: anyone who already copied it can still pay at their bank.
Recommended flow with your gateway
This design works with any bank, PSP or gateway that generates dynamic Pix codes and notifies payment via webhook:
- Billing event: order created in the store, invoice issued in the ERP, or an installment coming due.
- Create the charge in the gateway: dynamic Pix (copy and paste) and, optionally, a boleto, using the order
idas the reference. - Send via WhatsApp: a utility template with a
PAYMENT_REQUESTbutton, ororder_detailsif the window is open. - Receive the gateway webhook: payment confirmed.
- Update your system and notify the customer:
order_statuswithcaptured(if you usedorder_details) or a confirmation template.
This flow fits ERP integration, where an issued boleto or invoice triggers the send. To process gateway and Meta webhooks without double-charging, use the ID-based deduplication described in integration architecture.
Cost and which category to use
The cost is that of the message carrying the payment, per Meta’s Brazil-destination rate card since October 1, 2026:
| Message | Category | Rate per delivery |
|---|---|---|
| Invoice, due date or order template for the customer’s own account | Utility | BRL 0.0350 |
| Offer template with a pay button | Marketing | BRL 0.3217 |
order_details or order_status inside the window | Service | Free up to 1,000 per month per number; then BRL 0.0350 |
Two notes. Since October 1, 2026, utility templates sent inside the window are also charged, and the 1,000 service-message free tier doesn’t cover utility. The table covers only the message; Pix or boleto fees are set by your bank or gateway.
A reminder about the customer’s own invoice is utility. Collecting third-party debt (collection agencies, purchased portfolios) is prohibited by the WhatsApp Business Messaging Policy. To design the reminder sequence, see WhatsApp billing reminders and recovering Pix and boleto payments.
Alternatives without the payments API
If you don’t need the order summary or the payment button, you can still collect with standard features:
- Payment link in a URL button: a utility template with a website button pointing to the gateway checkout. See the JSON in how to send a template message.
- Boleto PDF in the header: a template with a document header and the digitable line in the body.
- Pix copy-and-paste in the body: it works, but the customer has to select and copy the text by hand. The
PAYMENT_REQUESTbutton solves that.
The copy-code button in coupon templates (copy_code) is a marketing feature for promo codes, covered in coupon templates. For Pix, use PAYMENT_REQUEST, which is built for it.
Pix and payments with Vectalk
Vectalk is a proxy for the official Cloud API: request bodies are Meta’s, only the URL and token change. The template with a PAYMENT_REQUEST button is sent like any template, via POST https://apis.vectalk.com.br/api/messages:
curl -X POST https://apis.vectalk.com.br/api/messages \
-H "Authorization: Bearer $VECTALK_TOKEN" \
-H "Content-Type: application/json" \
-d @invoice_pix.json
You create and track the template in the dashboard (Templates, with the Template Library) or through the templates API. Vectalk’s documentation has no specific page for order_details; if you want to use the order message, talk to support first. Pix generation, reconciliation and batch sending stay in your system or gateway: Vectalk has no billing module. Delivered messages are deducted from your prepaid platform balance, with no card registered at Meta. Create your account or read the docs.
Frequently asked questions
Does WhatsApp receive the Pix payment and pass it on to the business?
No. WhatsApp only shows the code or opens the bank app. The money goes straight to the business account via Pix, and confirmation comes from your bank or gateway.
Do I need a gateway to collect Pix through the API?
You need something that generates dynamic (copy-and-paste) Pix codes and tells you when they’re paid: your bank, a PSP or a gateway. Meta requires a bank or PSP integration for reconciliation.
Is a template with a Pix button utility or marketing?
It depends on the text. An invoice, due date or an order the customer already placed tends to be utility; an offer or promotion with a pay button is marketing. Meta classifies by content, not by the button.
Can I send Pix and boleto in the same message?
Yes. A template accepts up to three PAYMENT_REQUEST buttons, each with a different payment method.
Is Pix with redirect available to everyone?
Not yet. The documentation says it currently requires manual onboarding through a form (or enrollment in Meta Business Agent) and will be released publicly soon.
Official sources checked on November 4, 2026: Payments API – Brazil (Meta), WhatsApp orders (Meta), Offsite Pix payments (Meta), Boleto (Meta), Payment links (Meta), One-click payments (Meta), Order details templates (Meta), Payment request CTA templates (Meta), Template sending in the Vectalk API.
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.
