You 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
Attributes
Unique identifier for the object.
address_
city nullable stringCity/District/Suburb/Town/Village.
address_
country nullable stringBilling address country, if provided when creating card.
address_
line1 nullable stringAddress line 1 (Street address/PO Box/Company name).
address_
line2 nullable stringAddress line 2 (Apartment/Suite/Unit/Building).
address_
state nullable stringState/County/Province/Region.
address_
zip nullable stringZIP or postal code.
address_
zip_ nullable stringcheck If
address_was provided, results of the check:zip pass,fail,unavailable, orunchecked.Card brand. Can be
American Express,Cartes Bancaires,Diners Club,Discover,Eftpos Australia,Girocard,JCB,MasterCard,UnionPay,Visa, orUnknown.Two-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.
customernullable stringExpandable
The 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.
If a CVC was provided, results of the check:
pass,fail,unavailable, orunchecked. 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.Two-digit number representing the card’s expiration month.
Four-digit number representing the card’s expiration year.
fingerprintnullable string
Uniquely 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.
Card funding type. Can be
credit,debit,prepaid, orunknown.The last four digits of the card.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
Cardholder name.
More attributes
accountnullable stringExpandableAvailable conditionally
address_
line1_ nullable stringcheck allow_
redisplay nullable enumavailable_
payout_ nullable array of enumsmethods currencynullable enumAvailable conditionally
dynamic_
last4 nullable stringregulated_
status nullable enumtokenization_
method nullable stringwalletnullable objectPreview feature
{
"id": "card_1MvoiELkdIwHu7ixOeFGbN9D",
"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",
"customer": "cus_NhD8HD2bY8dP3V",
"cvc_check": null,
"dynamic_last4": null,
"exp_month": 4,
"exp_year": 2024,
"fingerprint": "mToisGZ01V71BCos",
"funding": "credit",
"last4": "4242",
"metadata": {},
"name": null,
"tokenization_method": null,
"wallet": null
}
When you create a new credit card, you must specify a customer or recipient on which to create it.
If the card’s owner has no default card, then the new card will become the default. However, if the owner already has a default, then it will not change. To change the default, you should update the customer to have a new default_.
Parameters
sourceobject | stringRequired
A token, like the ones returned by Stripe.js or a dictionary containing a user’s card details (with the options shown below). Stripe will automatically validate the card.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.
Returns
Returns the Card object.
POST / curl https://api.stripe.com/v1/customers/cus_9s6XGDTHzA66Po/sources \ -u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d source=tok_visa
{
"id": "card_1NGTaT2eZvKYlo2CZWSctn5n",
"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",
"customer": "cus_9s6XGDTHzA66Po",
"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
}
Updates a specified card for a given customer.
Parameters
City/District/Suburb/Town/Village.
Billing address country, if provided when creating card.
Address line 1 (Street address/PO Box/Company name).
Address line 2 (Apartment/Suite/Unit/Building).
State/County/Province/Region.
ZIP or postal code.
Two digit number representing the card’s expiration month.
Four digit number representing the card’s expiration year.
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to
metadata.Cardholder name.
Returns
POST / curl https://api.stripe.com/v1/customers/acct_1032D82eZvKYlo2C/sources/card_1NBLeN2eZvKYlo2CIq1o7Pzs \ -u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d name="Jenny Rosen"
{
"id": "card_1NBLeN2eZvKYlo2CIq1o7Pzs",
"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": "Jenny Rosen",
"redaction": null,
"tokenization_method": null,
"wallet": null,
"account": "acct_1032D82eZvKYlo2C"
}
You can always see the 10 most recent cards directly on a customer; this method lets you retrieve details about a specific card stored on the customer.
Parameters
No parameters.
Returns
Returns the Card object.
GET / curl https://api.stripe.com/v1/customers/cus_NhD8HD2bY8dP3V/cards/card_1MvoiELkdIwHu7ixOeFGbN9D \ -u "sk_test_BQokikJ...2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:"
{
"id": "card_1MvoiELkdIwHu7ixOeFGbN9D",
"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",
"customer": "cus_NhD8HD2bY8dP3V",
"cvc_check": null,
"dynamic_last4": null,
"exp_month": 4,
"exp_year": 2024,
"fingerprint": "mToisGZ01V71BCos",
"funding": "credit",
"last4": "4242",
"metadata": {},
"name": null,
"tokenization_method": null,
"wallet": null
}