The PaymentMethod object
Attributes
- idstring
Unique identifier for the object.
- billing_
detailsassociative array 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 associative array
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.
More attributes
- objectstring
- acss_
debitnullable associative array - affirmnullable associative array
- afterpay_
clearpaynullable associative array - alipaynullable associative array
- allow_
redisplaynullable enumPreview feature - amazon_
paynullable associative array - au_
becs_ debitnullable associative array - bacs_
debitnullable associative array - bancontactnullable associative array
- bliknullable associative array
- boletonullable associative array
- cardnullable associative array
- card_
presentnullable associative array - cashappnullable associative array
- createdtimestamp
- customer_
balancenullable associative array - epsnullable associative array
- fpxnullable associative array
- giropaynullable associative array
- grabpaynullable associative array
- idealnullable associative array
- interac_
presentnullable associative arrayPreview feature - klarnanullable associative array
- konbininullable associative array
- linknullable associative array
- livemodeboolean
- mobilepaynullable associative array
- oxxonullable associative array
- p24nullable associative array
- paynownullable associative array
- paypalnullable associative array
- pixnullable associative array
- promptpaynullable associative array
- radar_
optionsnullable associative array - revolut_
paynullable associative array - sepa_
debitnullable associative array - sofortnullable associative array
- swishnullable associative array
- us_
bank_ accountnullable associative array - wechat_
paynullable associative array - zipnullable associative array
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.
- billing_
detailsassociative array Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- metadataassociative array
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_
debitassociative array - affirmassociative array
- afterpay_
clearpayassociative array - alipayassociative array
- allow_
redisplayenum - amazon_
payassociative array - au_
becs_ debitassociative array - bacs_
debitassociative array - bancontactassociative array
- blikassociative array
- boletoassociative array
- cardassociative array
- cashappassociative array
- customer_
balanceassociative array - epsassociative array
- fpxassociative array
- giropayassociative array
- grabpayassociative array
- idealassociative array
- interac_
presentassociative arrayPreview feature - klarnaassociative array
- konbiniassociative array
- linkassociative array
- mobilepayassociative array
- oxxoassociative array
- p24associative array
- paynowassociative array
- paypalassociative array
- pixassociative array
- promptpayassociative array
- radar_
optionsassociative array - revolut_
payassociative array - sepa_
debitassociative array - sofortassociative array
- swishassociative array
- us_
bank_ accountassociative array - wechat_
payassociative array - zipassociative array
Returns
Returns a PaymentMethod object.
Update a PaymentMethod
Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated.
Parameters
- billing_
detailsassociative array Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- metadataassociative array
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 - cardassociative array
- linkassociative array
- us_
bank_ accountassociative array
Returns
Returns a PaymentMethod object.
Retrieve a Customer's PaymentMethod
Retrieves a PaymentMethod object for a given Customer.
Parameters
No parameters.
Returns
Returns a PaymentMethod object.
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.