Skip to main content
WEBHOOK

Body

application/json
amount
integer<int64>
required

The budget, in minor units of its currency or credit unit.

as_of
string<date-time>
required
budget_id
string<MeteroidId>
required
Example:

"bdgt_7n42DGM5Tflk9n8mt7Fhc7"

customer_id
string<MeteroidId>
required
Example:

"cus_7n42DGM5Tflk9n8mt7Fhc7"

exact
boolean
required

Always false: spend is computed from usage aggregated asynchronously.

period
object
required

The period an alert was measured over; end is absent for a period that never ends.

threshold_pct
integer<int32>
required

Percentage of the budget the notification is for; 100 is the budget itself. Several levels crossed at once are sent in ascending order, but delivery order is not guaranteed (retries): rely on this field, not on arrival order.

Required range: x >= 0
used
integer<int64>
required

Spend of the period, in minor units, including usage not invoiced yet.

id
string<MeteroidId>
required
Example:

"evt_7n42DGM5Tflk9n8mt7Fhc7"

timestamp
string<date-time>
required
type
enum<string>
required
Available options:
metric.created,
customer.created,
subscription.created,
subscription.updated,
subscription.cancelled,
subscription.ended,
invoice.created,
invoice.finalized,
invoice.paid,
invoice.voided,
invoice.closed,
invoice.consolidated,
invoice.deleted,
invoice.accounting_pdf_generated,
quote.accepted,
quote.converted,
credit_note.created,
credit_note.finalized,
credit_note.voided,
plan.created,
plan.published,
plan.archived,
product.created,
product.updated,
product.archived,
metric.updated,
metric.archived,
coupon.created,
coupon.updated,
coupon.archived,
addon.created,
addon.updated,
addon.archived,
refund.issued,
refund.settled,
refund.failed,
payment.reversed,
payment.reinstated,
payment.failed,
wallet.funded,
wallet.debited,
wallet.balance_low,
wallet.credit_unrecovered,
wallet.credit_recovered,
wallet.auto_top_up_failed,
wallet.auto_top_up_suspended,
wallet.auto_top_up_consent_changed,
wallet.depleted,
wallet.recovered,
wallet.auto_top_up_cap_reached,
credit_grant.expired,
entitlement.usage_threshold_reached,
entitlement.limit_reached,
budget.threshold_reached,
budget.exceeded,
entitlement.too_many_groups
credit_unit
string | null

The credit unit (its code) the budget counts; absent for a currency.

credit_unit_precision
integer<int32> | null

Decimal places of credit_unit: amounts are integers of 10^-precision credit.

Required range: x >= 0
currency
string | null

ISO 4217 code of the budget's currency; absent for a budget in a credit unit.

customer_alias
string | null
subscription_id
string<MeteroidId> | null

Set when the budget counts only this subscription's usage.

Example:

"sub_7n42DGM5Tflk9n8mt7Fhc7"

Response

200

Webhook received successfully