Skip to content

Stripe: List all top-ups

Stripe topups.getTopups: arguments, response, policy and SDK examples.

← Topups operations · Get started

Operation stripe.gettopups

Provider route: GET /v1/topups. 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["topups"]["getTopups"]>[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.topups.getTopups(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.topups.get_topups(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.amountJSONOptional
query.amount (anyOf 1)objectAlternative
query.amount (anyOf 1).gtintegerOptional
query.amount (anyOf 1).gteintegerOptional
query.amount (anyOf 1).ltintegerOptional
query.amount (anyOf 1).lteintegerOptional
query.amount (anyOf 2)integerAlternative
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.limitintegerOptional
query.starting_afterstringOptionalMaximum length: 5000
query.statusstringOptionalOne of: canceled, failed, pending, succeeded
Maximum 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 parent
data[]ModelEach itemExpand Cancel a top-up — 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
Pattern: ^/v1/topups

Referenced models: Cancel a top-up — response body

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

Cancel a top-up — response body
FieldTypePresenceDescription and constraints
$objectRootTo top up your Stripe balance, you create a top-up object. You can retrieve
individual top-ups, as well as list all top-ups. Top-ups are identified by a
unique, random ID.

Related guide: [Topping up your platform account](https://docs.stripe.com/connect/top-ups)
amountJSONRequired within parent
amount (anyOf 1)integerAlternativeAmount transferred.
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
balance_transactionJSONOptional
balance_transaction (anyOf 1)JSONAlternativeID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up.
balance_transaction (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
balance_transaction (anyOf 1) (anyOf 2)ModelAlternativeExpand Retrieve a balance transaction — balance get Balance History Id — response body
balance_transaction (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]+)?$
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).
Maximum length: 5000
descriptionJSONOptional
description (anyOf 1)stringAlternativeAn arbitrary string attached to the object. Often useful for displaying to users.
Maximum length: 5000
description (anyOf 2)nullAlternative
expected_availability_dateJSONOptional
expected_availability_date (anyOf 1)JSONAlternative
expected_availability_date (anyOf 1) (anyOf 1)integerAlternativeDate the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up.
expected_availability_date (anyOf 1) (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
expected_availability_date (anyOf 2)nullAlternative
failure_codeJSONOptional
failure_code (anyOf 1)stringAlternativeError code explaining reason for top-up failure if available (see [the errors section](/api/errors) for a list of codes).
Maximum length: 5000
failure_code (anyOf 2)nullAlternative
failure_messageJSONOptional
failure_message (anyOf 1)stringAlternativeMessage to user further explaining reason for top-up failure if available.
Maximum length: 5000
failure_message (anyOf 2)nullAlternative
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
initiated_byJSONOptional
initiated_by (anyOf 1)stringAlternativeIndicates whether the top-up was initiated by Stripe or by the user.
Known values: stripe, user
initiated_by (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`.
metadataobjectRequired within parentSet 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.*stringAdditional keysMaximum length: 500
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: topup
payment_methodJSONOptional
payment_method (anyOf 1)JSONAlternativeThe ID of a PaymentMethod representing the payment method used for the top-up. A PaymentMethod of type `us_bank_account` can be used.
payment_method (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
payment_method (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a Payment Method — response body
payment_method (anyOf 2)nullAlternative
payment_method_optionsJSONOptional
payment_method_options (anyOf 1)JSONAlternativePayment-method-specific configuration for this top-up.
payment_method_options (anyOf 1) (anyOf 1)ModelAlternativeExpand Cancel a top-up — response body — payment method options value us bank account
payment_method_options (anyOf 2)nullAlternative
sourceJSONOptional
source (anyOf 1)JSONAlternativeThe source field is deprecated. It might not always be present in the API response.
source (anyOf 1) (anyOf 1)ModelAlternativeExpand Create a source — response body
source (anyOf 2)nullAlternative
statement_descriptorJSONOptional
statement_descriptor (anyOf 1)stringAlternativeExtra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter.
Maximum length: 5000
statement_descriptor (anyOf 2)nullAlternative
statusstringRequired within parentThe status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`.
Known values: canceled, failed, pending, reversed, succeeded
transfer_groupJSONOptional
transfer_group (anyOf 1)stringAlternativeA string that identifies this top-up as part of a group.
Maximum length: 5000
transfer_group (anyOf 2)nullAlternative

Referenced models: Retrieve a balance transaction — balance get Balance History Id — response body, Create a Payment Method — response body, Create a source — response body, Cancel a top-up — response body — payment method options value us bank account

Cancel a top-up — response body — payment method options value us bank account
FieldTypePresenceDescription and constraints
$objectRoot
us_bank_accountJSONOptional
us_bank_account (anyOf 1)JSONAlternativeIf this top-up is to be used with a `us_bank_account` payment method, this sub-hash contains configuration for it.
us_bank_account (anyOf 1) (anyOf 1)ModelAlternativeExpand Cancel a top-up — response body — payment_method_options / value / us_bank_account / us_bank_account / value / network: ach
us_bank_account (anyOf 2)nullAlternative

Referenced models: Cancel a top-up — response body — payment_method_options / value / us_bank_account / us_bank_account / value / network: ach

Retrieve a balance transaction — balance.getBalanceHistoryId — response body — source / This transaction relates to the Stripe object / object: connect collection transfer
FieldTypePresenceDescription and constraints
$objectRoot
amountJSONRequired within parent
amount (anyOf 1)integerAlternativeAmount transferred, in cents (or local equivalent).
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
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
destinationJSONRequired within parentID of the account that funds are being collected for.
destination (anyOf 1)stringAlternativeMaximum length: 5000
destination (anyOf 2)ModelAlternativeExpand Create an account — response body
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
livemodebooleanRequired within parentIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: connect_collection_transfer

Referenced models: Create an account — response body

Retrieve a balance transaction — balance get Balance History Id — response body — fee details item
FieldTypePresenceDescription and constraints
$objectRoot
amountJSONRequired within parent
amount (anyOf 1)integerAlternativeAmount of the fee, in cents.
amount (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
applicationJSONOptional
application (anyOf 1)stringAlternativeID of the Connect application that earned the fee.
Maximum length: 5000
application (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
descriptionJSONOptional
description (anyOf 1)stringAlternativeAn arbitrary string attached to the object. Often useful for displaying to users.
Maximum length: 5000
description (anyOf 2)nullAlternative
typestringRequired within parentType of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee`, `tax`, or `withheld_tax`.
Maximum length: 5000

SDK function policy ID: stripe.gettopups. Catalog operation: GetTopups. 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.