PaymentMethod objects represent your customer’s payment instruments. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.
Related guides: Payment Methods and More Payment Scenarios.
Attributes
- idstring
Unique identifier for the object.
- billing_
details DictionaryBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- customernullable stringExpandable
The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
- metadatanullable Dictionary
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.
- typeenum
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).
affirm
Affirm 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.
alipay
Alipay is a digital wallet payment method used in China.
alma
Alma 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.
bancontact
Bancontact is a bank redirect payment method used in Belgium.
blik
BLIK is a single-use payment method common in Poland.
Show 79 more
More attributes
- objectstring
- acss_
debit nullable Dictionary - affirmnullable Dictionary
- afterpay_
clearpay nullable Dictionary - alipaynullable Dictionary
- allow_
redisplay nullable enum - almanullable Dictionary
- amazon_
pay nullable Dictionary - au_
becs_ nullable Dictionarydebit - bacs_
debit nullable Dictionary - bancontactnullable Dictionary
- bliknullable Dictionary
- boletonullable Dictionary
- cardnullable Dictionary
- card_
present nullable Dictionary - cashappnullable Dictionary
- createdtimestamp
- customer_
balance nullable Dictionary - epsnullable Dictionary
- fpxnullable Dictionary
- giropaynullable Dictionary
- grabpaynullable Dictionary
- idealnullable Dictionary
- interac_
present nullable DictionaryPreview feature - kakao_
pay nullable Dictionary - klarnanullable Dictionary
- konbininullable Dictionary
- kr_
card nullable Dictionary - linknullable Dictionary
- livemodeboolean
- mobilepaynullable Dictionary
- multibanconullable Dictionary
- naver_
pay nullable Dictionary - nz_
bank_ nullable DictionaryPreview featureaccount - oxxonullable Dictionary
- p24nullable Dictionary
- pay_
by_ nullable DictionaryPreview featurebank - payconullable Dictionary
- paynownullable Dictionary
- paypalnullable Dictionary
- pixnullable Dictionary
- promptpaynullable Dictionary
- radar_
options nullable Dictionary - revolut_
pay nullable Dictionary - samsung_
pay nullable Dictionary - sepa_
debit nullable Dictionary - sofortnullable Dictionary
- swishnullable Dictionary
- twintnullable Dictionary
- us_
bank_ nullable Dictionaryaccount - wechat_
pay nullable Dictionary - zipnullable Dictionary
{ "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": {} }}
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).
affirm
Affirm 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.
alipay
Alipay is a digital wallet payment method used in China.
alma
Alma 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.
bancontact
Bancontact is a bank redirect payment method used in Belgium.
blik
BLIK is a single-use payment method common in Poland.
Show 78 more - billing_
details DictionaryBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- 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_
debit Dictionary - affirmDictionary
- afterpay_
clearpay Dictionary - alipayDictionary
- allow_
redisplay enum - almaDictionary
- amazon_
pay Dictionary - au_
becs_ Dictionarydebit - bacs_
debit Dictionary - bancontactDictionary
- blikDictionary
- boletoDictionary
- cardDictionary
- cashappDictionary
- customer_
balance Dictionary - epsDictionary
- fpxDictionary
- giropayDictionary
- grabpayDictionary
- idealDictionary
- interac_
present DictionaryPreview feature - kakao_
pay Dictionary - klarnaDictionary
- konbiniDictionary
- kr_
card Dictionary - linkDictionary
- mobilepayDictionary
- multibancoDictionary
- naver_
pay Dictionary - nz_
bank_ DictionaryPreview featureaccount - oxxoDictionary
- p24Dictionary
- pay_
by_ DictionaryPreview featurebank - paycoDictionary
- paynowDictionary
- paypalDictionary
- pixDictionary
- promptpayDictionary
- radar_
options Dictionary - revolut_
pay Dictionary - samsung_
pay Dictionary - sepa_
debit Dictionary - sofortDictionary
- swishDictionary
- twintDictionary
- us_
bank_ Dictionaryaccount - wechat_
pay Dictionary - zipDictionary
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": {} }}
Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
Parameters
- billing_
details DictionaryBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- 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
- allow_
redisplay enum - cardDictionary
- linkDictionary
- naver_
pay Dictionary - pay_
by_ DictionaryPreview featurebank - us_
bank_ Dictionaryaccount
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": {} }}
Retrieves a PaymentMethod object for a given Customer.
Parameters
No parameters.
Returns
Returns a PaymentMethod object.
{ "id": "pm_1NVChw2eZvKYlo2CHxiM5E2E", "object": "payment_method", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": null, "phone": null }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "pass" }, "country": "US", "exp_month": 12, "exp_year": 2034, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "generated_from": null, "last4": "4242", "networks": { "available": [ "visa" ], "preferred": null }, "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 1689682128, "customer": "cus_9s6XKzkNRiz8i3", "livemode": false, "metadata": {}, "redaction": null, "type": "card"}