Offsite Pix payments
Updated: Oct 29, 2026
Copy for LLM
The Payments API enables businesses to collect payments from their customers via WhatsApp using dynamic Pix codes.
When using this integration, WhatsApp facilitates the communication between merchants and buyers. Merchants are responsible for integrating with a bank or PSP in order to generate dynamic Pix codes and confirm their payment. For Pix with redirect, WhatsApp also marks the order as paid for the buyer once the buyer’s bank completes the payment.
The same dynamic Pix code can be presented to the buyer as a code to copy, or as a switch into their bank app. You choose per message with a single field, and the rest of the payload stays the same.
Before you start
- Familiarize yourself with the Orders API. Orders are the entrypoint for collecting payments in WhatsApp.
- You need an existing integration with a bank or PSP to generate dynamic Pix codes and do automatic reconciliation when a payment is made. You must be able to update the order status as soon as a payment is made. WhatsApp automatically marks the order as paid only for payments made with Pix with redirect. Buyers can still pay with the copied code, including on orders sent with
APPSWITCH, and those payments show as paid only after your order status update.
Payment experiences
The optional
flow_type field inside the pix_dynamic_code object selects how WhatsApp presents Pix to the buyer.Copy and paste
Set
flow_type to COPYPASTE, or omit the field. The buyer taps Copy Pix code, opens their bank app, and pastes the code there.

The full version above includes itemized products, and the simplified version shows only the total amount.
Pix with redirect
Set
flow_type to APPSWITCH. The buyer picks their bank inside WhatsApp, and WhatsApp opens the bank app with the payment details already filled in, so the buyer authorizes the payment instead of copying a code and entering it themselves.Important: Pix with redirect currently requires manual onboarding or for your business to be enrolled onto Meta Business Agent. To get onboarded, fill out the Pix with redirect intake form. Pix with redirect will be released as a full public feature soon.

Step by step:
- The buyer taps Pay with Pix on the order details message.
- WhatsApp shows a searchable list of banks, and the buyer picks the one they want to pay from. The first time a buyer pays this way, they also enter their CPF once and accept the WhatsApp Payments terms.
- WhatsApp shows a review screen with your account holder name and the total, then opens the bank app on its payment confirmation screen.
- The buyer confirms in the bank app and returns to WhatsApp, where the result of the payment is shown.
When buyers use the code instead
Pix with redirect renders in the WhatsApp consumer app for Android and iOS, in one-to-one chats, for buyers who are eligible for WhatsApp payments. Every other buyer gets the copy and paste experience from the same message, so you only ever send one payload. That includes buyers on WhatsApp Web, WhatsApp Desktop, and the WhatsApp Business app.
Pix with redirect also depends on the buyer’s bank being reachable, and WhatsApp offers the Pix code whenever it isn’t:
- Bank coverage. Not every bank supports Pix with redirect, and a bank that is temporarily unreachable can’t be picked from the list. When a connection can’t be established, the buyer is offered the code instead, with no automatic retry.
- One attempt per order. Once a buyer has started the flow for an order on their device, tapping the payment button again doesn’t reopen the bank. The Pix code stays available, so the buyer can still complete the payment.
Copy Pix code is also available next to the bank list, for a buyer whose bank isn’t listed or who prefers to pay manually. Keep a valid dynamic Pix code on every message, whichever
flow_type you send.Roll out Pix with redirect gradually
Pix with redirect and copy and paste can perform differently depending on your audience, the flows your messages sit in, and what you are charging for. Results measured by Meta or by another business don’t necessarily carry over to your base, so treat the change as an experiment rather than a migration, and let your own numbers decide how far it goes.
A phased rollout keeps the comparison honest:
- Start with a small share of your eligible buyers, for example 10%, and keep the rest on copy and paste as a control group.
- Assign the experience per buyer phone number and hold that assignment steady for the whole phase, so the same buyer doesn’t get a different flow on every order.
- Each week, compare the two groups on payment conversion, time to complete a payment, and support contacts.
- Move to a larger share only once the previous phase holds up, and return that group to copy and paste if it doesn’t.
Integration steps
The following sequence diagram shows the typical integration with Pix. Your API calls are the same for both payment experiences, and the diagram marks where they differ: how the buyer pays and how the order is marked as paid.

1. Send an order details message
Follow the full integration guide in the Orders API page.
If Pix is available on this order, provide a
pix_dynamic_code to the payment_settings attribute. You can optionally include an order object with itemized products, fees, and discounts, or send a simplified message with just the total amount and payment settings.Endpoint
POST /<PHONE_NUMBER_ID>/messages
Payload example
{ "recipient_type": "individual", "to": "<PHONE_NUMBER>", "type": "interactive", "interactive": { "type": "order_details", "body": { "text": "Your message content" }, "action": { "name": "review_and_pay", "parameters": { "reference_id": "unique-reference-id", "type": "digital-goods", "payment_type": "br", "payment_settings": [ { "type": "pix_dynamic_code", "pix_dynamic_code": { "code": "00020101021226700014br.gov.bcb.pix2548pix.example.com...", "merchant_name": "Account holder name", "key": "39580525000189", "key_type": "CNPJ" } } ], "currency": "BRL", "total_amount": { "value": 50000, "offset": 100 }, "order": { "status": "pending", "tax": { "value": 0, "offset": 100, "description": "optional text" }, "items": [ { "retailer_id": "1234567", "name": "Cake", "amount": { "value": 50000, "offset": 100 }, "quantity": 1 } ], "subtotal": { "value": 50000, "offset": 100 } } } } } }
Simplified payload example
You can send a simplified order details message without the
order object. This is useful when you don’t need to send itemized product details and only need to collect the total payment amount.{ "recipient_type": "individual", "to": "<PHONE_NUMBER>", "type": "interactive", "interactive": { "type": "order_details", "body": { "text": "Your message content" }, "action": { "name": "review_and_pay", "parameters": { "reference_id": "unique-reference-id", "type": "digital-goods", "payment_type": "br", "payment_settings": [ { "type": "pix_dynamic_code", "pix_dynamic_code": { "code": "00020101021226700014br.gov.bcb.pix2548pix.example.com...", "merchant_name": "Account holder name", "key": "39580525000189", "key_type": "CNPJ" } } ], "currency": "BRL", "total_amount": { "value": 50000, "offset": 100 } } } } }
Select the payment experience
To offer Pix with redirect on an order, add
flow_type to the pix_dynamic_code object. Everything else in the payload is unchanged, and you keep sending the same dynamic Pix code."payment_settings": [ { "type": "pix_dynamic_code", "pix_dynamic_code": { "code": "00020101021226700014br.gov.bcb.pix2548pix.example.com...", "merchant_name": "Account holder name", "key": "39580525000189", "key_type": "CNPJ", "flow_type": "APPSWITCH" } } ]
Because
flow_type is set per message, you decide the experience order by order and can change the mix at any time without any configuration change.Parameters object
| Field Name | Optional? | Type | Description |
|---|---|---|---|
payment_settings | Optional | List of payment related configuration objects. |
Payment settings
| Field Name | Optional? | Type | Description |
|---|---|---|---|
type | Required | String | Must be pix_dynamic_code. |
pix_dynamic_code | Required | Dynamic Pix Code object that will be used to render the option to buyers during the checkout flow. |
Dynamic Pix code object
| Field Name | Optional? | Type | Description |
|---|---|---|---|
code | Required | String | The dynamic Pix code which will be copied by the buyer. |
merchant_name | Required | String | Account holder name. Displayed in-app for the buyer for informational purposes. |
key | Required | String | Pix key. Displayed in-app for the buyer for informational purposes. |
key_type | Required | String | Pix key type. One of CPF, CNPJ, EMAIL, PHONE or EVP. |
flow_type | Optional | String | Selects the payment experience for this order. One of APPSWITCH or COPYPASTE. When the field is absent, buyers get the copy and paste experience. |
2. Send an order status update
Follow the integration guide in the Orders API page to send order status updates.
How the order is marked as paid depends on how the buyer paid:
- Pix with redirect. Once the buyer’s bank completes the payment, WhatsApp marks the order as paid for the buyer, with no
order_statusmessage from you. If the order details message includes theorderobject, WhatsApp also moves the order tocompleted, which is a final status. WhatsApp updates the order for successful payments only. - Copy and paste. Your
order_statusmessage is what marks a payment made with the copied code as paid for the buyer, including when the buyer uses the code from a message sent withAPPSWITCH. Confirm the payment with your bank or PSP, reconcile it against the dynamic Pix code you issued, and then send theorder_statusmessage with a payment status ofcaptured.
Because a buyer can pay an order sent with
APPSWITCH either way, you can send captured whenever your bank or PSP confirms a payment for one of those orders. Set the order status to completed in that update, since WhatsApp may already have completed the order. Once an order is paid, keep its payment status at captured, because a later pending or failed replaces the paid label.How long your Pix code stays valid is yours to manage too, since WhatsApp doesn’t read that window out of the code. To stop a buyer paying an offer that no longer stands, close the order: send an order status of
canceled, or set expiration on the order object up front. Either way the payment button gives way to View details for the buyer in both the copy and paste and Pix with redirect experiences. That withdraws the button rather than the code, so expire the code with your bank or PSP as well, since a buyer who already copied it can still pay it there. See supported order status for what each value means.