#Sougu-flutter-applepay

1 messages ยท Page 1 of 1 (latest)

stuck jacinth
#

Hello, Flutter Stripe is a third party library so it will be better to refer to their docs/developers. Unfortunately I don't know which of our docs if any would be applicable here

hybrid wing
#

Ok, no problem. Then just a generel question: Is the way we are creating the payment intent compatible with a workflow for apple pay payments (just to eliminate this source of error)? Like we receive the status updates over a webhook and limit the payment methods to "card"

autumn blade
#

@hybrid wing what error are you seeing? on Token/PM creation? on confirming the PaymentIntent? Can you provide explicit details?

hybrid wing
#

we get an error when confirming the payment intent, not when creating it. it always is an error that translates to "invalid token id"

autumn blade
#

can you pls share the request ID

#

would be something like req_123

hybrid wing
#

where can i get this?

autumn blade
#

the page you are on in your screenshot

hybrid wing
#

req_1FXTDZGloaXSsi

autumn blade
hybrid wing
#

i think it should be this

autumn blade
#

lookiong

autumn blade
#

@hybrid wing still around? I missed this as new threads kept coming in, looking

hybrid wing
#

still around, no problem though ๐Ÿ™‚

autumn blade
#

ah I know what this is

#

so the request you made, it is passing the full encoded Apple Pay PKToken under the payment_method_data.card.token: field

that won't work, that field only expects a Stripe Token ID like tok_1234

So you first need to make a request to /v1/tokens or CreateToken() if that function exists in your Flutter SDK

#

that will create a Stripe Token from the Apple Pay token for you

#

then you can use that Stripe Token to confirm teh PaymentIntent as in the request you shared

hybrid wing
#

has this to be done by the client?

#

oh i read the documentation

#

thanks! you helped me a lot there ๐Ÿ™‚

autumn blade
#

yes the client-side can do that

#

under createToken(), you have to pass the Apple Pay token under the pk_token param, let me link out to how the iOS SDK does it so you can use that as a reference