We use callbacks to notify your application when an event happens relevant to one of your API transactions. Callbacks are particularly useful for asynchronous events like when a customer’s bank transfer payment is confirmed. Listen for callback events so that you get notified when statuses of pending actions are updated.
- Create a callback endpoint on your server.
- Register the endpoint on the Developer Tools page of your Fazz Business account.
Many events that occur from API calls have synchronous results that respond immediately. For example, a successful request to create a payment method immediately returns a Payment Method object. Such requests don’t require callbacks, as the key information is already available.
However, there are events that occur from an API call that are asynchronous, where the results only happen at a later time and not directly in response to your code’s execution. Most commonly these involve:
- Payments that require additional actions from your customer
- Verification of customer details
With these and similar APIs, we will need to notify your application about changes to the status of an object so your application can take subsequent steps.
For each event occurrence, we send the callback data as a POST request to your endpoint in JSON format. The full event details are included and can be used directly after parsing the JSON.
Please make sure that your callback endpoint is able to receive data through a POST request and confirm successful receipt of that data by returning a HTTP 200 response.
Also, make sure to securely receive callbacks by checking against the signing secret for your account.
Updated 3 months ago