CodeWords raises $9M seed round
BlogResources

How to integrate WhatsApp bots with payment systems

Learn how to integrate WhatsApp bots with payment systems — Stripe payment links, Composio integrations, and the in-chat payment flow that works globally today.

Rebecca PearsonRebecca Pearson6 min read
How to integrate WhatsApp bots with payment systems

The most powerful moment in any sales conversation is when a customer says "I want to buy." If your WhatsApp bot can collect that intent and convert it into a completed payment — without the customer having to leave the chat, find your website, or wait for a link — you've built something genuinely valuable. Integrating WhatsApp bots with payment systems is now practical for businesses of any size. Here's how it works.

TL;DR

  • Stripe payment links work globally today — the bot takes the order, generates a Stripe link, sends it in chat, and Stripe's webhook confirms payment.
  • WhatsApp Pay is expanding but still limited by country — Stripe is the more reliable global approach for now.
  • The full flow is buildable without code using CodeWords and Composio's 3,000+ integrations.

The in-chat payment opportunity

Consider the traditional WhatsApp order flow without payment integration. A customer messages your business, places an order, you (or your bot) confirm the details, and then... what? You send your bank details and ask them to transfer? You message them a payment link separately? You follow up the next day?

Every one of those steps is a drop-off point. The customer gets distracted, forgets to pay, or doesn't trust the process enough to complete it.

The in-chat payment flow closes that gap. The customer messages "I'd like to order two chocolate fudge cakes for Saturday." The bot collects the details, calculates the price, generates a payment link, and sends it — all within the same conversation. The customer pays immediately. The bot confirms. Done.

This pattern works equally well for product orders, service bookings, deposits, and subscriptions.

The current state of WhatsApp payments

WhatsApp Pay

Meta has been building native payment functionality into WhatsApp for several years. WhatsApp Pay allows customers to send money directly within the app — no third-party link, no redirect to a website.

The challenge is availability. As of mid-2026, WhatsApp Pay is live in a limited number of markets including India, Brazil, and parts of the US. If your customers are in those markets and have WhatsApp Pay set up, it's the most frictionless payment experience available.

For businesses outside those markets — or with customers in countries where WhatsApp Pay isn't available — a payment link approach is the practical solution.

Stripe payment links are the most reliable cross-border approach. A Stripe payment link is a URL that, when clicked, opens a secure Stripe-hosted checkout page where the customer can pay by card, Apple Pay, or Google Pay.

Stripe payment links work in 135+ countries, support dozens of currencies, and can be created dynamically — meaning your bot can generate a unique payment link for each order with the correct amount and product description pre-filled.

The flow looks like this:

  1. Customer messages the bot with an order
  2. Bot collects order details (product, quantity, any customisation)
  3. Bot creates a Stripe payment link via the Stripe API (price, description, metadata)
  4. Bot sends the link to the customer in WhatsApp: "Here's your secure payment link: [link]. It's valid for 24 hours."
  5. Customer clicks the link and pays on Stripe's checkout page
  6. Stripe fires a webhook to your system confirming payment
  7. Bot receives the webhook confirmation and sends a final message: "Payment received. Your order is confirmed. We'll have it ready for Saturday."

The Stripe integration in detail

Stripe's API makes it straightforward to create a payment link programmatically. You specify the amount, currency, product description, and optionally the customer's name or email. Stripe returns a URL.

You can also use Stripe's pre-built payment links (created in the Stripe dashboard) and simply send the appropriate link based on what the customer ordered. For businesses with a fixed menu or price list, this is simpler than dynamic link generation.

The webhook confirmation

The crucial step is the webhook. When a customer pays, Stripe sends a POST request to an endpoint you specify — your bot's payment confirmation handler. This tells your system that payment has been received, which triggers the order confirmation message in WhatsApp.

Without the webhook, you'd have to manually check Stripe to see if a payment came in. The webhook closes the loop automatically.

Metadata and order tracking

Stripe payment links can carry metadata — additional fields that travel with the payment. This is where you store the WhatsApp conversation ID, the customer's phone number, and any order details. When the webhook fires, your system uses that metadata to know which WhatsApp conversation to send the confirmation to.

Building this with CodeWords

CodeWords connects to Stripe via Composio, which provides access to over 3,000 integrations including Stripe, Shopify, PayPal, and more.

When you describe your payment flow to Cody, the AI automation assistant, Cody builds the complete integration: order collection, Stripe link generation, payment confirmation via webhook, and the WhatsApp messages at each step.

A typical description might be: "When a customer places an order, collect their order details, generate a Stripe payment link for the total amount, send it to them in WhatsApp, and confirm their order once Stripe confirms payment."

Cody handles the integration logic — you don't need to write API calls or configure webhooks manually.

What's coming next

Meta is expanding WhatsApp Pay to more markets. The UK, Europe, and other major markets are expected to gain access in the next 12–18 months. When that happens, the payment experience will become even more seamless — no link to click, no redirect, just a native payment inside WhatsApp.

Meta is also developing native commerce features — product catalogues, in-chat checkout, and order management — that will make WhatsApp an end-to-end sales channel rather than just a communication one.

For builders, the right approach today is to build with Stripe links (which work now, globally) while keeping the architecture flexible enough to switch to native WhatsApp payments when they become available in your market.

Getting started

If you want to add payment collection to your WhatsApp bot, start at CodeWords. Describe your order and payment flow to Cody, connect your Stripe account via Composio, and test the end-to-end flow before going live.

You'll need a Stripe account (free to create, no monthly fee — Stripe charges a percentage per transaction), and a WhatsApp connection via Business API or Personal Device.


Related reading

Get started today

Your first agent is free to build.

Describe what you need. Cody handles the build, the connections, and the deployment.