Webhooks overview
Use webhooks to integrate, automate and track changes in Bunny
Bunny can send webhooks when various events happen during a customer or subscription lifecycle. For example, when a new subscription is created or cancelled or perhaps when a payment failed.
There are 2 ways that webhooks are configured in Bunny
- Platform provisioning - When provisioning is enabled on a platform Bunny will send webhooks when a subscription state changes. e.g. Trial to paid or an increase in quantities.
- Workflows - A webhook action can be used to send default or custom payloads based on workflow conditions.
Platform webhooksLink to Platform webhooks section
Bunny includes the following webhooks to help with enabling self-service or product-led saas applications using the Bunny customer portal.
- Tenant provisioning change - This is sends the current subscription state and features that should be enabled on a tenant. It will be sent on creation, cancellation and any other change that happens to the subscription.
- Checkout validation - This hook is useful if you want to validate that a user can change plan before allowing it via the Bunny customer portal.
Configure a platform webhookLink to Configure a platform webhook section
Go to Settings > Developers > Platforms and toggle Provisioning enabled to the on position.

Workflow webhooksLink to Workflow webhooks section
A webhook action can be added to any workflow. By default it will send a JSON payload containing the fields of the object that is the target of the workflow.

For example, when targeting the Invoice model.
{
"type": "Invoice",
"payload": {
"id": 71,
"account": {
"id": 72,
"name": "Swift Mobility Solutions"
},
"amount": "2000.0",
"amount_due": "2000.0",
"amount_paid": 0,
"coupon_applied": "coupon_applied",
"credits": "credits",
"currency_id": "USD",
"description": "Invoice #I-70",
"due_at": "2025-10-27",
"invoice_items": [
{
"id": 84,
"amount": "2000.0",
"charge": {
"id": 86,
"price": "200.0",
"price_list_id": 37,
"created_at": "2025-09-27T17:00:01.153-07:00",
"updated_at": "2025-09-27T17:00:01.153-07:00",
"warren_id": 1,
"price_list_charge_id": 72,
"name": "Users",
"quantity": 10,
"discount": "0.0",
"amount": "2000.0",
"subscription_id": 15,
"quantity_min": 1,
"quantity_max": null,
"price_decimals": 2,
"start_date": "2025-09-09",
"end_date": "2025-10-08",
"quote_charge_id": 100,
"proration_rate": "0.0",
"subtotal": "2000.0",
"tax_amount": "0.0",
"trial": false,
"is_ramp": false,
"tax_code": null,
"vat_code": null,
"kind": "renew",
"charge_type": "recurring",
"pricing_model": "volume",
"billing_period": "monthly",
"evergreen": false,
"round_up_interval": null
},
"charge_type": "SubscriptionCharge",
"currency_id": "USD",
"discount": "0.0",
"is_ramp": "is_ramp",
"line_text": "Ultimate - Users",
"position": null,
"price": "200.0",
"price_decimals": 2,
"price_tiers": [
{
"id": 199,
"starts": 1,
"ends": 100,
"price": "200.0",
"subscription_charge_id": 86
},
{
"id": 200,
"starts": 101,
"ends": 500,
"price": "180.0",
"subscription_charge_id": 86
},
{
"id": 201,
"starts": 501,
"ends": null,
"price": "160.0",
"subscription_charge_id": 86
}
],
"proration_rate": "0.0",
"quantity": 10,
"subtotal": "2000.0",
"tax_amount": "0.0",
"tax_code": null,
"vat_code": null
}
],
"is_legacy": false,
"net_payment_days": 30,
"number": "I-70",
"operations": "operations",
"paid_at": null,
"payment_applications": [],
"po_number": null,
"quote": {
"id": 58
},
"small_unit_amount_due": "small_unit_amount_due",
"state": "due",
"subtotal": "2000.0",
"tax_amount": "0.0"
}
}
Available webhook objectsLink to Available webhook objects section
The following workflow objects can be used to trigger webhooks:
- Account
- Bill Run
- Contact
- Coupon
- Deal
- Entity
- Event
- Feature Usage
- Feature
- Financial Account
- Invoice
- Job
- Journal Entry
- Journal Entry Line
- Lead
- Payment Method
- Payment
- Plan
- Price List Charge
- Price List
- Product
- Quote
- Revenue Movement
- Subscription
- Tenant
- User
To get an sample payload for click the Send test webhook link in your workflow action.
Custom webhook payloadsLink to Custom webhook payloads section
When configuring a workflow with a webhook action you can customize the JSON payload with templated values based on the workflows target object.

For example, If the object was a Subscription you could extract the state into a custom payload
{
"state": "{{subscription.state}}"
}
Note that the custom payload must be valid JSON
Delivery and retriesLink to Delivery and retries section
Your endpoint must respond with a 2xx status. Workflow webhooks wait up to 20 seconds for a response and platform webhooks up to 5 seconds; a failed request is tried once more. Every request, its response and its status are recorded under Settings > Developers > Webhook logs, where you can also resend a webhook.
Set up a webhook endpointLink to Set up a webhook endpoint section
Webhook endpoints for platform webhooks are configured under Settings > Developers > Platforms.
- Set the URL of your application’s webhook receiving endpoint.
- Click the Test webhook action to send a sample webhook request to your endpoint.

If you are developing locally and want to test your webhook endpoint we suggest using Ngrok to expose your endpoint to the internet.
Alternatively you could use a free service like RequestBin to setup a temporary webhook endpoint.