Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
Parameters
- billing_
detailsobject Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- billing_details.
addressobject Billing address.
- billing_details.
address. citystring City, district, suburb, town, or village.
- billing_details.
address. countrystring Two-letter country code (ISO 3166-1 alpha-2).
- billing_details.
address. line1string Address line 1 (e.g., street, PO Box, or company name).
- billing_details.
address. line2string Address line 2 (e.g., apartment, suite, unit, or building).
- billing_details.
address. postal_ codestring ZIP or postal code.
- billing_details.
address. statestring State, county, province, or region.
- billing_details.
emailstring Email address.
- billing_details.
namestring Full name.
- billing_details.
phonestring Billing phone number (including extension).
- 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. 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
- allow_
redisplayenum 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
.Possible enum valuesalways
Use
always
to indicate that this payment method can always be shown to a customer in a checkout flow.limited
Use
limited
to indicate that this payment method can’t always be shown to a customer in a checkout flow. For example, it can only be shown in the context of a specific subscription.unspecified
This is the default value for payment methods where
allow_
wasn’t set.redisplay - cardobject
If this is a
card
PaymentMethod, this hash contains the user’s card details.- card.
exp_ monthinteger Two-digit number representing the card’s expiration month.
- card.
exp_ yearinteger Four-digit number representing the card’s expiration year.
- card.
networksobject Contains information about card networks used to process the payment.
- card.
networks. preferredenum The customer’s preferred card network for co-branded cards. Supports
cartes_
,bancaires mastercard
, orvisa
. Selection of a network that does not apply to the card will be stored asinvalid_
on the card.preference
- linkobject
If this is an
Link
PaymentMethod, this hash contains details about the Link payment method. - object
If this is a
naver_
PaymentMethod, this hash contains details about the Naver Pay payment method.pay - naver_pay.
enum Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to
card
.Possible enum valuescard
Use a card to fund this transaction.
points
Use Naver Pay points to fund this transaction.
- us_
bank_ accountobject If this is an
us_
PaymentMethod, this hash contains details about the US bank account payment method.bank_ account - us_bank_account.
account_ holder_ typeenum Bank account holder type.
Possible enum valuescompany
Account belongs to a company
individual
Account belongs to an individual
- us_bank_account.
account_ typeenum Bank account type.
Possible enum valueschecking
Bank account type is checking
savings
Bank account type is savings
Returns
Returns a PaymentMethod object.
{ "id": "pm_1Q0PsIJvEtkwdCNYMSaVuRz6", "object": "payment_method", "allow_redisplay": "unspecified", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": "John Doe", "phone": null }, "created": 1726673582, "customer": null, "livemode": false, "metadata": { "order_id": "6735" }, "type": "us_bank_account", "us_bank_account": { "account_holder_type": "individual", "account_type": "checking", "bank_name": "STRIPE TEST BANK", "financial_connections_account": null, "fingerprint": "LstWJFsCK7P349Bg", "last4": "6789", "networks": { "preferred": "ach", "supported": [ "ach" ] }, "routing_number": "110000000", "status_details": {} }}