chrisjenx
02/03/2025, 5:28 PMChrimaeon
02/03/2025, 6:14 PMchrisjenx
02/03/2025, 8:03 PMmarkturnip
11/06/2025, 10:51 AMmarkturnip
11/06/2025, 10:52 AMmarkturnip
11/06/2025, 10:52 AMchrisjenx
11/07/2025, 2:25 AMchrisjenx
11/07/2025, 2:27 AMchrisjenx
11/07/2025, 2:27 AMmarkturnip
11/07/2025, 2:33 AMchrisjenx
11/07/2025, 2:34 AMmarkturnip
11/07/2025, 2:34 AMmarkturnip
11/07/2025, 2:34 AMchrisjenx
11/07/2025, 2:35 AMmarkturnip
11/07/2025, 2:35 AMmarkturnip
11/18/2025, 7:21 AMPaymentSheet from within my definition, but the initialiser requires Activity
For now I’ve ended up creating a StripeCheckout composable which owns the paymentSheet and is responsible for presenting:
https://github.com/markst/stripe-kmp/blob/main/shared/src/androidMain/kotlin/com/fouroneone/stripe/StripePayments.android.ktmarkturnip
11/18/2025, 7:26 AMPaymentSheet simply like this:
private class AndroidStripePayments(private val context: Context) : StripePayments {
var paymentSheet: PaymentSheet?
@Composable
override fun Initialize(publishableKey: String) {
PaymentConfiguration.init(context = context, publishableKey = publishableKey)
paymentSheet = PaymentSheet.Builder { result -> onResult(result.toCommonResult()) }.build()
}
@Composable
override fun presentWithPaymentIntent(
clientSecret: String,
onResult: (PaymentSheetResult) -> Unit
) {
paymentSheet.presentWithPaymentIntent(
paymentIntentClientSecret = clientSecret,
configuration = null
)
}
}