Retrieve the credit balance summary for a customer 

Billing
Credit Balance Summary
Retrieve the credit balance summary for a customer

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 values
      applicability_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 with prices.

        Possible enum values
        metered

        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 with price_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.

GET /v1/billing/credit_balance_summary
curl -G https://api.stripe.com/v1/billing/credit_balance_summary \
-u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \
-d customer=cus_QsEHa3GKweMwih \
-d "filter[type]"=credit_grant \
-d "filter[credit_grant]"=credgr_test_61R9rvFh1HgrFIoCp41L6nFOS1ekDCeW
Response
{
"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
}