Optional
options: OrderMessageOptions// Send charge with a product
WPP.chat.sendChargeMessage('[number]@c.us', [
{ type: 'product', id: '67689897878', qnt: 2 },
{ type: 'product', id: '37878774457', qnt: 1 },
]
// Send charge with a custom item
WPP.chat.sendChargeMessage('[number]@c.us', [
{ type: 'custom', name: 'Item de cost test', price: 120000, qnt: 2 },
]
// Send charge with custom options
WPP.chat.sendChargeMessage('[number]@c.us', [
{ type: 'product', id: '37878774457', qnt: 1 },
{ type: 'custom', name: 'Item de cost test', price: 120000, qnt: 2 },
],
{ tax: 10000, shipping: 4000, discount: 10000 }
// Send charge with Pix data (auto generate copy-paste pix code)
WPP.chat.sendChargeMessage('[number]@c.us', [
{ type: 'custom', name: 'Item de cost test', price: 120000, qnt: 2 },
],
{
tax: 10000,
shipping: 4000,
discount: 10000,
pix: {
keyType: 'CPF',
key: '00555095999',
name: 'Name of seller',
},
});
Send a order message To send (prices, tax, shipping or discount), for example: USD 12.90, send them without dots or commas, like: 12900