Sample - Stripe API
POST/v1/issuing/cards

Create a card

Creates an Issuing Card object.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

17 body fields
cardholderstringoptional
The [Cardholder](https://docs.stripe.com/api#issuing_cardholder_object) object with which the card will be associated.
currencystringrequired
The currency for the card.
exp_monthintegeroptional
The desired expiration month (1-12) for this card if [specifying a custom expiration date](/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates).
exp_yearintegeroptional
The desired 4-digit expiration year for this card if [specifying a custom expiration date](/issuing/cards/virtual/issue-cards?testing-method=with-code#exp-dates).
expandarray<string>optional
Specifies which fields in the response should be expanded.
financial_accountstringoptional
The new financial account ID the card will be associated with. This field allows a card to be reassigned to a different financial account.
lifecycle_controlsobjectoptional
Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our [documentation](/issuing/controls/lifecycle-controls) for more details.
metadataobjectoptional
Set of [key-value pairs](https://docs.stripe.com/api/metadata) 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`.
personalization_designstringoptional
The personalization design object belonging to this card.
pinobjectoptional
The desired PIN for this card.
replacement_forstringoptional
The card this is meant to be a replacement for (if any).
replacement_reasonstringoptional
If `replacement_for` is specified, this should indicate why that card is being replaced.
Allowed:damagedexpiredloststolen
second_linestringoptional
The second line to print on the card. Max length: 24 characters.
shippingobjectoptional
The address where the card will be shipped.
spending_controlsobjectoptional
Rules that control spending for this card. Refer to our [documentation](https://docs.stripe.com/issuing/controls/spending-controls) for more details.
statusstringoptional
Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
Allowed:activeinactive
typestringrequired
The type of card to issue. Possible values are `physical` or `virtual`.
Allowed:physicalvirtual

2 status codes
200Successful response.
brandstringrequired
The brand of the card.
cancellation_reasonstringoptional
The reason why the card was canceled.
Allowed:design_rejectedfulfillment_errorloststolen
cardholderobjectrequired
An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://docs.stripe.com/issuing) cards. Related guide: [How to create a cardholder](https://docs.stripe.com/issuing/cards/virtual/issue-cards#create-cardholder)
createdintegerrequired
Time at which the object was created. Measured in seconds since the Unix epoch.
currencystringrequired
Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK.
cvcstringoptional
The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://docs.stripe.com/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
exp_monthintegerrequired
The expiration month of the card.
exp_yearintegerrequired
The expiration year of the card.
financial_accountstringoptional
The financial account this card is attached to.
idstringrequired
Unique identifier for the object.
last4stringrequired
The last 4 digits of the card number.
latest_fraud_warningobjectoptional
Stripe’s assessment of whether this card’s details have been compromised. If this property isn't null, cancel and reissue the card to prevent fraudulent activity risk.
lifecycle_controlsobjectoptional
Rules that control the lifecycle of this card, such as automatic cancellation. Refer to our [documentation](/issuing/controls/lifecycle-controls) for more details.
livemodebooleanrequired
If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
metadataobjectrequired
Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
numberstringoptional
The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://docs.stripe.com/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://docs.stripe.com/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint.
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
Allowed:issuing.card
personalization_designstringoptional
The personalization design object belonging to this card.
replaced_bystringoptional
The latest card that replaces this card, if any.
replacement_forstringoptional
The card this card replaces, if any.
replacement_reasonstringoptional
The reason why the previous card needed to be replaced.
Allowed:damagedexpiredfulfillment_errorloststolen
second_linestringoptional
Text separate from cardholder name, printed on the card.
shippingobjectoptional
Where and how the card will be shipped.
spending_controlsobjectrequired
statusstringrequired
Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`.
Allowed:activecanceledinactive
typestringrequired
The type of the card.
Allowed:physicalvirtual
walletsobjectoptional
Information relating to digital wallets (like Apple Pay and Google Pay).
defaultError response.
errorobjectrequired

Error handling

Any other status is an error: Error response.