PayTo API Outcome Webhook - Developer Overview
The PayTo Outcome Webhook notifies your system when a significant event related to a PayTo mandate or payment has occurred. The Outcome webhook delivers real-time updates on the result of a specific action, such as a payment initiation or mandate operation, to ensure your systems stay synchronized with the current status.
Webhook Security
To ensure data authenticity and security, the Outcome Webhook uses signed JWT (JSON Web Token) tokens. You will need to verify the JWT signature to ensure the payload’s authenticity. It is crucial that your application validates the token before processing the outcome event.
Endpoints
Your application must expose a publicly accessible HTTPS endpoint to receive these webhook events. This endpoint should handle retries and timeouts effectively, as the webhook system will resend events if delivery fails.
Use Cases
-
Mandate Processing:
Respond to changes in the status of a PayTo mandate, such as approval, rejection, or cancellation. -
Error Handling:
Immediately trigger workflows to manage failures, such as insufficient funds, by integrating webhook outcome notifications with internal systems or notifying end-users.
Handling Webhook Events
Ensure that your system responds to webhook events with a 2xx
status code to acknowledge successful receipt. If your endpoint doesn’t respond within a specific timeframe or returns an error status, the webhook delivery will be retried.
Example Workflow
- A payment initiation is triggered for a PayTo mandate.
- The PayTo Outcome Webhook sends a notification to your system once the payment has been processed.
- Your system updates the payment record and notifies the customer of the result.
Error Management
In case of payment failures, such as insufficient funds, your system should take action based on the outcome notification and respond appropriately, like retrying the payment or alerting the customer.
By integrating the PayTo Outcome Webhook, your application stays updated with real-time information and can react instantly to mandate or payment status changes, improving workflow automation and customer communication.