WhatsApp Payments Webhook
The WhatsApp Payments Webhook allows you to receive updates via messages webhooks when the status of the user-initiated transaction of type “payment” changes.
Note:
Additional dynamic fields must be configured under the Message (DLR Status Update) webhooks to receive payment-related webhook updates.
{ "status": "<status>", "id": "<id>", "payment": "<payment>", "phone_number": "<phone_number>", "type":"<type>" }
The following is a sample webhook payload for a payment initiated by an end user.
{
id: "wamid.HBgMOTXXXXXXXXXXE5NDA3IAEhgKMzExMjYzOTAyMgA=",
payment: {
amount: {
offset: 100,
value: 450,
},
currency: "INR",
receipt: "",
reference_id: "SampleMSIL1102",
transaction: {
amount: {
offset: 100,
value: 450,
},
created_timestamp: 1746500000,
currency: "INR",
id: "order_SdrcSSqobZ7voR",
refunds: null,
status: "success",
type: "razorpay",
updated_timestamp: 1746500005,
},
},
phone_number: "91XXXXXXXXXX",
status: "captured",
type: "payment",
}The following is the sample webhook payload for refund status updates.
{
id: "wamid.HBgMOTE5XXXXXXXXXXNDA3MDA2ODYyFQIAEhMzUA",
payment: {
amount: {
offset: 100,
value: 450,
},
currency: "INR",
receipt: "",
reference_id: "SampleMSIL1102",
transaction: {
amount: {
offset: 100,
value: 450,
},
created_timestamp: 1746500000
currency: "INR",
id: "order_SdrcSSqobZ7voR",
refunds: [
{
amount: {
offset: 100,
value: 450,
},
created_timestamp: 1746500000,
id: "rfnd_SdreFXXXXXXXXR",
speed_processed: "normal",
status: "completed",
updated_timestamp: 1746500005,
},
],
status: "success",
type: "razorpay",
updated_timestamp: 1746500000,
},
},
phone_number: "91XXXXXXXXXX",
status: "captured",
type: "payment",
}Updated about 2 hours ago
