Webhooks
Webhooks notify you of new events (e.g., when the bank informs us that one of your payments has failed). If an event occurs to a bank_account, mandate or payment in SmarterPay Cloud, a webhook will be sent to every enabled webhook endpoint as a POST request.
Factors to consider with webhooks:
- Webhooks may arrive out of order
- Webhooks with an invalid signature must return a 498 Token Invalid error.
- Webhooks about unknown events should be ignored, and return 204 No Content.
- Webhook URLs must be HTTPS. Unsecured webhook URLs are not allowed.
Status codes Your webhook handler should return a response with a 2xx status code, e.g. 200 OK, or 204 No Content.
Errors & Retries
In the event SmarterPay fail to deliver the webhook, or you respond with a non 2xx status code, SmarterPay will attempt to resend the webhook up to 10 times at increasing time intervals.
Webhook Resource | Description |
---|---|
Bank Account | |
Mandate | These events are those that affect the status of the Mandate and its ability to be used. These webhooks will be sent as a result of sending instructions to BACS and receiving ADDAC, AUDDIS , ARUDD and DDICA. |
Payment / Credit | These events are those that affect the status of individual Payment (from either a one off Payment or indeed Recurrence Scheduled Payment). These webhooks will be sent as a result of sending Payments or Credits to BACS and receiving ARUDD, ARUCS and AWACS. |
These events are those that affect delivery of Email messages. |
Further Reading: