Billing
Auto Top-Up Failed
Fired when an automatic top-up is blocked, declined, or fails before granting additional prepaid balance.
WEBHOOK
Payload Fields
The ID of the customer whose auto top-up failed.
The feature ID that Autumn attempted to auto top-up.
reason
'charge_failed' | 'purchase_limit_reached' | 'attempt_limit_reached' | 'failed_attempt_limit_reached' | '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.
The normalized amount of balance Autumn attempted to grant, when a matching auto top-up config was available.
The configured balance threshold for the auto top-up, when available.
The customer’s remaining balance for the feature at the time the failure was detected, when available.
Whether the auto top-up was configured to create a send_invoice invoice instead of auto-charging.
Sanitized provider or Autumn error metadata, when the failure came from an exception or declined charge.
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"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.