Skip to content

Stripe: List all cards — customers get Customers Customer Cards

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

← Customers operations · Get started

Operation stripe.getcustomerscustomercards

Provider route: GET /v1/customers/{customer}/cards. 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"]["getCustomersCustomerCards"]>[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.getCustomersCustomerCards(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_cards(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.ending_beforestringOptional
query.expandarrayOptional
query.expand[]stringEach itemMaximum length: 5000
query.limitintegerOptional
query.starting_afterstringOptional

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 Retrieve a card — customers get Customers Customer Cards Id — 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: Retrieve a card — customers get Customers Customer Cards Id — response body

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

Retrieve a card — customers get Customers Customer Cards Id — response body
FieldTypePresenceDescription and constraints
$objectRootYou can store multiple cards on a customer in order to charge the customer
later. You can also store multiple debit cards on a recipient in order to
transfer to those cards later.

Related guide: [Card payments with Sources](https://docs.stripe.com/sources/cards)
accountJSONOptional
account (anyOf 1)JSONAlternative
account (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
account (anyOf 1) (anyOf 2)ModelAlternativeExpand Create an account — response body
account (anyOf 2)nullAlternative
address_cityJSONOptional
address_city (anyOf 1)stringAlternativeCity/District/Suburb/Town/Village.
Maximum length: 5000
address_city (anyOf 2)nullAlternative
address_countryJSONOptional
address_country (anyOf 1)stringAlternativeBilling address country, if provided when creating card.
Maximum length: 5000
address_country (anyOf 2)nullAlternative
address_line1JSONOptional
address_line1 (anyOf 1)stringAlternativeAddress line 1 (Street address/PO Box/Company name).
Maximum length: 5000
address_line1 (anyOf 2)nullAlternative
address_line1_checkJSONOptional
address_line1_check (anyOf 1)stringAlternativeIf `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
Maximum length: 5000
address_line1_check (anyOf 2)nullAlternative
address_line2JSONOptional
address_line2 (anyOf 1)stringAlternativeAddress line 2 (Apartment/Suite/Unit/Building).
Maximum length: 5000
address_line2 (anyOf 2)nullAlternative
address_stateJSONOptional
address_state (anyOf 1)stringAlternativeState/County/Province/Region.
Maximum length: 5000
address_state (anyOf 2)nullAlternative
address_zipJSONOptional
address_zip (anyOf 1)stringAlternativeZIP or postal code.
Maximum length: 5000
address_zip (anyOf 2)nullAlternative
address_zip_checkJSONOptional
address_zip_check (anyOf 1)stringAlternativeIf `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`.
Maximum length: 5000
address_zip_check (anyOf 2)nullAlternative
allow_redisplayJSONOptional
allow_redisplay (anyOf 1)stringAlternativeThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
Known values: always, limited, unspecified
allow_redisplay (anyOf 2)nullAlternative
available_payout_methodsJSONOptional
available_payout_methods (anyOf 1)arrayAlternativeA set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout.
available_payout_methods (anyOf 1)[]stringEach itemKnown values: instant, standard
available_payout_methods (anyOf 2)nullAlternative
brandstringRequired within parentCard brand. Can be `American Express`, `Cartes Bancaires`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`.
Maximum length: 5000
countryJSONOptional
country (anyOf 1)stringAlternativeTwo-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected.
Maximum length: 5000
country (anyOf 2)nullAlternative
currencyJSONOptional
currency (anyOf 1)stringAlternativeThree-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an [External Account](/api/external_account_cards/object) where [controller.is_controller](/api/accounts/object#account_object-controller-is_controller) is `true`.
Format: currency
currency (anyOf 2)nullAlternative
customerJSONOptional
customer (anyOf 1)JSONAlternativeThe customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead.
customer (anyOf 1) (anyOf 1)stringAlternativeMaximum length: 5000
customer (anyOf 1) (anyOf 2)ModelAlternativeExpand Create a customer — response body
customer (anyOf 1) (anyOf 3)ModelAlternativeExpand Delete a customer — response body
customer (anyOf 2)nullAlternative
cvc_checkJSONOptional
cvc_check (anyOf 1)stringAlternativeIf a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge).
Maximum length: 5000
cvc_check (anyOf 2)nullAlternative
default_for_currencyJSONOptional
default_for_currency (anyOf 1)booleanAlternativeWhether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts.
default_for_currency (anyOf 2)nullAlternative
dynamic_last4JSONOptional
dynamic_last4 (anyOf 1)stringAlternative(For tokenized numbers only.) The last four digits of the device account number.
Maximum length: 5000
dynamic_last4 (anyOf 2)nullAlternative
exp_monthJSONRequired within parent
exp_month (anyOf 1)integerAlternativeTwo-digit number representing the card's expiration month.
exp_month (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
exp_yearJSONRequired within parent
exp_year (anyOf 1)integerAlternativeFour-digit number representing the card's expiration year.
exp_year (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
fingerprintJSONOptional
fingerprint (anyOf 1)stringAlternativeUniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number.

*As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.*
Maximum length: 5000
fingerprint (anyOf 2)nullAlternative
fundingstringRequired within parentCard funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`.
Maximum length: 5000
idstringRequired within parentUnique identifier for the object.
Maximum length: 5000
last4stringRequired within parentThe last four digits of the card.
Maximum length: 5000
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
nameJSONOptional
name (anyOf 1)stringAlternativeCardholder name.
Maximum length: 5000
name (anyOf 2)nullAlternative
networksModelOptionalExpand Retrieve a card — customers get Customers Customer Cards Id — response body — networks
objectstringRequired within parentString representing the object's type. Objects of the same type share the same value.
Known values: card
regulated_statusJSONOptional
regulated_status (anyOf 1)stringAlternativeStatus of a card based on the card issuer.
Known values: regulated, unregulated
regulated_status (anyOf 2)nullAlternative
statusJSONOptional
status (anyOf 1)stringAlternativeFor external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated.
Maximum length: 5000
status (anyOf 2)nullAlternative
tokenization_methodJSONOptional
tokenization_method (anyOf 1)stringAlternativeIf the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null.
Maximum length: 5000
tokenization_method (anyOf 2)nullAlternative

Referenced models: Create an account — response body, Create a customer — response body, Delete a customer — response body, Retrieve a card — customers get Customers Customer Cards Id — response body — networks

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