When you create a new debit card, you must specify a connected account to create it on. You can only specify connected accounts where account.controller.requirement_collection is application
(includes Custom accounts).
If the account has no default destination 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 set default_
to true
.
Parameters
- external_
accountobject | 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.
- external_account.
exp_ monthintegerRequired Two-digit number representing the card’s expiration month.
- external_account.
exp_ yearintegerRequired Two- or -four-digit number representing the card’s expiration year.
- external_account.
numberstringRequired The card number, as a string without any separators.
- external_account.
objectstringRequired The type of payment source. It should be
card
. - external_account.
address_ citystring City / District / Suburb / Town / Village.
- external_account.
address_ countrystring Billing address country, if provided.
- external_account.
address_ line1string Address line 1 (Street address / PO Box / Company name).
- external_account.
address_ line2string Address line 2 (Apartment / Suite / Unit / Building).
- external_account.
address_ statestring State / County / Province / Region.
- external_account.
address_ zipstring ZIP or postal code.
- external_account.
currencystringcustom Connect only Required when adding a card to an account (not applicable to customers or recipients). The card (which must be a debit card) can be used as a transfer destination for funds in this currency.
- external_account.
cvcstring Card security code. Highly recommended to always include this value, but it’s required only for accounts based in European countries.
- external_account.
default_ for_ currencybooleancustom Connect only Applicable only on accounts (not customers or recipients). If you set this to
true
(or if this is the first external account being added in this currency), this card will become the default external account for its currency. - external_account.
metadatamap A set of key-value pairs that you can attach to a card object. This can be useful for storing additional information about the card in a structured format.
- external_account.
namestring Cardholder’s full name.
- 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
.
More parameters
- default_
for_ currencyboolean When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency.
Returns
Returns the card object
{ "id": "card_1NAiaG2eZvKYlo2CDXvcMb6m", "object": "card", "account": "acct_1032D82eZvKYlo2C", "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}