{
"type": "billing.auto_topup_failed",
"data": {
"customer_id": "cus_123",
"feature_id": "messages",
"reason": "charge_failed",
"quantity": 100,
"threshold": 20,
"balance": 15,
"invoice_mode": false,
"error": {
"code": "card_declined",
"message": "Your card was declined.",
"type": "card_error",
"decline_code": "generic_decline"
}
}
}Billing
Auto Top-Up Failed
Fired when an automatic top-up is blocked, declined, or fails before granting additional prepaid balance.
WEBHOOK
billing.auto_topup_failed
{
"type": "billing.auto_topup_failed",
"data": {
"customer_id": "cus_123",
"feature_id": "messages",
"reason": "charge_failed",
"quantity": 100,
"threshold": 20,
"balance": 15,
"invoice_mode": false,
"error": {
"code": "card_declined",
"message": "Your card was declined.",
"type": "card_error",
"decline_code": "generic_decline"
}
}
}Payload Fields
string
required
The ID of the customer whose auto top-up failed.
string
required
The feature ID that Autumn attempted to auto top-up.
'charge_failed' | 'purchase_limit_reached' | 'attempt_limit_reached' | 'failed_attempt_limit_reached' | 'suspended_after_failures' | 'customer_unavailable' | 'configuration_unavailable' | 'missing_payment_method' | 'missing_customer_product' | 'invalid_amount' | 'lock_contention' | 'redis_unavailable' | 'execution_error'
required
Machine-readable reason the automatic top-up did not grant balance.
number | null
The normalized amount of balance Autumn attempted to grant, when a matching auto top-up config was available.
number | null
The configured balance threshold for the auto top-up, when available.
number | null
The customer’s remaining balance for the feature at the time the failure was detected, when available.
boolean | null
Whether the auto top-up was configured to create a send_invoice invoice instead of auto-charging.
object | null
Sanitized provider or Autumn error metadata, when the failure came from an exception or declined charge.
Show properties
Show properties
string | null
Machine-readable error code when one is available (for example, a Stripe or Autumn error code).
string | null
Sanitized error message with details about why the auto top-up failed.
string | null
Provider error type when one is available.
string | null
Stripe decline code when the failure came from a card decline.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The webhook event type.
Allowed value:
"billing.auto_topup_failed"Show child attributes
Show child attributes
Example:
{
"customer_id": "cus_123",
"feature_id": "messages",
"reason": "charge_failed",
"quantity": 100,
"threshold": 20,
"balance": 15,
"invoice_mode": false,
"error": {
"code": "card_declined",
"message": "Your card was declined.",
"type": "card_error",
"decline_code": "generic_decline"
}
}
Response
200
Webhook received successfully.