Skip to content

Stripe: List customer balance transactions

Stripe customers.getCustomersCustomerBalanceTransactions: arguments, response, policy and SDK examples.

← Customers operations · Get started

Operation stripe.getcustomerscustomerbalancetransactions

Provider route: GET /v1/customers/{customer}/balance_transactions. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/stripe with npm, or alter-sdk-stripe with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { StripeIntegration } from "@alter-ai/stripe";
async function execute(input: Parameters<StripeIntegration["customers"]["getCustomersCustomerBalanceTransactions"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new StripeIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.customers.getCustomersCustomerBalanceTransactions(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_stripe import StripeIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = StripeIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.customers.get_customers_customer_balance_transactions(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.customerstringRequired within parentMaximum length: 5000
queryobjectOptionalAdditional keys: not allowed
query.createdJSONOptional
query.created (anyOf 1)objectAlternative
query.created (anyOf 1).gtintegerOptional
query.created (anyOf 1).gteintegerOptional
query.created (anyOf 1).ltintegerOptional
query.created (anyOf 1).lteintegerOptional
query.created (anyOf 2)integerAlternative
query.ending_beforestringOptionalMaximum length: 5000
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000
query.invoicestringOptionalMaximum length: 5000
query.limitintegerOptional
query.starting_afterstringOptionalMaximum length: 5000

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$objectRoot
dataarrayRequired within parentDetails about each object.
data[]ModelEach itemExpand Create a customer balance transaction — response body
has_morebooleanRequired within parentTrue if this list has another page of items after this one that can be fetched.
objectstringRequired within parentString representing the object’s type. Objects of the same type share the same value. Always has the value `list`.
Known values: list
urlstringRequired within parentThe URL where this list can be accessed.
Maximum length: 5000

Referenced models: Create a customer balance transaction — response body

800 more schemas are linked from the tables above, on the schema pages.

Create a customer balance transaction — response body
FieldTypePresenceDescription and constraints
$objectRootEach customer has a [Balance](https://docs.stripe.com/api/customers/object#customer_object-balance) value,
which denotes a debit or credit that's automatically applied to their next invoice upon finalization.
You may modify the value directly by using the [update customer API](https://docs.stripe.com/api/customers/update),
or by creating a Customer Balance Transaction, which increments or decrements the customer's `balance` by the specified `amount`.

Related guide: [Customer balance](https://docs.stripe.com/billing/customer/balance)
amountJSONRequired within parent
amount (anyOf 1)integerAlternativeThe amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`.
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
checkout_sessionJSONOptional
checkout_session (anyOf 1)JSONAlternativeThe ID of the checkout session (if any) that created the transaction.
checkout_session (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
checkout_session (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a Checkout Session — response body
checkout_session (anyOf 2)nullAlternative
createdJSONRequired within parent
created (anyOf 1)integerAlternativeTime at which the object was created. Measured in seconds since the Unix epoch.
Format: unix-time
created (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
credit_noteJSONOptional
credit_note (anyOf 1)JSONAlternativeThe ID of the credit note (if any) related to the transaction.
credit_note (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
credit_note (anyOf 1) (anyOf 2)ModelAlternativeExpand Void a credit note — response body
credit_note (anyOf 2)nullAlternative
currencystringRequired within parentThree-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies).
Format: currency
customerJSONRequired within parentThe ID of the customer the transaction belongs to.
customer (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer_accountJSONOptional
customer_account (anyOf 1)stringAlternativeThe ID of an Account representing a customer that the transaction belongs to.
Maximum length: 5000
customer_account (anyOf 2)nullAlternative
descriptionJSONOptional
description (anyOf 1)stringAlternativeAn arbitrary string attached to the object. Often useful for displaying to users.
Maximum length: 5000
description (anyOf 2)nullAlternative
ending_balanceJSONRequired within parent
ending_balance (anyOf 1)integerAlternativeThe customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice.
ending_balance (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
invoiceJSONOptional
invoice (anyOf 1)JSONAlternativeThe ID of the invoice (if any) related to the transaction.
invoice (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
invoice (anyOf 1) (anyOf 2)ModelAlternativeExpand Pay an invoice — response body
invoice (anyOf 2)nullAlternative
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataJSONOptional
metadata (anyOf 1)objectAlternativeSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Additional keys: see wildcard field
metadata (anyOf 1).*stringAdditional keysMaximum length: 500
metadata (anyOf 2)nullAlternative
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: customer_balance_transaction
typestringRequired within parentTransaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, `unapplied_from_invoice`, `checkout_session_subscription_payment`, or `checkout_session_subscription_payment_canceled`. See the [Customer Balance page](https://docs.stripe.com/billing/customer/balance#types) to learn more about transaction types.
Known values: adjustment, applied_to_invoice, checkout_session_subscription_payment, checkout_session_subscription_payment_canceled, credit_note, initial, invoice_overpaid, invoice_too_large, invoice_too_small, migration, unapplied_from_invoice, unspent_receiver_credit

Referenced models: Create a Checkout Session — response body, Void a credit note — response body, Create a customer — response body, Pay an invoice — response body

Create a Checkout Session — response body — wallet options value link
FieldTypePresenceDescription and constraints
$objectRoot
linkModelOptionalExpand Create a Checkout Session — response body — wallet options value link link

Referenced models: Create a Checkout Session — response body — wallet options value link link

Delete a customer — response body
FieldTypePresenceDescription and constraints
$objectRoot
deletedbooleanRequired within parentAlways true for a deleted object
Known values: True
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: customer
Cancel a refund — response body — presentment details
FieldTypePresenceDescription and constraints
$objectRoot
presentment_amountJSONRequired within parent
presentment_amount (anyOf 1)integerAlternativeAmount intended to be collected by this payment, denominated in `presentment_currency`.
presentment_amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
presentment_currencystringRequired within parentCurrency presented to the customer during payment.
Maximum length: 5000
Create a payment link — response body — custom text
FieldTypePresenceDescription and constraints
$objectRoot
after_submitJSONOptional
after_submit (anyOf 1)JSONAlternativeCustom text that should be displayed after the payment confirmation button.
after_submit (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a payment link — response body — custom text submit value message
after_submit (anyOf 2)nullAlternative
shipping_addressJSONOptional
shipping_address (anyOf 1)JSONAlternativeCustom text that should be displayed alongside shipping address collection.
shipping_address (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a payment link — response body — custom text submit value message
shipping_address (anyOf 2)nullAlternative
submitJSONOptional
submit (anyOf 1)JSONAlternativeCustom text that should be displayed alongside the payment confirmation button.
submit (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a payment link — response body — custom text submit value message
submit (anyOf 2)nullAlternative
terms_of_service_acceptanceJSONOptional
terms_of_service_acceptance (anyOf 1)JSONAlternativeCustom text that should be displayed in place of the default terms of service agreement text.
terms_of_service_acceptance (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a payment link — response body — custom text submit value message
terms_of_service_acceptance (anyOf 2)nullAlternative

Referenced models: Create a payment link — response body — custom text submit value message

Cancel a Setup Intent — response body — payment method configuration details value id, parent
FieldTypePresenceDescription and constraints
$objectRoot
idstringRequired within parentID of the payment method configuration used.
Maximum length: 5000
parentJSONOptional
parent (anyOf 1)stringAlternativeID of the parent payment method configuration used.
Maximum length: 5000
parent (anyOf 2)nullAlternative

SDK function policy ID: stripe.getcustomerscustomerbalancetransactions. Catalog operation: GetCustomersCustomerBalanceTransactions. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Pinned headers: {"Stripe-Version": "2026-09-30.endive"}

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.