Recieve Flex events in your webhook endpoint
Listen to events on your webhook endpoint to automatically trigger reactions.
Why use webhooks
When integratiing with Flex, you might want your applications to receive events as they occur as part of the Flex checkout, so that your backend systems can execute actions accordingly.
To enable webhook events, you need to register webhook endpoints. After you register them, Flex can push real-time event data to your application’s webhook endpoint when events happen. Flex uses HTTPS to send webhook events to your app as a JSON payload that includes an Event object.
Receiving webhook events is particularly useful for listening to asynchronous events such as when a customer’s has succesfully checked out, a customer disputes a charge, a recurring payment succeeds, or when collecting subscription payments.
Event overview
Flex generates event data that we can send you to inform you of activity in your account.
When an event occurs, Flex generates a new Event object. A single API request might result in the creation of multiple events. For example, if you a customer succssfully checkouts for a subscription, you receive customer.subscription.created and payment_intent.succeeded events.
By registering webhook endpoints, you enable Flex to automatically send Event objects as part of POST requests to the registered webhook endpoint hosted by your application. After your webhook endpoint receives the Event, your app can run backend actions (for example, unlocking an access code after you receive a payment_intent.succeeded event).