Prerequisites
Make sure that your webhook endpoint is listening for
whatsapp.payment.updated
events. See also Configure Webhooks, Retrieve a webhook endpoint API.
Payment transaction updated
You receive updates via webhooks when the status of the user-initiated transaction changes. It occurs when payment status changes to captured
(when the payment is successfully completed), or pending
(when the user attempted but yet to receive success transactions signal).
Code sample
{
"id": "evt_eEkn26qar3nOB8md",
"type": "whatsapp.payment.updated",
"apiVersion": "v2",
"createTime": "2024-10-10T07:08:00.000Z",
"whatsappPayment": {
"wabaId": "WABA-ID",
"referenceId": "<reference-id>",
"status": "captured | pending",
"transactions": [
{
"id": "<transaction-id>",
"type": "billdesk | payu | razorpay | zaakpay",
"status": "pending | success | failed",
"createdTimestamp": 1728544066000,
"updatedTimestamp": 1728544066000,
"amount": {
"value": 21000,
"offset": 100
},
"currency": "INR",
"methodType": "upi | card | wallet | netbanking",
"error": {
"code": "error-code",
"reason": "error-reason"
}
}
]
}
}
Note
- To send order details messages to receive payments, see Order Details template message and Interactive Order Details message.
- Once the customer attempted the payment, you will receive payment updates. To notify the customer with the order status, see Order Status template message and Interactive Order Status message.