← Blog

·

Yampi + Official WhatsApp Business API: Abandoned Carts and Orders

Updated on November 24, 2026

Yampi, a Brazilian e-commerce and checkout platform, has its own WhatsApp app, but it is manual: in the dashboard you click the WhatsApp icon on each abandoned cart and a chat opens with a prewritten message. To send order updates and cart reminders automatically from your official number, connect Yampi’s webhooks (order.paid, order.status.updated, cart.reminder and others) to the official WhatsApp Business API, through your backend or n8n.

This guide covers what Yampi offers today, the events that matter, where the phone number sits in the payload, how to validate the HMAC signature and a complete n8n flow. The overall recovery strategy is in recovering PIX, boleto and abandoned carts on WhatsApp (PIX is Brazil’s instant payment system and boleto is a bank payment slip).

What Yampi offers for WhatsApp

According to Yampi’s Help Center:

  • Yampi’s “WhatsApp” app. It is free and installed from the app store. Once installed, a WhatsApp icon shows up on each cart under Vendas > Carrinhos abandonados (Sales > Abandoned carts); clicking it opens WhatsApp with a ready-made message for you to send. Without the app, the button is disabled.
  • Native automatic recovery by email. Yampi sends abandoned cart emails 30 minutes, 2 hours, 24 hours and 48 hours after the cart is abandoned. There is no native automatic sending over WhatsApp.

The Communication category of Yampi’s app store also lists third-party WhatsApp apps. If you use one, check on each app’s page whether it sends through the official API or through a QR code connection, because that changes the risk of the number being banned. The difference is explained in the official WhatsApp API guide.

The third route, which this article details, is connecting Yampi’s webhooks directly to the official API.

Yampi webhook events

The developer docs list these events: order.created, order.paid, order.status.updated, order.invoice.created, order.invoice.updated, transaction.payment.refused, cart.reminder (abandoned cart notification), customer.created, customer.address.created, product.created, product.updated, product.deleted and product.inventory.updated.

EventWhatsApp useLikely category
order.createdOrder received, with PIX or boleto instructions if still unpaidUtility
order.paidPayment confirmedUtility
order.status.updatedOrder being prepared, shipped or delivered (with tracking)Utility
order.invoice.createdInvoice issued, with linkUtility
transaction.payment.refusedPayment declined, with a link to try againUtility, if there is no offer
cart.reminderAbandoned cart reminderMarketing

The docs don’t say how long after abandonment cart.reminder fires. The 30-minute to 48-hour timings belong to the native emails. Before building your sequence, log the incoming events and measure the real timing in your store.

Want to try it while you read? Create a Vectalk account and send your first message through the official API. Create free account →

How to create the webhook

Webhooks can be created through the Yampi API:

curl -X POST "https://api.dooki.com.br/v2/YOUR_STORE/webhooks" \
  -H "User-Token: YOUR_TOKEN" \
  -H "User-Secret-Key: YOUR_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Official WhatsApp",
    "url": "https://your-domain.com/webhooks/yampi",
    "events": ["order.paid", "order.status.updated", "cart.reminder"]
  }'

YOUR_STORE is the store alias. The response includes a 40-character secret_key: store it, because it is what you use to validate the calls. The docs note that the number of webhooks depends on your plan (webhooks created by approved apps don’t count toward the limit). Apps published in Yampi’s store use OAuth 2.0 instead of token and secret key.

Two rules on your server side:

  • Return a 2xx within 5 seconds. After that, Yampi records a failure.
  • Don’t pile up failures. After 30 failures the webhook is disabled automatically. If your endpoint goes down on a Friday night, notifications stop until you recreate the webhook.

The payload and where the phone number is

Each call is a JSON with event, time, merchant (id and alias) and resource. In order, cart and transaction events, the customer’s phone is at resource.customer.data.phone.full_number. In customer.created, it is at resource.phone.full_number.

In cart.reminder, the resource carries the cart token, totals, customer data and links to resume the purchase. Use that link in the template button.

Normalize the number before sending: the WhatsApp API expects international format with digits only, like 5511999999999. If the number comes without 55 (Brazil’s country code), add it.

Validate the HMAC signature

Every call includes the X-Yampi-Hmac-SHA256 header: the HMAC-SHA256 of the raw request body, computed with the webhook’s secret_key and base64-encoded. Compute it on your side and compare before processing.

import express from "express";
import crypto from "node:crypto";

const app = express();
const SECRET = process.env.YAMPI_WEBHOOK_SECRET;
const processed = new Set(); // in production, use a database or Redis

app.post("/webhooks/yampi", express.raw({ type: "*/*" }), async (req, res) => {
  const expected = crypto.createHmac("sha256", SECRET).update(req.body).digest("base64");
  const received = req.get("X-Yampi-Hmac-SHA256") || "";
  const ok = received.length === expected.length &&
    crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected));
  if (!ok) return res.sendStatus(401);
  res.sendStatus(200); // answer within 5 seconds

  const { event, resource } = JSON.parse(req.body.toString("utf8"));
  const key = `${event}:${resource?.id ?? resource?.token}`;
  if (processed.has(key)) return;
  processed.add(key);

  const phone = String(resource?.customer?.data?.phone?.full_number || "").replace(/\D/g, "");
  if (!phone) return;
  const to = phone.startsWith("55") ? phone : `55${phone}`;

  if (event === "order.paid") {
    await sendTemplate(to, "order_paid", [resource.customer.data.first_name, resource.number]);
  }
});

async function sendTemplate(to, name, variables) {
  await fetch("https://apis.vectalk.com.br/api/messages", {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.VECTALK_TOKEN}`, "Content-Type": "application/json" },
    body: JSON.stringify({
      messaging_product: "whatsapp",
      to,
      type: "template",
      template: {
        name,
        language: { code: "pt_BR" },
        components: [{ type: "body", parameters: variables.map((t) => ({ type: "text", text: String(t ?? "") })) }],
      },
    }),
  });
}

app.listen(3000);

The first_name and number names are illustrative: check the exact fields in a real payload from your store before using them. Change the language code if your template is approved in another language.

The n8n flow

If you don’t want to run a server, n8n does the same with native nodes:

  1. Webhook (POST) with the raw body option enabled, so you can validate the signature.
  2. Crypto (HMAC, SHA256, base64) with the secret_key, plus an IF node comparing it with the x-yampi-hmac-sha256 header.
  3. Switch on the event field.
  4. Wait on the cart.reminder branch (for example, 1 hour) and an HTTP Request to the Yampi API to check whether the order was already placed.
  5. HTTP Request to https://apis.vectalk.com.br/api/messages with each branch’s template.

Credentials and the HTTP node are covered step by step in n8n with the WhatsApp Business API. Yampi’s docs don’t mention an official integration with n8n, Make or Zapier: the route is the generic webhook, which any of them can receive.

Templates for orders and carts

Templates to adapt. Meta approves the final category.

order_paid (utility)

Hi {{1}}! Payment for order #{{2}} has been confirmed. We’ll let you know here when it ships.

order_shipped (utility)

{{1}}, your order #{{2}} has shipped. Tracking code: {{3}}. URL button: “Track order”.

cart_reminder (marketing)

Hi {{1}}! The items you picked at {{2}} are still in your cart. Want to finish your order? URL button: “Back to cart”. Quick reply button: “Stop offers”.

On Meta’s categorization page, “you left items in your cart” is a marketing example, even when the customer asked for it. So:

  • send only to people who agreed to receive offers on WhatsApp;
  • one reminder per cart, not a sequence;
  • cancel the send if the order is placed first;
  • treat the opt-out button as an immediate opt-out.

For shipping updates with tracking, see also WhatsApp delivery notifications. More category rules in how Meta categorizes templates.

Opt-in and LGPD

Meta requires consent to receive messages from your business, with your business name stated clearly and compliance with local law. At checkout, separate consent for order updates from consent for offers, which is what allows the cart reminder. Brazil’s data protection law, the LGPD (Law 13,709/2018), requires a legal basis and an easy way to opt out; see LGPD and WhatsApp. This content is informational and is not legal advice.

How much it costs

For recipients in Brazil, since October 1, 2026, Meta charges R$ 0.0350 (Brazilian reais) per delivered utility template and R$ 0.3217 per marketing template. Utility is charged inside the customer service window too, and the allowance of 1,000 service messages per month per number does not cover utility. With 2,000 orders a month and two utility messages per order, the Meta cost is about R$ 140. The WhatsApp API pricing calculator runs the numbers for your own sequence.

How to do it with Vectalk

Vectalk is a proxy for Meta’s official Cloud API: you create templates in the dashboard (with the Template Library) or through the API and send with POST https://apis.vectalk.com.br/api/messages, using the same body as Meta. Delivery statuses arrive at the webhooks registered with POST https://apis.vectalk.com.br/api/webhooks. Your balance is prepaid and each delivered message is deducted from it, with no card on file at Meta. With coexistence, the number stays on the WhatsApp Business app for manual support.

Vectalk has no native inbox, AI or bulk sending: the logic for Yampi’s webhooks lives in your backend or in n8n. Start with the documentation or sign up at apps.vectalk.com.br/register. If payments go through your own gateway, see Pagar.me + WhatsApp; if you are evaluating other platforms, see Loja Integrada + WhatsApp and Nuvemshop + WhatsApp.

Frequently asked questions

Does Yampi send abandoned cart messages on WhatsApp automatically?

Not natively. Yampi’s WhatsApp app opens a ready-made message for manual sending; native automatic recovery is by email. To automate from your official number, use the cart.reminder webhook.

Which header validates the Yampi webhook?

X-Yampi-Hmac-SHA256: the HMAC-SHA256 of the raw body with the webhook’s secret_key, base64-encoded.

Why did my Yampi webhook stop arriving?

The endpoint must return a 2xx within 5 seconds. After 30 failures, Yampi disables the webhook automatically.

Where is the customer’s phone in the payload?

At resource.customer.data.phone.full_number in order, cart and transaction events.


Official sources consulted on November 24, 2026: Yampi: setting up abandoned cart messages, Yampi: communication apps, Yampi Docs: webhooks introduction, Yampi Docs: webhook events, Yampi Docs: create a webhook, Yampi Docs: API FAQ, Meta: template categorization, Meta: opt-in, Meta: pricing, Vectalk: send template, Vectalk: webhooks.

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.