Integrating the Payments API with Stripe enables customers to make payments for their orders without having to exit the WhatsApp customer app.
At present, customers can browse business catalogs, select products, and send orders through commerce messaging solutions, such as Multi-Product Message and Product Detail Page. With the introduction of the Payments API, businesses can now send customers a Stripe bill to enable them to pay for their orders directly through WhatsApp, without having to leave the app. Check out how this feature works below:
How It works?
To start, the business creates and sends an order_details message, which is a new form of interactive message that comprises four key components: header, body, footer, and action. The action component contains all the information needed for the customer to complete their payment, including a unique reference_id provided by the business that is used to track the order throughout the payment flow.
Once the message is sent, the business must wait for a payment or transaction status update. WhatsApp supports three payment statuses – pending, captured, and failed – and each payment can have one or more transactions.
While notifications will be sent when the transaction status changes, it’s important not to rely solely on these webhook notifications due to security reasons. WhatsApp offers a payment-lookup API that enables businesses to retrieve payment statuses directly, and it’s possible to query payment status using different phone numbers under the same Business Manager account.
Purchase Flow in AppPurchase Flow in App
The purchase process on WhatsApp follows these steps:
- Customers send their order to the business by sending a message containing the selected products, either through simple text messages or by using interactive messages like Single Product Message, Multi Product Message, and Product Detail.
- Once the business receives the order, they send an order_details message to the customer. This message displays details about the order and the total amount to be paid. The customer can review the order and then tap on “Review and Pay” to proceed.
- Tapping on the “Secure Checkout” button will open a secure in-app webview where the customer can make the payment.
- After the payment has been confirmed, the business will receive a webhook notification with the latest payment status.
- The business can then send an order_status message to the customer to update them on the status of their order. Each message will generate a message bubble that refers to the original order_details message and updates the order status displayed on the order details page.
Link your Payment AccountLink your Payment Account
Businesses should add a Stripe payment configuration to the WhatsApp Business Account to receive payments on WhatsApp. Businesses should add a Stripe payment configuration to the WhatsApp Business Account to receive payments on WhatsApp.