Verify That Your Application is Eligible for Samsung Pay {#samsungpay-initalize-for-app}
========================================================================================

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.

  > IMPORTANT
  > Request the ` initialize() ` API method of the *SSamsungPay* class 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.
  {#samsungpay-initalize-for-app_ul_s5x_cdr_2pb}  
  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.
  {#samsungpay-initalize-for-app_ul_lnf_pdr_2pb}

Example: Samsung Pay Class {#samsungpay_ex_pay_class}
=====================================================

```
SSamsungPay spay = new SSamsungPay();
try {
    spay.initialize(mContext);
} catch (SsdkUnsupportedException e1) {
    e1.printStackTrace();
    pay_button.setVisibility(View.INVISIBLE);
}                
```

