#benk
1 messages · Page 1 of 1 (latest)
What's the issue?
we are investigating the requirements for adding ApplePay to our own hosted payment page
we were looking at this docs:
https://stripe.com/docs/apple-pay/web/v2
but it turns out that's an older version and v2 has been since deprecated
can you confirm the newer Stripe.js v3 will work with non-Stripe hosted payment pages?
https://stripe.com/docs/stripe-js/elements/payment-request-button
To my understanding Elements and Checkout are mostly used for Strip hosted payment pages, whereas we host our own payment page
You'd a few options to integrate Apple Pay in a non-hosted payment flow:
- Payment Element
- Payment Request Button (what you shared)
- Express Checkout Element (https://stripe.com/docs/elements/express-checkout-element)
Elements is not hosted, no
but the Payment Request Button option still requires using Elements rght?
Yes, the SDK/API uses Stripe.js
I don't know what you mean by 'requires using Elements'
ok, so the docs
https://stripe.com/docs/stripe-js/elements/payment-request-button
step 1 with the header "Set up Stripe Elements" mentions including Elements in the page and setting the container up
Yep, you're using Stripe.js and the Payment Request button is an 'Element' so to speak
ok got it
on more question
is it possible to load the ApplePay button and set it up other than through the Stripe.js?
You can do a direct integration with the Apple Pay API/SDK, sure But that is far more involved and convoluted and we don't have any specific documentation on that
Why are you so adverse to using Stripe.js?
we have our own payment page and we would like to setup the ApplePay which is PSP agnostic, eg: not to hardcode Stripe as the only vendor for the ApplePay button but able to d some clever stuff working out which PSP we would like to set up and then based on that display the configured ApplePay button
Sure, then you can integrate directly with Apple Pay. That will generate a Apple Pay token that can be used to create a Stripe token
we have a list of clients with different Payment Service Provider and would want to setup the ApplePay in a generic manner which would support multiple PSPs when displayed on our payment page
is there a Stripe specific docs for this on how to create the Stripe token from the ApplePay token?
Nothing public, but I can share the parameters that you can pass to /v1/tokens:
pk_token, pk_token_instrument_name, pk_token_payment_network, pk_token_transaction_id
The corresponding Apple Pay token class: https://developer.apple.com/documentation/passkit/pkpaymenttoken