Updates a specified card for a given customer.
Parameters
- address_
citystring City/District/Suburb/Town/Village.
- address_
countrystring Billing address country, if provided when creating card.
- address_
line1string Address line 1 (Street address/PO Box/Company name).
- address_
line2string Address line 2 (Apartment/Suite/Unit/Building).
- address_
statestring State/County/Province/Region.
- address_
zipstring ZIP or postal code.
- exp_
monthstring Two digit number representing the card’s expiration month.
- exp_
yearstring Four digit number representing the card’s expiration year.
- metadatamap
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. - namestring
Cardholder name.
Returns
curl https://api.stripe.com/v1/customers/{{ACCOUNT_ID}}/sources/{{CARD_ID}} \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_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.
curl https://api.stripe.com/v1/customers/{{CUSTOMER_ID}}/cards/{{CARD_ID}} \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_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}You can see a list of the cards belonging to a customer. Note that the 10 most recent sources are always available on the Customer object. If you need more than those 10, you can use this API method and the limit and starting_ parameters to page through additional cards.
Parameters
No parameters.
More parameters
- ending_
beforestring - limitinteger
- starting_
afterstring
Returns
Returns a list of the cards stored on the customer.
curl -G https://api.stripe.com/v1/customers/{{CUSTOMER_ID}}/cards \ -u "sk_test_BQokikJOvBiI2HlWgH4olfQ2sk_test_BQokikJOvBiI2HlWgH4olfQ2:" \ -d limit=3{ "object": "list", "url": "/v1/customers/cus_NhD8HD2bY8dP3V/cards", "has_more": false, "data": [ { "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 } ]}