Activate Samsung Pay

If the getSamsungPayStatus() method's event listener returns the onSuccess() event with the SPAY_NOT_READY status code and the EXTRA_ERROR_REASON bundle key value set to ERROR_SPAY_SETUP_NOT_COMPLETE, the customer must activate Samsung Pay on their device.

Display an appropriate message to the customer to ask whether they want to activate Samsung Pay on the same device on which your app is running. If the customer agrees, call the activateSamsungPay() method, provided by the SamsungPay (for the Samsung Pay SDK for Android) or SamsungPaySdkFlutter (for the Samsung Pay SDK for Flutter) class, to launch the Samsung Wallet app so the customer can sign in and complete the activation.

The following code snippet is an example of using the activateSamsungPay() method:

Samsung Pay SDK for Android:

val serviceId = "partner_app_service_id"
val bundle = Bundle()
bundle.putString(SamsungPay.PARTNER_SERVICE_TYPE, SpaySdk.ServiceType.INAPP_PAYMENT.toString())
val partnerInfo = PartnerInfo(serviceId, bundle)
val samsungPay = SamsungPay(context, partnerInfo)
samsungPay.activateSamsungPay()

Samsung Pay SDK for Flutter:

samsungPaySdkFlutterPlugin.activateSamsungPay();