Create Payment Method Elements
Create a PaymentMethod with Elements
Last verified 2026-09-24
Is this helpful?
stripe.createPaymentMethod(options: object) Use stripe.createPaymentMethod to convert payment information collected by elements into a PaymentMethod object that you safely pass to your server to use in an API call. NOTE: In most integrations, you will not need to use this method. Instead, use methods like stripe.confirmPayment, which will automatically create a PaymentMethod when you confirm a PaymentIntent. - options - elements The Elements instance that was used to create the Payment Element. It will be used to pull payment method and billing address data from. - params Parameters that will be passed on to the Stripe API. Refer to the PaymentMethod API for a full list of parameters. - billing_details Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. ### Example title Create a PaymentMethod Is this helpful?