Skip to main content

Webhooks

BillaBear supports sending internal notification to internal services via webhooks.

Payment Received

{
type: "payment_received",
id: "uuid-for-payment",
amount: 1000,
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
}
}

Customer Created

{
type: "customer_created",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
}
}

Customer Enabled

{
type: "customer_enabled",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
}
}

Customer Updated

{
type: "customer_updated",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
}
}

Customer Disable

{
type: "customer_disabled",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
}
}

Start Subscription

{
type: "subscription_created",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
},
subscription: {
id: "uuid-for-subscription",
plan_name: "Plan Name",
status: "active"
}
}

Subscription Updated

{
type: "subscription_updated",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
},
subscription: {
id: "uuid-for-subscription",
plan_name: "Plan Name",
status: "active"
}
}

Subscription Cancelled

{
type: "subscription_cancelled",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
},
subscription: {
id: "uuid-for-subscription",
plan_name: "Plan Name",
status: "active"
}
}

Trial Started

{
type: "trial_started",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
},
subscription: {
id: "uuid-for-subscription",
plan_name: "Plan Name",
status: "active"
}
}

Trial Ended

{
type: "trial_ended",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
},
subscription: {
id: "uuid-for-subscription",
plan_name: "Plan Name",
status: "active"
}
}

Trial Extended

{
type: "trial_extended",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
},
subscription: {
id: "uuid-for-subscription",
plan_name: "Plan Name",
status: "active"
}
}

Plan Created

{
type: "plan_created",
plan: {
id: "uuid-for-plan",
name: "Name Of Plan",
code: "code_for_plan",
has_trial: false,
trial_length_in_days: null,
standalone_trial: false
},
}

Plan Updated

{
type: "plan_updated",
plan: {
id: "uuid-for-plan",
name: "Name Of Plan",
code: "code_for_plan",
has_trial: false,
trial_length_in_days: null,
standalone_trial: false
},
}

Plan Deleted

{
type: "plan_deleted",
plan: {
id: "uuid-for-plan",
name: "Name Of Plan",
code: "code_for_plan",
has_trial: false,
trial_length_in_days: null,
standalone_trial: false
},
}

Accounting Integration Failure

{
type: "integration_accounting_failure",
exception: {
message: "Something bad happened",
code: 32,
request: {
method: "GET",
uri: "https://www.example.org",
body: "request body",
},
response: {
status: 404,
body: "the return body",
}
}
}

request and response are only available for some failure

Customer Support Integration Failure

{
type: "integration_customer_support_failure",
exception: {
message: "Something bad happened",
code: 32,
request: {
method: "GET",
uri: "https://www.example.org",
body: "request body",
},
response: {
status: 404,
body: "the return body",
}
}
}

request and response are only available for some failure

Newsletter Integration Failure

{
type: "integration_newsletter_failure",
exception: {
message: "Something bad happened",
code: 32,
request: {
method: "GET",
uri: "https://www.example.org",
body: "request body",
},
response: {
status: 404,
body: "the return body",
}
}
}

request and response are only available for some failures

Usage Warning Triggered

{
type: "trial_ended",
customer: {
id: "uuid-for-customer",
email: "iain.cambridge@example.org",
brand: "default",
is_disabled: false
},
limit: {
warning_level: "WARNING",
amount: 1000
},
start_of_period: "2025-01-08T01:17:23+00:00",
end_of_period: "2025-01-31T01:17:23+00:00"
}

Tax Country Threshold Reached

{
type: "tax_country_threshold_reached",
country: {
name: "United Kingdom",
code: "GB",
threshold: "92,000.00"
}
}

Tax State Threshold Reached

{
type: "tax_state_threshold_reached",
country: {
name: "United States",
code: "US"
},
state: {
name: "New York",
threshold: "39,000."
}
}