Google Pay integration guide for Android Compose

Is there any guidance on integrating the Google Pay button in Android Compose? The current guide in Enable Google Pay is for java integration for legacy Android views.

Also a guide on integrating Apple Pay on Kotlin Multiplatform (KMP) would be great too.

Thanks for raising both of these. I’m flagging them to our product and docs teams.

Google Pay on Android: You’re right that the Enable Google Pay guide is written in Java against the legacy view system, and we don’t currently have a Compose version.

One thing that may unblock you in the meantime: the Square-specific part of that flow is quite small. Our SDK is only involved in three calls — GooglePay.createIsReadyToPayRequest(), GooglePay.createPaymentDataRequest(), and GooglePay.requestGooglePayNonce(). The button itself, the payment sheet, and the activity result handling all come from Google’s Wallet API rather than from us. So you can follow Google’s own Android integration guide for the Compose-era patterns — it documents both a PayButton composable and an activity result contract for handling the payment result — and then pass the resulting Google Pay token into GooglePay.requestGooglePayNonce() to get your Square payment token.

Apple Pay on KMP: We don’t have a Kotlin Multiplatform SDK or any KMP guidance today. Our supported cross-platform options are the Flutter plugin and the React Native plugin. I don’t want to hand you an unverified KMP approach, so I’ll raise this as a feature request rather than guess at an integration path.

If you can share which setup you’re targeting — Compose Multiplatform versus native UI per platform — that’s useful context for prioritizing.

Thank you @ashley-square I will take a look at the 3 mentioned functions and follow the Google’s guidelines. My setup is Kotlin Multiplatform (KMP) which consists of common UI functionality in .kt files written in Compose pattern, and native code per platform written in .android.kt and .ios.kt files which uses expect/actual functions that resolve in per platform functions.