#alexstyl-android
1 messages · Page 1 of 1 (latest)
hi, let me look
ah ok. This (somewhat legacy) component doesn't actually natively implement Google Pay. It just lets the user pick an option for Google Pay and then you're supposed to actually mount and display and process a GPay button in your own code (https://stripe.dev/stripe-android/payments-core/com.stripe.android/-payment-session-data/use-google-pay.html)
so in theory the intended integration is when you detect the user has picked that, you should then start using a GooglePayLauncher https://stripe.com/docs/google-pay?platform=android , so you have to blend those two integrations together.
personally, I wouldn't, I would just use our current integration of PaymentSheet (not PaymentSession) : https://stripe.com/docs/payments/accept-a-payment?platform=android&ui=payment-sheet since it actually implements GPay for you, and other payment methods. That firebase example just hasn't been updated to use it. I would still definitely just use PaymentSheet though and start with that and then add the Firebase stuff in later.
thank you for having a look and thanks for pointing out the PaymentSheet.
one last question on the same topic. on the example i mentioned there is no mentioning of subscriptions. i am trying to implement monthly and annual subscriptions in my app. can i use the same API used in that example for that?
i found it a bit strange how there is no mentioning of no products i need to create first via the stripe website. i remember using stripe on the web in the past and i thought u had to create products first
subscriptions are possible but unfortunately we don't have any direct native app support for working with them or any documentation for making it work together.
The basic idea is you'd use the normal subscription flow from https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements to create a new subscription, then take the PaymentIntent from the latest_invoice of the subscription, and then use that PaymentIntent in the app. When the app pays that PaymentIntent it activates the subscription. It works and makes sense but you need to already be familiar with both our mobile SDK and our subscriptions APIs unfortunately.
Products and Prices are only needed for certain integrations(our hosted Checkout page, and things like Orders/Invoices/Subscriptions). Right now the mobile SDKs only really do simple one-time payments with raw PaymentIntents so they don't integrate with that world. I agree things are not as integrated and combined as they should be.
alright that clarifies things up. I guess I'd have to use a webview with a checkout page or some other approach
Thanks for the help
that's another option too but Webviews are not great. For example, Google Pay doesn't work at all in a WebView so that won't be an option. Can also cause issues with 3D Secure and other bank redirects if you don't build the WebView in the right way, which is tricky. We recommend using our native SDKs usually.