Retrieves the credit balance summary for a customer.
Parameters
- customerstringRequired
The customer for which to fetch credit balance summary.
- filterobjectRequired
The filter criteria for the credit balance summary.
- filter.
typeenumRequired Specify the type of this filter.
Possible enum valuesapplicability_scope The balance summary for a given applicability scope.
credit_grant The balance summary for a given credit grant.
- filter.
applicability_ scopeobject The billing credit applicability scope for which to fetch credit balance summary.
- filter.
applicability_scope. billable_ itemsarray of objectsPreview feature A list of billable items that the credit grant can apply to. We currently only support metered billable items. Cannot be used in combination with
price_ortype prices.- filter.
applicability_scope. billable_items. idstringRequired The billable item ID this credit grant should apply to.
- filter.
applicability_scope. price_ typeenum The price type that credit grants can apply to. We currently only support the
meteredprice type. Cannot be used in combination withprices.Possible enum valuesmeteredCredit grants being created can only apply to metered prices.
- filter.
applicability_scope. pricesarray of objectsPreview feature A list of prices that the credit grant can apply to. We currently only support the
meteredprices. Cannot be used in combination withprice_.type - filter.
applicability_scope. prices. idstringRequired The price ID this credit grant should apply to.
- filter.
credit_ grantstring The credit grant for which to fetch credit balance summary.
Returns
Returns the credit balance summary.
{ "object": "billing.credit_balance_summary", "balances": [ { "available_balance": { "monetary": { "currency": "usd", "value": 1000 }, "type": "monetary" }, "ledger_balance": { "monetary": { "currency": "usd", "value": 1000 }, "type": "monetary" } } ], "customer": "cus_QsEHa3GKweMwih", "livemode": false}