The PaymentMethod object
Attributes
- idstring
Unique identifier for the object.
- billing_
detailsobject Billing 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 object
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.
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.
boleto
Boleto is a voucher-based payment method used in Brazil.
Show 70 more
More attributes
- objectstring
- acss_
debitnullable object - affirmnullable object
- afterpay_
clearpaynullable object - alipaynullable object
- allow_
redisplaynullable enum - amazon_
paynullable object - au_
becs_ debitnullable object - bacs_
debitnullable object - bancontactnullable object
- bliknullable object
- boletonullable object
- cardnullable object
- card_
presentnullable object - cashappnullable object
- createdtimestamp
- customer_
balancenullable object - epsnullable object
- fpxnullable object
- giropaynullable object
- grabpaynullable object
- idealnullable object
- interac_
presentnullable objectPreview feature - klarnanullable object
- konbininullable object
- linknullable object
- livemodeboolean
- mobilepaynullable object
- multibanconullable object
- oxxonullable object
- p24nullable object
- paynownullable object
- paypalnullable object
- pixnullable object
- promptpaynullable object
- radar_
optionsnullable object - revolut_
paynullable object - sepa_
debitnullable object - sofortnullable object
- swishnullable object
- twintnullable object
- us_
bank_ accountnullable object - wechat_
paynullable object - zipnullable object
{
"id": "pm_1MqLiJLkdIwHu7ixUEgbFdYF",
"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": "unchecked"
},
"country": "US",
"exp_month": 8,
"exp_year": 2026,
"fingerprint": "mToisGZ01V71BCos",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1679945299,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
Create a PaymentMethod
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.
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.
boleto
Boleto is a voucher-based payment method used in Brazil.
Show 69 more - billing_
detailsobject Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- 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
- acss_
debitobject - affirmobject
- afterpay_
clearpayobject - alipayobject
- allow_
redisplayenum - amazon_
payobject - au_
becs_ debitobject - bacs_
debitobject - bancontactobject
- blikobject
- boletoobject
- cardobject
- cashappobject
- customer_
balanceobject - epsobject
- fpxobject
- giropayobject
- grabpayobject
- idealobject
- interac_
presentobjectPreview feature - klarnaobject
- konbiniobject
- linkobject
- mobilepayobject
- multibancoobject
- oxxoobject
- p24object
- paynowobject
- paypalobject
- pixobject
- promptpayobject
- radar_
optionsobject - revolut_
payobject - sepa_
debitobject - sofortobject
- swishobject
- twintobject
- us_
bank_ accountobject - wechat_
payobject - zipobject
Returns
Returns a PaymentMethod object.
{
"id": "pm_1MqLiJLkdIwHu7ixUEgbFdYF",
"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": "unchecked"
},
"country": "US",
"exp_month": 8,
"exp_year": 2026,
"fingerprint": "mToisGZ01V71BCos",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1679945299,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}
Update a PaymentMethod
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.
- 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 - cardobject
- linkobject
- us_
bank_ accountobject
Returns
Returns a PaymentMethod object.
{
"id": "pm_1MqLiJLkdIwHu7ixUEgbFdYF",
"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": "unchecked"
},
"country": "US",
"exp_month": 8,
"exp_year": 2026,
"fingerprint": "mToisGZ01V71BCos",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1679945299,
"customer": null,
"livemode": false,
"metadata": {
"order_id": "6735"
},
"type": "card"
}
Retrieve a Customer's PaymentMethod
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"
}
Retrieve a PaymentMethod
Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods
Parameters
No parameters.
Returns
Returns a PaymentMethod object.
{
"id": "pm_1MqLiJLkdIwHu7ixUEgbFdYF",
"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": "unchecked"
},
"country": "US",
"exp_month": 8,
"exp_year": 2026,
"fingerprint": "mToisGZ01V71BCos",
"funding": "credit",
"generated_from": null,
"last4": "4242",
"networks": {
"available": [
"visa"
],
"preferred": null
},
"three_d_secure_usage": {
"supported": true
},
"wallet": null
},
"created": 1679945299,
"customer": null,
"livemode": false,
"metadata": {},
"type": "card"
}