This webhook is called whenever a text message or email attached to a payment request or a subscription changes delivery state, and whenever the customer clicks the payment link. The following data format will be POSTED to the provided webhook URL.
On webhook version 4.0 the site and record references are bare ids. Earlier versions send an object carrying the merchant-facing external ids instead, so a site moved onto 4.0 will see this shape change.
The message field is a human-readable sentence rather than a code, and its wording is not part of the API contract. Delivery updates name what was sent, who it went to and the new status, as in "Payment Request to customer@example.com delivered", where the status is one of sent, delivered, read, delayed or failed. Click updates read as "Customer clicked the text link". Branch your integration on the error boolean and on the record ids, not on the wording.
{
"action": "notification",
"data": {
"site": "6201825a0cf5e23261a08646",
"invoice": "649dc5bb468bd5b5d863c7d2",
"message": "Customer clicked the text link",
"error": false
}
}
{
"action": "notification",
"data": {
"site": "6201825a0cf5e23261a08646",
"invoice": "649dc5bb468bd5b5d863c7d2",
"message": "Text to 18001231245 failed",
"error": true
}
}