List all cards 

Connect
External Account Cards
List all cards

You can see a list of the cards that belong to a connected account. The 10 most recent external accounts are available on the account object. If you need more than 10, you can use this API method and the limit and starting_after parameters to page through additional cards.

Parameters

No parameters.

More parameters

  • ending_beforestring

    A cursor for use in pagination. ending_before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with obj_bar, your subsequent call can include ending_before=obj_bar in order to fetch the previous page of the list.

  • limitinteger

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.

  • objectstring

    Filter external accounts according to a particular object type.

  • starting_afterstring

    A cursor for use in pagination. starting_after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include starting_after=obj_foo in order to fetch the next page of the list.

Returns

Returns a list of the cards stored on the account.

GET /v1/accounts/:id/external_accounts
Stripe.apiKey = "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2";
Account account = Account.retrieve("acct_1032D82eZvKYlo2C");
ExternalAccountCollectionListParams params =
ExternalAccountCollectionListParams.builder().setObject("card").build();
ExternalAccountCollection externalAccounts =
account.getExternalAccounts().list(params);
Response
{
"object": "list",
"url": "/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts",
"has_more": false,
"data": [
{
"id": "card_1NAz2x2eZvKYlo2C75wJ1YUs",
"object": "card",
"address_city": null,
"address_country": null,
"address_line1": null,
"address_line1_check": null,
"address_line2": null,
"address_state": null,
"address_zip": null,
"address_zip_check": null,
"brand": "Visa",
"country": "US",
"cvc_check": "pass",
"dynamic_last4": null,
"exp_month": 8,
"exp_year": 2024,
"fingerprint": "Xt5EWLLDS7FJjR1c",
"funding": "credit",
"last4": "4242",
"metadata": {},
"name": null,
"redaction": null,
"tokenization_method": null,
"wallet": null,
"account": "acct_1032D82eZvKYlo2C"
}
]
}