#mark_googlepay-tokenization
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/1242133201070063677
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
hi there
Yes this is possible though we don't recommend it as it brings about a much higher PCI burden
Yes, we are fully PCI DSS compliant
But if you are going to do so then here is a cURL example of what that code might look like: curl -XPOST https://api.stripe.com/v1/payment_intents \ -u 'sk_...': \ -d "amount"=100 \ -d "currency"=usd \ -d "payment_method_types[]"=card \ -d "confirm"=true \ -d "payment_method_data[type]"=card \ -d "payment_method_data[card][exp_month]"=01 \ -d "payment_method_data[card][exp_year]"=2024 \ -d "payment_method_data[card][last4]"=4242 \ -d "payment_method_data[card][network_token][number]"="{DPAN_HERE}" \ -d "payment_method_data[card][network_token][exp_month]"=01 \ -d "payment_method_data[card][network_token][exp_year]"=2024 \ -d "payment_method_options[card][network_token][cryptogram]"="{CRYPTOGRAM}" \ -d "payment_method_data[card][network_token][tokenization_method]"=google_pay_dpan \ -d "payment_method_options[card][network_token][electronic_commerce_indicator]"=05
You can use that code within our SDKs as well
This seems for CRYPTOGRAM_3DS, possible with PAN_ONLY ?
we are going to request 3ds manually
Ah yeah in that case you omit the cryptogram, tokenization method, and electronic commerce indicator
The SDKs return a token?, and then I can use card[token]=tok_xxx in the payment methods api
The above would attempt to create a Charge immediately
And would return an associated PaymentMethod ID (pm_xxx ) for the payment method
You can also do the above with our legacy Tokens API if you want
so if we want to just save the payment method, in that case?
Then you would use a SetupIntent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Instead of PaymentIntent
same parameters?
Yep
could you provide an example like this for that?
For the Tokens API?
I don't have one handy, but you should be able to test it pretty easily using the 4242 card
tokenization_method needs to be google_pay or android_pay?
android_pay but that is only if you are passing cryptogram and ECI
Otherwise you are basically just passing it as a normal Raw PAN
so I pass something like
curl -XPOST https://api.stripe.com/v1/tokens \
-u 'sk_...': \
-d "card[exp_month]"=01 \
-d "card[exp_year]"=2024 \
-d "card[last4]"=4242 \
-d "card[network_token][number]"="{DPAN_HERE}" \
-d "card[network_token][exp_month]"=01 \
-d "card[network_token][exp_year]"=2024 \
-d "card[network_token][tokenization_method]"=google_pay_dpan \
No you omit tokenization method completely. So just the above without tokenization method at all
curl -XPOST https://api.stripe.com/v1/tokens \
-u 'sk_...': \
-d "card[exp_month]"=01 \
-d "card[exp_year]"=2024 \
-d "card[last4]"=4242 \
-d "card[network_token][number]"="{DPAN_HERE}" \
-d "card[network_token][exp_month]"=01 \
-d "card[network_token][exp_year]"=2024 \
that should be it?
Yes I believe so
Test it out with the 4242 card and let me know if it doesn't work
Hmm it is possible with the Tokens API that you don't even pass network_token at all
You would just pass number
-u 'sk_...': \
-d "card[exp_month]"=01 \
-d "card[exp_year]"=2024 \
-d "card[number]"=4242424242424242 \```
Yeah I believe that is correct -- I don't think we support passing Network Tokens on the Tokens API
this works but, now the card.wallet.type doesn't display google_pay
Hi ๐
I'm stepping in as my colleague needs to go
hello ๐
So you are tokenizing decrypted google pay tokens? As my colleague noted, you need to pass android_pay as the tokenization method. These tokens will not display as Google Pay in the card.wallet.type property
Wait... what does 3DS have to do with this?