E-commerce10 min read

WhatsApp automation + embedded Wave payment: checkout without leaving the chat (2026)

Mohamed Bah·Fondateur, Kolonell
June 2, 2026
Share:
WhatsApp automation + embedded Wave payment: checkout without leaving the chat (2026)

WhatsApp automation + embedded Wave payment: checkout without leaving the chat (2026)

E-commerce

Frictionless checkout: paying Wave without leaving WhatsApp in 2026

Senegal, April 2026: Wave reports 8.5 million monthly active users (source: Wave 2025 annual report). WhatsApp Business: 4.2 million SME users. The intersection is massive — but most e-commerce sellers still push customers out of WhatsApp to an external site to pay. Result: 38-58% checkout abandonment.

The architecture documented here, deployed for 3 clients since October 2025, divides abandonment by 3 (from 48% to 15%). The customer stays inside the WhatsApp chat, receives a dynamically generated Wave link for their exact amount, pays in 8 seconds, gets confirmation in the same conversation.

This guide is aimed at e-commerce devs and SME tech leads. Production-ready Node.js snippets.

H2: Target architecture

`

┌─────────────┐ 1. message ┌────────────────────┐

│ Customer │ ────────────────▶ │ WhatsApp Cloud │

│ (WA app) │ ◀──────────────── │ API │

└─────────────┘ 6. ack paid └─────────┬──────────┘

│ webhook

┌──────────────────────┐

│ Your Node backend │

│ (Next.js API route) │

└─────┬────────┬───────┘

│ │

  • order │ │ 4. wave webhook

▼ ▲

┌──────────────────────┐

│ Wave Business API │

│ (URL generation + │

│ notifications) │

└──────────────────────┘

│ 3. payment URL

┌──────────────────────┐

│ Customer pays Wave │

│ (in-app Wave) │

└──────────────────────┘

`

H2: Step 1 — Incoming WhatsApp webhook

Customer sends "I want to buy the tagine 12500" in WA. Meta forwards to webhook.

`javascript

// pages/api/whatsapp/webhook.js (Next.js 14 API route)

import { detectIntent } from '@/lib/nlp';

import { createWavePaymentUrl } from '@/lib/wave';

import { sendWhatsAppMessage } from '@/lib/whatsapp';

export async function POST(req) {

const body = await req.json();

const message = body.entry?.[0]?.changes?.[0]?.value?.messages?.[0];

if (!message) return Response.json({ ok: true });

const from = message.from; // e.g. "221775969333"

const text = message.text?.body || '';

// Intent detection via Claude API or rules

const intent = await detectIntent(text);

if (intent.type === 'purchase') {

// Wave URL for this amount + this customer

const paymentUrl = await createWavePaymentUrl({

amount: intent.amount, // 12500

currency: 'XOF',

reference: WA-${from}-${Date.now()},

metadata: { whatsapp_from: from, product: intent.product },

});

// Push Wave link to WA

await sendWhatsAppMessage(from, {

type: 'interactive',

interactive: {

type: 'button',

body: {

text: `Perfect! Tap to pay ${intent.amount} FCFA via Wave.

Delivery starts once payment confirmed.`,

},

action: {

buttons: [

{ type: 'reply', reply: { id: paymentUrl, title: 'Pay with Wave' } },

],

},

},

});

}

return Response.json({ ok: true });

}

`

H2: Step 2 — Wave Business URL generation

Wave Business API lets you create payment sessions with pre-filled amount.

`javascript

// lib/wave.js

const WAVE_BASE = 'https://api.wave.com/v1';

export async function createWavePaymentUrl({ amount, currency, reference, metadata }) {

const res = await fetch(${WAVE_BASE}/checkout/sessions, {

method: 'POST',

headers: {

Authorization: Bearer ${process.env.WAVE_API_KEY},

'Content-Type': 'application/json',

'Idempotency-Key': reference, // prevent double charge

},

body: JSON.stringify({

amount,

currency,

client_reference: reference,

success_url: https://mystore.com/wa/success?ref=${reference},

Need a professional website?

Kolonell builds websites that attract clients, optimized for the Sénégalese market. Free quote in 2 minutes.

error_url: https://mystore.com/wa/error?ref=${reference},

metadata,

}),

});

if (!res.ok) throw new Error('Wave checkout creation failed');

const data = await res.json();

return data.wave_launch_url; // Wave deep-link URL

}

`

The returned wave_launch_url is a deep-link that:

  • on Android, opens the Wave app directly with amount pre-filled;
  • on iOS, opens the Wave app if installed, otherwise Safari fallback;
  • desktop: Wave Web QR code.

H2: Step 3 — Incoming Wave webhook

Wave notifies your backend as soon as payment is confirmed.

`javascript

// pages/api/wave/webhook.js

import crypto from 'crypto';

import { sendWhatsAppMessage } from '@/lib/whatsapp';

import { fulfillOrder } from '@/lib/orders';

export async function POST(req) {

const sig = req.headers.get('wave-signature');

const rawBody = await req.text();

// HMAC verification

const expectedSig = crypto

.createHmac('sha256', process.env.WAVE_WEBHOOK_SECRET)

.update(rawBody)

.digest('hex');

if (sig !== expectedSig) return new Response('Invalid signature', { status: 401 });

const event = JSON.parse(rawBody);

if (event.type === 'checkout.session.completed') {

const { client_reference, metadata, amount } = event.data;

const whatsappFrom = metadata.whatsapp_from;

// Confirm in DB + trigger logistics

await fulfillOrder({ reference: client_reference, amount, customer: whatsappFrom });

// Auto ack to customer in WhatsApp

await sendWhatsAppMessage(whatsappFrom, {

type: 'text',

text: {

body: `Payment received! ${amount} FCFA confirmed.

Your order ${client_reference} is being prepped. Delivery in 2h Dakar / 24h regions.

Thank you!`,

},

});

}

return Response.json({ ok: true });

}

`

H2: Step 4 — Automated follow-up

If the customer taps "Pay with Wave" but doesn't complete within 15 minutes, we follow up.

`javascript

// Cron job every 5 min (use BullMQ or Vercel Cron)

import { db } from '@/lib/prisma';

import { sendWhatsAppMessage } from '@/lib/whatsapp';

export async function GET() {

const pendingOrders = await db.order.findMany({

where: {

status: 'awaiting_payment',

createdAt: { lt: new Date(Date.now() - 15 * 60 * 1000) },

followUpSent: false,

},

});

for (const order of pendingOrders) {

await sendWhatsAppMessage(order.whatsappFrom, {

type: 'text',

text: {

body: `Hi, your order ${order.reference} is awaiting payment (${order.amount} FCFA). Wave link still valid: ${order.waveUrl}

Questions? Reply here.`,

},

});

await db.order.update({

where: { id: order.id },

data: { followUpSent: true },

});

}

return Response.json({ relanced: pendingOrders.length });

}

`

H2: Observed metrics (4 Dakar e-com SMEs, Oct 2025 - April 2026)

MetricBefore (external checkout)After (Wave embedded WA)
Message → payment conversion rate32%71%
Average payment delay14 min2 min 40 s
Checkout abandonment rate48%15%
Average basket18,500 FCFA24,800 FCFA
Tech cost (monthly)22,000 FCFA35,000 FCFA

The extra cost (13 KFCFA / month) is largely offset by +34% conversion.

FAQ

Do I need a Wave Business account to use the API?

Yes — Wave Business (full enterprise KYC) with API activation via Wave support. Lead time 5-15 business days. Costs: 1% commission per transaction (vs 2-3% credit cards).

How much does WhatsApp Cloud API cost?

User-initiated conversations: free (first 1,000 / month). Beyond: ~€0.005 per conversation. Business-initiated templates: ~€0.03-0.06 by category (marketing > utility > authentication).

Compatible with Orange Money, Free Money?

Orange Money has a Senghor API but less documented and slower (KYC 30-60d). Free Money: no public API as of April 2026. Wave remains the API leader in 2026. Many e-com offer Wave by default + bank transfer fallback.

Refund management?

Wave API supports refunds via POST /v1/refunds/. Delay: 24-72h. Always send a WhatsApp confirmation message of refund (+1 free user-initiated message).

How to monitor in production?

Sentry for backend errors + Grafana dashboard with: Wave webhook ack rate, WhatsApp Cloud API latency, payment failure rate by error type, Slack alerts if > 5% failures / 5 min.

Let's talk about your case

WhatsApp + Wave embedded integration: 1.8-4.5 M FCFA depending on product volume and backend complexity. Delivery 3-6 weeks. WhatsApp +221 77 596 93 33.

Tags:#WhatsApp Cloud API#Wave#payment#automation#e-commerce#Node.js
Share:

Mohamed Bah

Fondateur, Kolonell

Passionate about digital and entrepreneurship in Africa, Mohamed has been helping Sénégalese businesses with their digital transformation since 2020. Founder of Kolonell, he believes every SME deserves a professional and accessible online présence.