#lory1234_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1296123914459676673
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ I may be misremembering, but I believe passing card in payment_method_types is sufficient to accept Apple and Google Pay payments. Is that different from what you're seeing? If so, what type of integration are you building, is this using the Payment Element or a different approach?
im using ExpressCheckout element for wallet payments
Can you share the ID of a request that threw the error you're referring to? That should have an req_ prefix.
oh, 1 sec pls
this is the message
let me write it for you
I had to find it from a video
sorry
That's thrown because there is a misalignment between how you specify payment method types on the frontend when initializing elements vs the backend when you create the intent.
Can you share your code for initializing Elements and the Express Checkout Element, and your code for creating a Payment Intent?
Double checking our guide for implementing the Express Checkout Element, it does look passing card in paymentMethodTypes should get you Apple and Google Pay. Is that not what you were seeing when you ere manually specifying the payment method types?
https://docs.stripe.com/elements/express-checkout-element/accept-a-payment#supported-payment-methods
Leave what like what?
Right now that error is being thrown because you're using automatic payment methods on the frontend (since you aren't specifying paymentMethodTypes stripe.js reference )
But when creating the Payment Intent you are specifying payment_method_types.
That creates a mislaignment between your front and backend, which is why we throw that error blocking that type of flow.
You'll need to adjust either your frontend or your backend, so that they either both manually specify payment method types or both use automatic payment methods.
I dont set any payment_method type in FE ๐ค
Yup, that's the problem, or at least part of it.
where should I set it ?
In the paymentMethodTypes parameter that I linked to our reference doc for above.
my understanding is that wallets are automatic and I cant make them manual
That conflicts with the doc that I referenced in this message. If you can help me understand what gave you that impression I can take a look to see if there is verbiage that we can improve.
paymentMethodTypes parameter isnt shown for my ExpressCheckout Element but I will have a look if I need to update stripe package first
It's not on the Express Checkout Element, it's on the Elements instance.
Any time!
hey
Mhmm?
I added it in FE but it still throws the same error
this is the request id: req_PXkBih0VcFSriD
May sound silly, but did you save and deploy your changes? Do you have a publicly accessible test site where we can see your flow?
Im using ngrok url ๐
Ssoo, yes?