Sample - Stripe API
GET/v1/customers/{customer}/cardsDeprecated

List a customer's cards

Lists the cards belonging to a customer. Use cursor parameters to move forward or backward through the cards, and use limit to control the number returned per page. The response includes pagination metadata and the cards in the requested range.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

5 parameters
customerstringrequired
The unique identifier of the customer whose cards to list. The value must be no more than 5,000 characters.
ending_beforestringoptional
A card ID that defines the end of the requested page; use it to retrieve the previous page of cards.
expandarray<string>optional
Fields to expand in the response; each value must be no more than 5,000 characters.
limitintegeroptional
The number of cards to return. Must be between 1 and 100 and defaults to 10 when omitted.
starting_afterstringoptional
A card ID that defines the start of the requested page; use it to retrieve the next page of cards.

2 status codes
200Returns a card list containing the cards in `data`, a `has_more` pagination flag, the list object type, and the list URL.
dataarray<Card>required
has_morebooleanrequired
True if this list has another page of items after this one that can be fetched.
objectstringrequired
String representing the object's type. Objects of the same type share the same value. Always has the value `list`.
Allowed:list
urlstringrequired
The URL where this list can be accessed.
defaultError response.
errorobjectrequired

Error handling

customer must be no more than 5,000 characters and must identify the customer whose cards you want to list. limit must be between 1 and 100 and defaults to 10 when omitted; use starting_after or ending_before with a card ID to navigate between pages.