- Resource lifecycle changes: Set up entitlements in your service as a result of object creation, such as a
subscription.createdevent. - Balance events: Send out an end-user email when a customer’s pre-paid credit balance is nearing zero.
- Data exports: Receive events when an export of resource data to a destination succeeds or fails.
Payload format
Webhooks payloads in Orb follow the format:<resource_name>.<verb>, where <resource_name> is the root object that is related to the webhook, and the <verb> is the event that has taken place (e.g. customer.created is a newly created Customer resource).
By convention, a key in the payload will match the resource_name prefix in type (e.g. if the type is subscription.action, the payload will contain the serialized subscription resource under the subscription key).
Configuring webhooks
Webhooks are configured to anHTTPS URL on your backend server (note that only the HTTPS scheme is accepted for the production version of your webhook configuration).
Each webhook endpoint is associated with a secret, which Orb uses to sign every event it sends. By default, all webhook events are sent to every endpoint.
Each endpoint also has a payload style, standard or expanded, which sets whether subscriptions and invoices in its events are summarized or serialized in full. New endpoints use standard payloads.
Testing webhooks
In the Orb UI, you can test your webhook configuration to ensure that it’s set up properly and ready to receive events from us. From the webhooks portal, you can select on any webhook endpoint to send a “test event.”
