Customers
post/v1/customers/{customer}/sources/{id}

PostCustomersCustomerSourcesId

Update a specified source for a given customer.

Path parameters

NameDescription
customer*
id*

Request body

FieldTypeDescription
account_holder_namestring

The name of the person or business that owns the bank account.

account_holder_typestring

The type of entity that holds the account. This can be either individual or company.

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.

expandarray<string>

Specifies which fields in the response should be expanded.

metadataobject | string

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.

ownerobject
4 nested fields
FieldTypeDescription
addressobject
6 nested fields
FieldTypeDescription
citystring
countrystring
line1string
line2string
postal_codestring
statestring
emailstring
namestring
phonestring

Response

anyOf option 1: card

FieldTypeDescription
accountstring | account
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_line1_checkstring

If address_line1 was provided, results of the check: pass, fail, unavailable, or unchecked.

address_line2string

Address line 2 (Apartment/Suite/Unit/Building).

address_statestring

State/County/Province/Region.

address_zipstring

ZIP or postal code.

address_zip_checkstring

If address_zip was provided, results of the check: pass, fail, unavailable, or unchecked.

allow_redisplaystring

This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.

available_payout_methodsarray<string>

A set of available payout methods for this card. Only values from this set should be passed as the method when creating a payout.

brand*string

Card brand. Can be American Express, Cartes Bancaires, Diners Club, Discover, Eftpos Australia, Girocard, JCB, MasterCard, UnionPay, Visa, or Unknown.

countrystring

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.

currencystring (currency)

Three-letter ISO code for currency in lowercase. Must be a supported currency. Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available when returned as an External Account where controller.is_controller is true.

customerstring | customer | deleted_customer

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.

cvc_checkstring

If a CVC was provided, results of the check: pass, fail, unavailable, or unchecked. 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.

default_for_currencyboolean

Whether this card is the default external account for its currency. This property is only available for accounts where controller.requirement_collection is application, which includes Custom accounts.

dynamic_last4string

(For tokenized numbers only.) The last four digits of the device account number.

exp_month*integer

Two-digit number representing the card's expiration month.

exp_year*integer

Four-digit number representing the card's expiration year.

fingerprintstring

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.*

funding*string

Card funding type. Can be credit, debit, prepaid, or unknown.

id*string

Unique identifier for the object.

iinstring

Issuer identification number of the card.

last4*string

The last four digits of the card.

metadataobject

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.

namestring

Cardholder name.

networkstoken_card_networks
1 nested field
FieldTypeDescription
preferredstring

The preferred network for co-branded cards. Can be cartes_bancaires, mastercard, visa or invalid_preference if requested network is not valid for the card.

object*string

String representing the object's type. Objects of the same type share the same value.

regulated_statusstring

Status of a card based on the card issuer.

anyOf option 2: bank_account

FieldTypeDescription
accountstring | account

The account this bank account belongs to. Only applicable on Accounts (not customers or recipients) This property is only available when returned as an External Account where controller.is_controller is true.

account_holder_namestring

The name of the person or business that owns the bank account.

account_holder_typestring

The type of entity that holds the account. This can be either individual or company.

account_typestring

The bank account type. This can only be checking or savings in most countries. In Japan, this can only be futsu or toza.

available_payout_methodsarray<string>

A set of available payout methods for this bank account. Only values from this set should be passed as the method when creating a payout.

bank_namestring

Name of the bank associated with the routing number (e.g., WELLS FARGO).

country*string

Two-letter ISO code representing the country the bank account is located in.

currency*string (currency)

Three-letter ISO code for the currency paid out to the bank account.

customerstring | customer | deleted_customer

The ID of the customer that the bank account is associated with.

default_for_currencyboolean

Whether this bank account is the default external account for its currency.

fingerprintstring

Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same.

future_requirementsexternal_account_requirements

Information about the upcoming new requirements for the bank account, including what information needs to be collected, and by when.

id*string

Unique identifier for the object.

last4*string

The last four digits of the bank account number.

metadataobject

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.

object*string

String representing the object's type. Objects of the same type share the same value.

requirementsexternal_account_requirements

Information about the requirements for the bank account, including what information needs to be collected.

routing_numberstring

The routing transit number for the bank account.

status*string

For bank accounts, possible values are new, validated, verified, verification_failed, tokenized_account_number_deactivated or errored. A bank account that hasn't had any activity or validation performed is new. If Stripe can determine that the bank account exists, its status will be validated. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be verified. If the verification failed for any reason, such as microdeposit failure, the status will be verification_failed. If the status is tokenized_account_number_deactivated, the account utilizes a tokenized account number which has been deactivated due to expiration or revocation. This account will need to be reverified to continue using it for money movement. If a payout sent to this bank account fails, we'll set the status to errored and will not continue to send scheduled payouts until the bank details are updated. For external accounts, possible values are new, errored, verification_failed, and tokenized_account_number_deactivated. If a payout fails, the status is set to errored and scheduled payouts are stopped until account details are updated. In the US and India, if we can't verify the owner of the bank account, we'll set the status to verification_failed. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply.

anyOf option 3: source

FieldTypeDescription
ach_credit_transfersource_type_ach_credit_transfer
8 nested fields
FieldTypeDescription
account_numberstring
bank_namestring
fingerprintstring
refund_account_holder_namestring
refund_account_holder_typestring
refund_routing_numberstring
routing_numberstring
swift_codestring
ach_debitsource_type_ach_debit
6 nested fields
FieldTypeDescription
bank_namestring
countrystring
fingerprintstring
last4string
routing_numberstring
typestring
acss_debitsource_type_acss_debit
10 nested fields
FieldTypeDescription
bank_address_citystring
bank_address_line_1string
bank_address_line_2string
bank_address_postal_codestring
bank_namestring
categorystring
countrystring
fingerprintstring
last4string
routing_numberstring
alipaysource_type_alipay
3 nested fields
FieldTypeDescription
data_stringstring
native_urlstring
statement_descriptorstring
allow_redisplaystring

This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.

amountinteger

A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for single_use sources.

au_becs_debitsource_type_au_becs_debit
3 nested fields
FieldTypeDescription
bsb_numberstring
fingerprintstring
last4string
bancontactsource_type_bancontact
6 nested fields
FieldTypeDescription
bank_codestring
bank_namestring
bicstring
iban_last4string
preferred_languagestring
statement_descriptorstring
cardsource_type_card
14 nested fields
FieldTypeDescription
address_line1_checkstring
address_zip_checkstring
brandstring
countrystring
cvc_checkstring
dynamic_last4string
exp_monthinteger
exp_yearinteger
fingerprintstring
fundingstring
last4string
namestring
three_d_securestring
tokenization_methodstring
card_presentsource_type_card_present
23 nested fields
FieldTypeDescription
application_cryptogramstring
application_preferred_namestring
authorization_codestring
authorization_response_codestring
brandstring
countrystring
cvm_typestring
data_typestring
dedicated_file_namestring
emv_auth_datastring
evidence_customer_signaturestring
evidence_transaction_certificatestring
exp_monthinteger
exp_yearinteger
fingerprintstring
fundingstring
last4string
pos_device_idstring
pos_entry_modestring
read_methodstring
readerstring
terminal_verification_resultsstring
transaction_status_informationstring
client_secret*string

The client secret of the source. Used for client-side retrieval using a publishable key.

code_verificationsource_code_verification_flow
2 nested fields
FieldTypeDescription
attempts_remaining*integer

The number of attempts remaining to authenticate the source object with a verification code.

status*string

The status of the code verification, either pending (awaiting verification, attempts_remaining should be greater than 0), succeeded (successful verification) or failed (failed verification, cannot be verified anymore as attempts_remaining should be 0).

created*integer (unix-time)

Time at which the object was created. Measured in seconds since the Unix epoch.

currencystring (currency)

Three-letter ISO code for the currency associated with the source. This is the currency for which the source will be chargeable once ready. Required for single_use sources.

customerstring

The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer.

epssource_type_eps
2 nested fields
FieldTypeDescription
referencestring
statement_descriptorstring
flow*string

The authentication flow of the source. flow is one of redirect, receiver, code_verification, none.

giropaysource_type_giropay
4 nested fields
FieldTypeDescription
bank_codestring
bank_namestring
bicstring
statement_descriptorstring
id*string

Unique identifier for the object.

idealsource_type_ideal
4 nested fields
FieldTypeDescription
bankstring
bicstring
iban_last4string
statement_descriptorstring
klarnasource_type_klarna
26 nested fields
FieldTypeDescription
background_image_urlstring
client_tokenstring
first_namestring
last_namestring
localestring
logo_urlstring
page_titlestring
pay_later_asset_urls_descriptivestring
pay_later_asset_urls_standardstring
pay_later_namestring
pay_later_redirect_urlstring
pay_now_asset_urls_descriptivestring
pay_now_asset_urls_standardstring
pay_now_namestring
pay_now_redirect_urlstring
pay_over_time_asset_urls_descriptivestring
pay_over_time_asset_urls_standardstring
pay_over_time_namestring
pay_over_time_redirect_urlstring
payment_method_categoriesstring
purchase_countrystring
purchase_typestring
redirect_urlstring
shipping_delayinteger
shipping_first_namestring
shipping_last_namestring
livemode*boolean

If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.

metadataobject

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.

multibancosource_type_multibanco
10 nested fields
FieldTypeDescription
entitystring
referencestring
refund_account_holder_address_citystring
refund_account_holder_address_countrystring
refund_account_holder_address_line1string
refund_account_holder_address_line2string
refund_account_holder_address_postal_codestring
refund_account_holder_address_statestring
refund_account_holder_namestring
refund_ibanstring
object*string

String representing the object's type. Objects of the same type share the same value.

ownersource_owner

Information about the owner of the payment instrument that may be used or required by particular source types.

p24source_type_p24
1 nested field
FieldTypeDescription
referencestring
receiversource_receiver_flow
6 nested fields
FieldTypeDescription
addressstring

The address of the receiver source. This is the value that should be communicated to the customer to send their funds to.

amount_charged*integer

The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency.

amount_received*integer

The total amount received by the receiver source. amount_received = amount_returned + amount_charged should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency.

amount_returned*integer

The total amount that was returned to the customer. The amount returned is expressed in the source's currency.

refund_attributes_method*string

Type of refund attribute method, one of email, manual, or none.

refund_attributes_status*string

Type of refund attribute status, one of missing, requested, or available.

redirectsource_redirect_flow
4 nested fields
FieldTypeDescription
failure_reasonstring

The failure reason for the redirect, either user_abort (the customer aborted or dropped out of the redirect flow), declined (the authentication failed or the transaction was declined), or processing_error (the redirect failed due to a technical error). Present only if the redirect status is failed.

return_url*string

The URL you provide to redirect the customer to after they authenticated their payment.

status*string

The status of the redirect, either pending (ready to be used by your customer to authenticate the transaction), succeeded (successful authentication, cannot be reused) or not_required (redirect should not be used) or failed (failed authentication, cannot be reused).

url*string

The URL provided to you to redirect a customer to as part of a redirect authentication flow.

sepa_debitsource_type_sepa_debit
7 nested fields
FieldTypeDescription
bank_codestring
branch_codestring
countrystring
fingerprintstring
last4string
mandate_referencestring
mandate_urlstring