#lory1234_api

1 messages ยท Page 1 of 1 (latest)

tiny graniteBOT
#

๐Ÿ‘‹ 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.

mental emberBOT
compact onyx
#

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?

limpid fulcrum
#

im using ExpressCheckout element for wallet payments

compact onyx
#

Can you share the ID of a request that threw the error you're referring to? That should have an req_ prefix.

limpid fulcrum
#

oh, 1 sec pls

#

this is the message

#

let me write it for you

#

I had to find it from a video

#

sorry

compact onyx
#

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?

limpid fulcrum
#

yes sure

#

this is the front-end

#

and the backend looks like this

compact onyx
limpid fulcrum
#

when I leave it like this it throws this error

compact onyx
#

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.

limpid fulcrum
#

I dont set any payment_method type in FE ๐Ÿค”

compact onyx
#

Yup, that's the problem, or at least part of it.

limpid fulcrum
#

where should I set it ?

compact onyx
#

In the paymentMethodTypes parameter that I linked to our reference doc for above.

limpid fulcrum
#

my understanding is that wallets are automatic and I cant make them manual

compact onyx
limpid fulcrum
#

paymentMethodTypes parameter isnt shown for my ExpressCheckout Element but I will have a look if I need to update stripe package first

compact onyx
#

It's not on the Express Checkout Element, it's on the Elements instance.

limpid fulcrum
#

ah ok

#

thanls

compact onyx
#

Any time!

limpid fulcrum
#

hey

compact onyx
#

Mhmm?

limpid fulcrum
#

I added it in FE but it still throws the same error

#

this is the request id: req_PXkBih0VcFSriD

compact onyx
#

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?

limpid fulcrum
#

Im using ngrok url ๐Ÿ™‚

compact onyx
#

Ssoo, yes?

tiny graniteBOT