Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Create a PaymentMethod


Create a PaymentMethod

POST / v1 / payment_methods

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

  • type enum Required 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 acss_debit Pre-authorized debit payments are used to debit Canadian bank accounts through the Automated Clearing Settlement System (the related setting). 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 the related setting Direct Debit is used to debit Australian bank accounts through the Bulk Electronic Clearing System (the related setting). bacs_debit Bacs Direct Debit is used to debit UK bank accounts. bancontact Bancontact is a bank redirect payment method used in Belgium. billie Billie is a payment method. Show 48 more
  • billing _ details object Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
  • metadata map 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 object
  • affirm object
  • afterpay _ clearpay object
  • alipay object
  • allow _ redisplay enum
  • alma object
  • amazon _ pay object
  • au _ becs _ debit object
  • bacs _ debit object
  • bancontact object
  • billie object
  • bizum object
  • blik object
  • boleto object
  • card object
  • cashapp object
  • crypto object
  • custom object
  • customer _ balance object
  • eps object
  • fpx object
  • giropay object
  • grabpay object
  • ideal object
  • interac _ present object Preview feature
  • kakao _ pay object
  • klarna object
  • konbini object
  • kr _ card object
  • link object
  • mb _ way object
  • mobilepay object
  • multibanco object
  • naver _ pay object
  • nz _ bank _ account object
  • oxxo object
  • p24 object
  • pay _ by _ bank object
  • payco object
  • paynow object
  • paypal object
  • paypay object
  • payto object
  • pix object
  • promptpay object
  • radar _ options object
  • revolut _ pay object
  • samsung _ pay object
  • satispay object
  • scalapay object
  • sepa _ debit object
  • sofort object
  • sunbit object
  • swish object
  • twint object
  • upi object
  • us _ bank _ account object
  • wechat _ pay object
  • zip object

Returns

Returns a PaymentMethod object.

Response

{ "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": {} }}

Update a PaymentMethod

POST / v1 / payment_methods /:id

Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated.

Parameters

  • billing _ details object Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.
  • metadata map 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
  • card object
  • payto object
  • us _ bank _ account object

Returns

Returns a PaymentMethod object.

Response

{ "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": {} }}

Retrieve a PaymentMethod

GET / v1 / payment_methods /:id

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.

Response

{ "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": {} }}
Last verified 2026-09-24

Is this helpful?