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. price_ typeenum The price type that credit grants can apply to. We currently only support the
metered
price type. Cannot be used in combination withprices
.Possible enum valuesmetered
Credit 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
metered
prices. 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}