Skip to main content
A charge is a card message: your customer sees the charge code, the items, the total and a button to pay with Pix, with boleto or with both. It is sent through the same messages endpoint, POST /wa/messages, with the charge field.
Available on unofficial instances (QR code) only. On instances using the official API (WABA) the request returns 400 waba_feature_not_supported.

Amounts in cents

amount and items[].amount are integers in the smallest unit of the currency. For the Brazilian real, that is cents:
Sending 10 meaning R10,00createsachargeofR 10,00 creates a charge of R 0,10. Amounts with decimal places, like 10.5, are rejected.

Currency

The currency field is optional and defaults to "BRL". It takes an upper case ISO 4217 code (for example "BRL"). Pix and boleto only exist in reais, so a charge with pix or boleto in another currency is rejected. Since every charge needs pix or boleto today, in practice the only accepted currency is the real.

Payment methods

Send pix, boleto or both. pix takes three forms.

Pix copia e cola

Send the copia e cola code (BR Code) generated by your bank or payment gateway. merchant_name is optional, because the code already carries the payee name.

Pix copia e cola with the key

The same code, plus the Pix key and its type. key and key_type go together, and key_type is cpf, cnpj, email, phone or random (random key).

Pix with only the key

Without code, WhatsApp itself builds a Pix code from your key, the merchant_name, the charge amount and the reference_id as the Pix identifier. Your customer copies a code that already has the amount filled in.
In this form the code follows the static Pix rules:
  • merchant_name is required and takes up to 25 characters.
  • reference_id becomes the Pix identifier and takes up to 25 letters and digits, with no hyphen, dot, space or other symbols. Without reference_id, a valid identifier is generated.

Boleto

Send the digitable line, with 47 or 48 digits. Dots and spaces are accepted. The boleto can go with any of the Pix forms.

How the card looks

Charge card on a phone with each area linked to the field that fills it The fixed labels of the card follow the language of your customer’s device. merchant_name does not show on the card. It goes inside the Pix code, and your customer sees it in the bank app when confirming the payment. Without items, the card shows a single item named “Cobrança” with the total. When items is sent, the sum of amount times quantity of the items must equal the charge amount.

Phone and WhatsApp Web

  • Phone: the “Copy Pix code” button copies the Pix code straight to the clipboard.
  • WhatsApp Web: the button is “Review and pay”, which opens the order details. The Pix code is copied from there.

Combinations and scheduling

A charge cannot be combined with media, buttons or template, and text is required because it becomes the card body. It accepts reply_to, to quote another message, and send_at, to be scheduled. It counts toward the daily message limit like any other message.

Webhooks

In message.sent, the charge arrives in content.charge, in the same shape you sent (amounts in cents), with text as the body:
A charge received from another account (for example, one sent with WhatsApp Business) arrives in message.received with the same content.charge, filled with the fields it carries.
WhatsApp does not report whether the charge was paid. Confirm the payment with your bank or gateway, which receives the Pix or the boleto.

Errors

In all these cases no message is sent or scheduled.