Shopify Checkout Kit - Mobile SDKs
Shopify Checkout Kit
Overview
When your app uses Shopify Checkout Sheet Kit for checkout, Forter needs the checkout token to correlate fraud signals with the transaction.
The SDK exposes the token at two points:
onWebPixelEvent— fires when the checkout opens (checkout_started), providing the token before paymentonCheckoutCompleted— fires after successful payment, providing the token and order ID
Integration
Kotlin
ShopifyCheckoutSheetKit.present(checkoutUrl, activity, object : DefaultCheckoutEventProcessor(activity) {
override fun onWebPixelEvent(event: PixelEvent) {
if (event is StandardPixelEvent && event.name == "checkout_started") {
val checkoutToken = event.data?.checkout?.token ?: return
ForterSDK.getInstance().trackAction(TrackType.PAYMENT_INFO, JSONObject().apply {
put("checkoutToken", checkoutToken)
})
}
}
override fun onCheckoutCompleted(event: CheckoutCompletedEvent) {
val checkoutToken = event.orderDetails.cart.token
val orderId = event.orderDetails.id
ForterSDK.getInstance().trackAction(TrackType.PAYMENT_INFO, JSONObject().apply {
put("checkoutToken", checkoutToken)
put("orderId", orderId)
})
}
})