Retrieve the combined current balance across any grouping of credits and commits for a customer in a single API call.
balance: The combined net balance available to use at this moment across all matching commits and creditscredit_type_id: The credit type (fiat or custom pricing unit) the balance is denominated inBalance filters allow you to scope the calculation to specific subsets of commits and credits. When using multiple filter objects, they are OR’d together — if a commit or credit matches any filter, it’s included in the net balance. Within a single filter object, all specified conditions are AND’d together.
PREPAID_COMMIT, POSTPAID_COMMIT, and CREDIT (e.g., ["PREPAID_COMMIT", "CREDIT"] to exclude postpaid commits). If not specified, all balance types are included.Example: To get the balance of all free-trial credits OR all signup-promotion commits, you’d pass two filter objects — one filtering for CREDIT with custom field campaign: free-trial, and another filtering for PREPAID_COMMIT with custom field campaign: signup-promotion.
invoice_inclusion_mode to control whether pending draft invoice deductions are included (FINALIZED_AND_DRAFT, the default) or excluded (FINALIZED) from the balance calculationcredit_type_id is not specified, the balance defaults to USD (cents)Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Get the combined net balance for any grouping of credits and commits.
The ID of the customer.
The ID of the credit type (can be fiat or a custom pricing unit) to get the balance for. Defaults to USD (cents) if not specified.
Balance filters are OR'd together, so if a given commit or credit matches any of the filters, it will be included in the net balance.
Controls which invoices are considered when calculating the remaining balance. FINALIZED considers only deductions from finalized invoices. FINALIZED_AND_DRAFT also includes deductions from pending draft invoices.
FINALIZED, FINALIZED_AND_DRAFT Success