#dannyboy
1 messages · Page 1 of 1 (latest)
stripe.createPaymentMethod only supports payment method listed here: https://stripe.com/docs/js/payment_methods/create_payment_method#stripe_create_payment_method-paymentMethodData
Apple Pay and Google Pay are not supported.
Could you share what you would like to achieve?
so currently, our app is integrated with stripe using stripe.js.. now, client wants me to implement something that allows user to pay using apple pay / google pay
the more ways to pay the better. giving customer more flexibility
I'd recommend using Payment Element instead: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Payment Element supports multiple payment methods including Apple Pay and Google Pay in one integration
does this handle two-step authentication as well?
If you're referring to 3DS authentication by the card issuer, then yes!
We provides migration doc from Tokens/Charges to Card Element with Payment Intent: https://stripe.com/docs/payments/payment-intents/migration?web-migration=elements
Card Element is very similar to Payment Element, but the only difference is that Card Element only supports card.
You may then refer to this migration guide from Card Element to Payment Element: https://stripe.com/docs/payments/payment-element/migration
thank you
is PaymentElement new? compare to CardElement?
we are using CardElement and this PaymentElement seems really good
The migration doc here refer to Token/Charges on Card Element to Payment Intent on Card Element: https://stripe.com/docs/payments/payment-intents/migration?web-migration=elements
Tokens/Charges are legacy and Payment Intent is the new way and recommended way to do it. Although both are Card Elements, the underlying APIs are different.
After updating to Payment Intent on Card Element, you can opt to change to Payment Intent on Payment Element: https://stripe.com/docs/payments/payment-element/migration
Payment Element has come out for quite some time and the integration is a lot more seamless for supporting multiple payment methods
okay . just to confirm, i can modify this page..
to show Card , Google Pay, Apple Pay in here...
it is also possible to remove those option if Google Pay and Apple Pay is not enabled.. leaving only Card payment so providing option is a bit useless and thus can be hidden?
don't wanna code as of this moment and just studying if the feature is viable or not
Yes! There are two ways to do it:
Option 1 - Automatic Payment Methods
- Enable automatic payment method in Payment Intent creation under
automatic_payment_methods.enabledparameter: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-automatic_payment_methods - Supported payment methods in Payment Element can be set in Dashboard: https://dashboard.stripe.com/test/settings/payment_methods
Option 2 - API
- Set supports payment methods using API with
payment_method_typesparameters: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_types - Google Pay and Apple Pay configuration are not part of
payment_method_types, it will be configured separately at frontend withwallets.applePayandwallets.googlePayconfiguration: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-wallets
Option 1 is definitely a lot easier and less code changes
Cool!
how can i make sure this thread doesn't get deleted?
so i can just come back when its time to code it
You may save this thread link (https://discord.com/channels/841573134531821608/1047348984303329310) and come back to revisit the conversation later
This thread won't be deleted
all good! thank you
No problem! Happy to help 😄