#Emile

1 messages · Page 1 of 1 (latest)

fervent questBOT
wicked umbra
#

👋 happy to help

nocturne crest
#

I have am exiting backend (nodejs express) payment scripts, and i need to swap out existing GLobal Pay payment processing with stripe in some situations.

As such i can't just use the stripe ios/google sdks.

I'm struggling to find any documentation that explains how to take the google/apple pay information and send it to stripe to complete a payment.

wicked umbra
#

unfortunately this is not documented

#

if you have already an integration with Apple Pay and you have the token resulting from that integration

nocturne crest
#

Your colleagues shared some information on friday, but i've not been able to fully understand the exact calls to make. Also i beleive the typescript library is typed such that i will have to call the rest API directly rather than using the stripe nodejs lib because it doesn't allow the fields previously suggested.

wicked umbra
#

might be the case but I'm not sure

#

let me check that for you first

#

actually if it's just a typescript error, you could suppress the typescript warning

#

and try it out

nocturne crest
#

so this is the stripe test, i basically get this and the apple equivelent.

#

i do not now how to send this information to stripe createPaymentMethod, to be able to process a wallet payment.

#

So i'm currently just trying to build a Postman call for either the tokens/ endpoint, but without documentation i'm not sure what the google fields are and what values i need to post.

It was suggested that for apple id send pk_tokenization_method and a bunch of other fields.

wicked umbra
#

just give me a moment

nocturne crest
#

np, thanks.

burnt tundra
#

those instructions are for Apple Pay. I have never heard of this being possible with Google Pay

wicked umbra
#

that was exactly what I was going to ask about, thanks for jumping in @burnt tundra

nocturne crest
#

I've been trying to see what the google and apple sdks do. Its pretty difficult to track.

burnt tundra
#

I only heard this question being asked once(in several years of working at Stripe), and I think all we can say is you can try it(passing the GPay cryptogram to the /v1/tokens undocumented params like pk_token, and it might work, we honestly don't know

nocturne crest
#
GitHub

Stripe Android SDK . Contribute to stripe/stripe-android development by creating an account on GitHub.

GitHub

Stripe Android SDK . Contribute to stripe/stripe-android development by creating an account on GitHub.

GitHub

Stripe Android SDK . Contribute to stripe/stripe-android development by creating an account on GitHub.

GitHub

Stripe Android SDK . Contribute to stripe/stripe-android development by creating an account on GitHub.

GitHub

Stripe Android SDK . Contribute to stripe/stripe-android development by creating an account on GitHub.

burnt tundra
#

the Google SDK doesn't do this. Google has a direct integration with us.

#

they send us the payment details directly when you use us as the tokenizationMethod

nocturne crest
#

oh

nocturne crest
#

ah, this is a step i may have missed.

#

so we have dual payment provides in the APP and the business, so the app needs to support both depending on thwat they are paying for.

#

so i would need to configure the google/apple pay config to switch the payment provider depending on what they are paying for. Oh joy.

burnt tundra
#

yep, well that's what you take on when you choose to be multi-processor

nocturne crest
#

yeah, This isn't even the worst of it.

#

ok, so presuming i get the app updated to switch the payment provider out correctly, what happens then.

burnt tundra
#

that token can then be converted to a PaymentMethod in our API by calling /v1/payment_methods with type:card and card[token]=tok_xx , and then you use the PaymentMethod with the PaymentIntents APIs normal

#

this is a highly advanced integration, but it is completely possible and many of our merchants do it

nocturne crest
#

ok, so i get a proper Stripe Token as long as we setup the app correctly. Perfect. i can get this done.

#

thanks for your help.

burnt tundra
#

hmm, actually you already did this

#

like that is the correct result from Google

#

you just need to parse that token ID from the JSON and call /v1/payment_methods with it.

nocturne crest
#

Oh, cool, I’ll check to see if I can grab that value. Currently it’s not passed to my server endpoint. Thanks again.