On This Page
Verify That Your Application is Eligible for Samsung
Pay
You must initialize the
SSamsungPay
class to verify that your application is
eligible for Samsung Pay and to display the Samsung Pay button to the customer (refer to
branding guidelines).The
SSamsungPay
class provides the following API methods:- initialize()—initializes the Samsung Pay SDK and verifies eligibility for Samsung Pay, including the device, software, and business area.Request theinitialize()API method of theSSamsungPayclass before using the Samsung Pay SDK.
- getVersionCode()—retrieves the version number of the Samsung Pay SDK as an integer.
- getVersionName()—retrieves the version name of the Samsung Pay SDK as a string.
After the
initialize()
API method request is successful, display the
Samsung Pay button to the customer.If the
initialize()
API method request fails, the method displays one of
the following errors:- SsdkUnsupportedException—the device is not a Samsung device or does not support the Samsung Pay package.
- NullPointerException—the context passed is null.
Example: Samsung Pay Class
SSamsungPay spay = new SSamsungPay(); try { spay.initialize(mContext); } catch (SsdkUnsupportedException e1) { e1.printStackTrace(); pay_button.setVisibility(View.INVISIBLE); }