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 values - billing_
detailsobject Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
- metadatamap
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 - almaobject
- amazon_
payobject - au_
becs_ debitobject - bacs_
debitobject - bancontactobject
- billieobject
- bizumobject
- blikobject
- boletoobject
- cardobject
- cashappobject
- cryptoobject
- customobject
- customer_
balanceobject - epsobject
- fpxobject
- giropayobject
- grabpayobject
- idealobject
- interac_
presentobjectPreview feature - kakao_
payobject - klarnaobject
- konbiniobject
- kr_
cardobject - linkobject
- mb_
wayobject - mobilepayobject
- multibancoobject
- naver_
payobject - nz_
bank_ accountobject - oxxoobject
- p24object
- pay_
by_ bankobject - paycoobject
- paynowobject
- paypalobject
- paypayobject
- paytoobject
- pixobject
- promptpayobject
- radar_
optionsobject - revolut_
payobject - samsung_
payobject - satispayobject
- scalapayobject
- sepa_
debitobject - sequraobjectPreview feature
- sofortobject
- sunbitobject
- swishobject
- twintobject
- upiobject
- us_
bank_ accountobject - wechat_
payobject - weroobjectPreview feature
- zipobject
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 to 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.
- metadatamap
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
- us_
bank_ accountobject
Returns
Returns a PaymentMethod object.
curl https://api.stripe.com/v1/payment_methods/{{PAYMENT_METHOD_ID}} \ -u "sk_test_...sk_test_...:" \ -d "metadata[order_id]=6735"{ "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 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.
curl https://api.stripe.com/v1/payment_methods/{{PAYMENT_METHOD_ID}} \ -u "sk_test_...sk_test_...:"{ "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": {} }}