Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js.
Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.
Parameters
- typeenumRequired
The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
Possible enum valuesacss_debit Pre-authorized debit payments are used to debit Canadian bank accounts through the Automated Clearing Settlement System (ACSS).
affirmAffirm is a buy now, pay later payment method in the US.
afterpay_clearpay Afterpay / Clearpay is a buy now, pay later payment method used in Australia, Canada, France, New Zealand, Spain, the UK, and the US.
alipayAlipay is a digital wallet payment method used in China.
almaAlma is a Buy Now, Pay Later payment method that lets customers pay in 2, 3, or 4 installments.
amazon_pay Amazon Pay is a Wallet payment method that lets hundreds of millions of Amazon customers pay their way, every day.
au_becs_ debit BECS Direct Debit is used to debit Australian bank accounts through the Bulk Electronic Clearing System (BECS).
bacs_debit Bacs Direct Debit is used to debit UK bank accounts.
bancontactBancontact is a bank redirect payment method used in Belgium.
billieBillie is a payment method.
Show 43 more - billing_
detailsdictionary Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- billing_details.
addressdictionary 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, such as the street, PO Box, or company name.
- billing_details.
address. line2string Address line 2, such as the 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).
- billing_details.
tax_ idstring Taxpayer identification number. Used only for transactions between LATAM buyers and non-LATAM sellers.
- metadatadictionary
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
- acss_
debitdictionary If this is an
acss_PaymentMethod, this hash contains details about the ACSS Debit payment method.debit - acss_debit.
account_ numberstringRequired Customer’s bank account number.
- acss_debit.
institution_ numberstringRequired Institution number of the customer’s bank.
- acss_debit.
transit_ numberstringRequired Transit number of the customer’s bank.
- affirmdictionary
If this is an
affirmPaymentMethod, this hash contains details about the Affirm payment method. - afterpay_
clearpaydictionary If this is an
AfterpayClearpayPaymentMethod, this hash contains details about the AfterpayClearpay payment method. - alipaydictionary
If this is an
AlipayPaymentMethod, this hash contains details about the Alipay payment method. - 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 valuesalwaysUse
alwaysto indicate that this payment method can always be shown to a customer in a checkout flow.limitedUse
limitedto 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.unspecifiedThis is the default value for payment methods where
allow_wasn’t set.redisplay - almadictionary
If this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
- amazon_
paydictionary If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
- au_
becs_ debitdictionary If this is an
au_PaymentMethod, this hash contains details about the bank account.becs_ debit - au_becs_debit.
account_ numberstringRequired The account number for the bank account.
- au_becs_debit.
bsb_ numberstringRequired Bank-State-Branch number of the bank account.
- bacs_
debitdictionary If this is a
bacs_PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.debit - bacs_debit.
account_ numberstring Account number of the bank account that the funds will be debited from.
- bacs_debit.
sort_ codestring Sort code of the bank account. (e.g.,
10-20-30)
- bancontactdictionary
If this is a
bancontactPaymentMethod, this hash contains details about the Bancontact payment method. - billiedictionary
If this is a
billiePaymentMethod, this hash contains details about the Billie payment method. - blikdictionary
If this is a
blikPaymentMethod, this hash contains details about the BLIK payment method. - boletodictionary
If this is a
boletoPaymentMethod, this hash contains details about the Boleto payment method.- boleto.
tax_ idstringRequired The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers)
- carddictionary
If this is a
cardPaymentMethod, this hash contains the user’s card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with formatcard: {token: "tok_. When providing a card number, you must meet the requirements for PCI compliance. We strongly recommend using Stripe.js instead of interacting with this API directly.visa"} - card.
exp_ monthintegerRequired Two-digit number representing the card’s expiration month.
- card.
exp_ yearintegerRequired Four-digit number representing the card’s expiration year.
- card.
numberstringRequired The card number, as a string without any separators.
- card.
cvcstring The card’s CVC. It is highly recommended to always include this value.
- card.
networksdictionary 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
- cashappdictionary
If this is a
cashappPaymentMethod, this hash contains details about the Cash App Pay payment method. - cryptodictionary
If this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
- customdictionaryPreview feature
If this is a
customPaymentMethod, this hash contains details about the Custom payment method.- custom.
typestringRequired ID of the Dashboard-only CustomPaymentMethodType. This field is used by Stripe products’ internal code to support CPMs.
- customer_
balancedictionary If this is a
customer_PaymentMethod, this hash contains details about the CustomerBalance payment method.balance - epsdictionary
If this is an
epsPaymentMethod, this hash contains details about the EPS payment method.- eps.
bankstring The customer’s bank.
- fpxdictionary
If this is an
fpxPaymentMethod, this hash contains details about the FPX payment method.- fpx.
bankstringRequired The customer’s bank.
- giropaydictionary
If this is a
giropayPaymentMethod, this hash contains details about the Giropay payment method. - grabpaydictionary
If this is a
grabpayPaymentMethod, this hash contains details about the GrabPay payment method. - idealdictionary
If this is an
idealPaymentMethod, this hash contains details about the iDEAL payment method.- ideal.
bankstring The customer’s bank. Only use this parameter for existing customers. Don’t use it for new customers.
- interac_
presentdictionaryPreview feature If this is an
interac_PaymentMethod, this hash contains details about the Interac Present payment method.present - kakao_
paydictionary If this is a
kakao_PaymentMethod, this hash contains details about the Kakao Pay payment method.pay - klarnadictionary
If this is a
klarnaPaymentMethod, this hash contains details about the Klarna payment method.- klarna.
dobdictionary Customer’s date of birth
- klarna.
dob. dayintegerRequired The day of birth, between 1 and 31.
- klarna.
dob. monthintegerRequired The month of birth, between 1 and 12.
- klarna.
dob. yearintegerRequired The four-digit year of birth.
- konbinidictionary
If this is a
konbiniPaymentMethod, this hash contains details about the Konbini payment method. - kr_
carddictionary If this is a
kr_PaymentMethod, this hash contains details about the Korean Card payment method.card - linkdictionary
If this is an
LinkPaymentMethod, this hash contains details about the Link payment method. - mb_
waydictionary If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
- mobilepaydictionary
If this is a
mobilepayPaymentMethod, this hash contains details about the MobilePay payment method. - multibancodictionary
If this is a
multibancoPaymentMethod, this hash contains details about the Multibanco payment method. - dictionary
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 valuescardUse a card to fund this transaction.
pointsUse Naver Pay points to fund this transaction.
- nz_
bank_ accountdictionary If this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
- nz_bank_account.
account_ numberstringRequired The account number for the bank account.
- nz_bank_account.
bank_ codestringRequired The numeric code for the bank account’s bank.
- nz_bank_account.
branch_ codestringRequired The numeric code for the bank account’s bank branch.
- nz_bank_account.
suffixstringRequired The suffix of the bank account number.
- nz_bank_account.
account_ holder_ namestring The name on the bank account. Only required if the account holder name is different from the name of the authorized signatory collected in the PaymentMethod’s billing details.
- oxxodictionary
If this is an
oxxoPaymentMethod, this hash contains details about the OXXO payment method. - p24dictionary
If this is a
p24PaymentMethod, this hash contains details about the P24 payment method.- p24.
bankenum The customer’s bank.
- pay_
by_ bankdictionary If this is a
pay_PaymentMethod, this hash contains details about the PayByBank payment method.by_ bank - paycodictionary
If this is a
paycoPaymentMethod, this hash contains details about the PAYCO payment method. - paynowdictionary
If this is a
paynowPaymentMethod, this hash contains details about the PayNow payment method. - paypaldictionary
If this is a
paypalPaymentMethod, this hash contains details about the PayPal payment method. - paypaydictionaryPreview feature
If this is a
paypayPaymentMethod, this hash contains details about the PayPay payment method. - pixdictionary
If this is a
pixPaymentMethod, this hash contains details about the Pix payment method. - promptpaydictionary
If this is a
promptpayPaymentMethod, this hash contains details about the PromptPay payment method. - radar_
optionsdictionary Options to configure Radar. See Radar Session for more information.
- radar_options.
sessionstringsecret key only A Radar Session is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments.
- revolut_
paydictionary If this is a
revolut_PaymentMethod, this hash contains details about the Revolut Pay payment method.pay - samsung_
paydictionary If this is a
samsung_PaymentMethod, this hash contains details about the SamsungPay payment method.pay - satispaydictionary
If this is a
satispayPaymentMethod, this hash contains details about the Satispay payment method. - sepa_
debitdictionary If this is a
sepa_PaymentMethod, this hash contains details about the SEPA debit bank account.debit - sepa_debit.
ibanstringRequired IBAN of the bank account.
- sofortdictionary
If this is a
sofortPaymentMethod, this hash contains details about the SOFORT payment method.- sofort.
countryenumRequired Two-letter ISO code representing the country the bank account is located in.
Possible enum valuesATAustria
BEBelgium
DEGermany
ESSpain
ITItaly
NLNetherlands
- swishdictionary
If this is a
swishPaymentMethod, this hash contains details about the Swish payment method. - twintdictionary
If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
- us_
bank_ accountdictionary 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 Account holder type: individual or company.
Possible enum valuescompanyAccount belongs to a company
individualAccount belongs to an individual
- us_bank_account.
account_ numberstring Account number of the bank account.
- us_bank_account.
account_ typeenum Account type: checkings or savings. Defaults to checking if omitted.
Possible enum valuescheckingBank account type is checking
savingsBank account type is savings
- us_bank_account.
financial_ connections_ accountstring The ID of a Financial Connections Account to use as a payment method.
- us_bank_account.
routing_ numberstring Routing number of the bank account.
- wechat_
paydictionary If this is an
wechat_PaymentMethod, this hash contains details about the wechat_pay payment method.pay - zipdictionary
If this is a
zipPaymentMethod, this hash contains details about the Zip payment method.
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": {}, "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": {} }}