Events overview

Learn about webhooks and how events are triggered for your account.

Webhooks allow you to automate custom backend actions in response to the transitions that happen in a payment flow.

Why use webhooks

Let’s say you’ve registered to receive the charge.succeeded event and a customer clicks the “Pay” button in your app or website. A webhook between Fanspay and your app tells your app whether the customer’s payment is successful or not. After your webhook endpoint receives the charge.succeeded event, your webhook function can then run backend actions to fulfill an order–such as calling your shipping provider’s APIs to schedule a shipment. Using an API for this workflow is like calling the API every millisecond to ask, was the payment successful?

Events overview

Events are our way of letting you know when something interesting happens in your account. When an event occurs, we create a new Event object. If you registered a webhook endpoint to receive that event, we send it to your endpoint as part of a POST request.

Last updated