Summary
You can set up a webhook in your WATI account to receive real-time updates for various events - including payment status notifications. This allows your system to react automatically when a payment is captured or fails.
💡Tip: To enable this webhook, visit the webhooks section in your WATI account.
Payment status webhook payload
When a payment is processed, the webhook will send one of the following status values:
"captured" – Payment was successfully completed
"failed" – Payment attempt was unsuccessful
Example webhook payload (captured or failed payment)
{
"statuses": [
{
"from": "contact-phone-number",
"id": "ABMAAQVBAXmFlQ",
"payment": {
"reference_id": "your-reference-id",
"sender": "12137725260"
},
"status": "captured", // or "failed"
"timestamp": "1667283493",
"type": "payment"
}
]
}
Message status webhook
You’ll also receive a webhook event when an order message is successfully sent to the customer.
Example webhook payload (message sent)
{
"statuses": [
{
"conversation": {
"expiration_timestamp": 1667297460,
"id": "3fd5f2da086a01a3d8aaa5be596c3974",
"origin": {
"type": "user_initiated"
}
},
"id": "gBEGkYYGMoJXAgmE6nNS5OrwajQ",
"message": {
"recipient_id": "recipient-phone-number"
},
"pricing": {
"billable": true,
"category": "user_initiated",
"pricing_model": "CBP"
},
"recipient_id": "recipient-phone-number",
"status": "sent",
"timestamp": "1667211460",
"type": "message"
}
]
}