#balconytom - create PM
1 messages · Page 1 of 1 (latest)
Hello. One moment
You can achieve this with this call: https://stripe.com/docs/js/payment_methods/create_payment_method
yep, that's what I've been using so far, but now I'm migrating to new stripe elements which can have multiple payment methods so I'm wondering if there's a more generic createPaymentMethod for all different types of payment methods?
That works for multiple types. See: https://stripe.com/docs/js/payment_methods/create_payment_method#stripe_create_payment_method-paymentMethodData-type
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ah I see, so I can fetch the type somehow from the elements object?
(after the user selects it)
brilliant, looks like I can use it, thx a lot for help
No problem!