Skip to main content

Get Started


Follow these steps to set up Samsung Pay with .

Set up REST Compliant Communications

Set up your payment processing system to be REST compliant. If you have not set up secure communications between your client and server using either JSON Web Token (JWT) or HTTP signature messaging, see Getting Started with REST.

Register with Samsung Pay

  1. Create a profile by completing the merchant application on the Samsung Pay Partner Portal.

    After your merchant application is approved, you receive a unique partner ID. Include this ID in your application.

  2. Using the Samsung Pay Partner Portal, upload the CSR file.

  3. Enter an application name and a package name. When you associate the CSR file with the application, Samsung generates a product ID.

  4. Create login details for application developers on the Samsung Pay Partner Portal.

  5. Download and integrate the Samsung Pay SDK into your application.

    The SDK contains:

    • A Javadoc
    • The Samsung Pay SDK files samsungpay.jar and sdk-v1.0.0.jar
    • A sample app
    • The branding guide
    • Image files
  6. Register a Samsung account ID and request a debug-api-key file using the Samsung Pay Partner Portal. The Samsung account ID, the debug-api-key, and the product ID are used to validate your application so that you can use the Samsung Pay SDK for testing.

  7. Submit your application for approval using the Samsung Pay Partner Portal. Upload the final version of the Android Application Package (APK) file using the Samsung Pay Partner Portal, and include screenshots of your checkout page displaying the Samsung Pay logo.

Register with Cybersource

Log in to the to create your Certificate Signing Request (CSR) files.

  • Create a CSR file for test transactions: Test
  • Create a CSR file for production transactions: Production
  • Create a CSR file for test transactions: Test
  • Create a CSR file for production transactions: Production

Create a CSR file for test transactions:

Create a CSR file for production transactions:

After logging in, complete these steps:

  1. On the left navigation pane, click the Payment Configuration icon.

  2. Click Digital Payment Solutions. The Digital Payments page opens.

  3. Click Configure. The Samsung Pay Registration panel opens.

  4. Enter your Samsung partner ID.

  5. Click Generate New CSR.

  6. To download your CSR, click the Download icon next to the key.

  7. Follow your browser's instructions to save and open the file.

  8. Complete the enrollment process by submitting your CSR to Samsung.

Create a Samsung Pay Project

You use Android Studio to create a new Android Studio project, which is required to integrate the Samsung SDK.

  1. Download Android Studio from https://developer.android.com/studio/index.html.

  2. Open Android Studio and click Start a new Android Studio project.

  3. In the New Project settings menu, enter the name of your application and the company domain.

  4. To change the package name, click Edit. By default, Android Studio sets the last element of the project's package name to the name of your application.

  5. Click Next.

  6. In the Target Android Devices settings menu, choose the required API levels.

  7. Click Next.

  8. Choose the required activity and click Finish.

Integrate the Samsung Pay SDK

  1. Add the samsungpay.jar and sdk-v1.0.0.jar files to the libs folder of your Android project.

  2. Choose Gradle Scripts > build.gradle and enter these dependencies:

dependencies {    compile files('libs/samsungpay.jar')    compile files('libs/sdk-v1.0.0.jar')}
  1. Import the package:
import com.samsung.android.sdk.samsungpay.*;

Use Your API Key

The API key is used to verify that your app (in debug mode or release mode) can use the Samsung Pay SDK APIs with the Samsung Pay application. To get the API key, you must create a debug-api-key file and include it in the manifest file.

To use the API key, include it in the manifest file with a custom tag. This enables the merchant app android manifest file to provide the DebugMode, spay_debug_api_key values as metadata.

<meta-data    android:name="debug_mode"    android:value="Y" /><meta-data    android:name="spay_debug_api_key"    android:value="asdfggkndkeie17283094858" />
<meta-data    android:name="debug_mode"    android:value="N" />

Initialize Samsung Pay in Your 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 these API methods:

  • initialize()—initializes the Samsung Pay SDK and verifies eligibility for Samsung Pay, including the device, software, and business area.

  • 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 these errors:

  • SsdkUnsupportedException—the device is not a Samsung device or does not support the Samsung Pay package.
  • NullPointerException—the context passed is null.
SSamsungPay spay = new SSamsungPay();try {    spay.initialize(mContext);} catch (SsdkUnsupportedException e1) {    e1.printStackTrace();    pay_button.setVisibility(View.INVISIBLE);}

Initiate a Payment

You are required to use a specific transaction request structure and required fields to initiate a payment.

These fields are required for initiating a payment; include these fields in the PaymentInfo class:

FieldDescription
Merchant NameThe merchant name as it appears on the payment sheet of Samsung Pay and the customer's bank statement.
Amount—
Payment Protocol3-D Secure.
Permitted Card BrandsSpecify the card brands that are supported such as American Express, JCB, Mastercard, or Visa.
Merchant ID—
Order Number—
Shipping AddressThis field is required if SEND_SHIPPING or NEED_BILLING_AND_SEND_SHIPPING is set for AddressVisibilityOption.
Address Visibility Option—
Card Holder Name—
Recurring Option—
private PaymentInfo makeTransactionDetails() {// Supported card brandsArrayList<CardInfo.Brand> brandList = new ArrayList<CardInfo.Brand>();if (visaBrand.isChecked())brandList.add(CardInfo.Brand.VISA);if (mcBrand.isChecked())brandList.add(CardInfo.Brand.Mastercard);if (amexBrand.isChecked())brandList.add(CardInfo.Brand.AMERICANEXPRESS);// Basic payment informationPaymentInfo paymentReq = new PaymentInfo.Builder().setMerchantId("merchantID").setMerchantName("Test").setAmount(getAmount()).setShippingAddress(getShippingAddressInfo()).setOrderNumber(orderNoView.getText().toString()).setPaymentProtocol(PaymentProtocol.PROTOCOL_3DS).setAddressInPaymentSheet(AddressInPaymentSheet.DO_NOT_SHOW).setAllowedCardBrands(brandList) .setRecurringEnabled(isRecurring).setCardHolderNameEnabled(isCardHolderNameRequired).build();return paymentReq;}// Add shipping address detailsprivate Address getShippingAddressInfo() {Address address = new Address.Builder().setAddressee(name.getText().toString()).setAddressLine1(addLine1.getText().toString()).setAddressLine2(addline2.getText().toString()).setCity(city.getText().toString()).setState(state.getText().toString()).setCountryCode(country.getSelectedItem().toString()).setPostalCode(zip.getText().toString()).build(); return address;}// Add amount details private Amount getAmount() {Amount amount = new Amount.Builder().setCurrencyCode(currencyType.getSelectedItem().toString()).setItemTotalPrice(productPrice.getText().toString()).setShippingPrice(shippingPrice.getText().toString()).setTax(taxPrice.getText().toString()).setTotalPrice(totalAmount.getText().toString()).build();return amount;}

Request Payment from Samsung Pay

  1. Use the startSamsungPay() API method in the PaymentManager class. The PaymentManager class includes these API methods:

    • startSamsungPay()—requests to initiate payment with Samsung Pay.
    • updateAmount()—updates the transaction amount if shipping address or card information is updated by Samsung Pay.
    • updateAmountFailed()—returns an error code when the new amount cannot be updated because of a wrong address.
  2. Request the startSamsungPay() API method and include this data:

    • PaymentInfo—contains payment information.
    • PID—the product ID created in the Samsung Pay Partner Portal.
    • StatusListener—the result of the payment request is delivered to StatusListener. This listener should be registered before you call the startSamsungPay() API method.

    When you request the startSamsungPay() API method, the Samsung Pay online payment sheet is displayed on your application. The customer selects a registered card for payment and can also update the billing and shipping address.

    The payment reply is delivered as one of these events to StatusListener:

    • onSuccess()—this event is requested when Samsung Pay confirms the payment. It includes encryptedPaymentCredential in JSON format:

      • method: Payment protocol: 3-D Secure.
      • merchant_ref: Merchant reference code.
      • billing_address.street: Number, street name.
      • billing_address.state_province: Two-letter state code.
      • billing_address.zip_postal_code: Five-character zip code.
      • billing_address.city: City name.
      • billing_address.county: Two-letter country code.
      • 3ds.type: S for Samsung Pay. Encrypted.
      • 3ds.version: Current version 100. Encrypted.
      • 3ds.data: Base64-encoded payment data. Encrypted.

      Refer to the Samsung Pay developer website for information on how to decrypt the encrypted payment credential.

    • onFailure()—this event is requested when the transaction fails. It returns an error code and error message.

public void onPayButtonClicked(View v) {    // Call startSamsungPay() method of PaymentManager class.    // To create a transaction request, see makeTransactionDetails() in the    // "Transaction Request Structure" example above.    try {        mPaymentManager.startSamsungPay(makeTransactionDetails(), "YOUR_PRODUCT_ID",            mStatusListener);    } catch (NullPointerException e) {        e.printStackTrace();    }}private PaymentManager.StatusListener mStatusListener = newPaymentManager.StatusListener() {    @Override    public void onFailure(int errCode, String msg) {        Log.d(TAG, "onFailed: " + msg);    }    @Override    public void onSuccess(PaymentInfo arg0, String result) {        Log.d(TAG, "onSuccess");    }};

Next Steps

After completing the Samsung Pay setup, proceed to:

Last published: September 29, 2026