Webhook Payloads
Credit-Based Billing
The payload sent to your webhook endpoint when credit-based billing events occur — virtual credits (API calls, tokens, compute hours) granted, consumed, expired, rolled over, or balance alerts. These webhooks are not related to Customer Wallets (monetary balances).
Credit-Based Billing Webhook Events
The following webhook events are available for tracking credit-based billing lifecycle changes. These events apply to virtual credit entitlements (API calls, tokens, compute hours), not to Customer Wallets (monetary balances).Ledger Events
All ledger events (credit.added through credit.manual_adjustment) share the same CreditLedgerEntryResponse payload documented in the schema below.
The payload includes a metadata field resolved from the credit grant’s source — the subscription or payment created at checkout. This lets you key wallet credits off your own checkout metadata (for example, an orgId) rather than the Dodo-issued customer_id: subscription-sourced grants surface the subscription’s metadata and payment-sourced grants surface the payment’s metadata. The field is empty when the grant has no resolvable source (for example, credits granted directly via the API).
Balance Low Event (credit.balance_low)
Thecredit.balance_low event uses a different payload (CreditBalanceLowPayload) focused on threshold alerting:
string
The customer whose credit balance triggered the alert.
string
The subscription associated with this credit entitlement.
string
The credit entitlement that has a low balance.
string
Display name of the credit entitlement.
string
Current credit balance at the time of the alert.
string
Total credits issued per billing cycle for this subscription.
integer
The configured low balance threshold percentage.
string
The absolute credit amount that the threshold corresponds to.
Using credit.balance_low for Proactive Alerts
Use the credit.balance_low webhook to notify customers before they run out of credits:
Get Customer Balance
Check a customer’s current balance via API.
Create Ledger Entry
Manually credit or debit a customer’s balance.
Webhook Payload Schema
Response for a ledger entry
Brand id this credit ledger entry belongs to
Metadata associated with the credit grant's source (the subscription or payment created at checkout). Empty when the grant has no resolvable source (e.g. credits granted directly via the API).
Available options:
credit_added, credit_deducted, credit_expired, credit_rolled_over, rollover_forfeited, overage_charged, overage_reset, auto_top_up, manual_adjustment, refund Last modified on June 25, 2026