Samsung Pay Integration in Mobile App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Samsung Pay Integration in Mobile App
Complex
~2-3 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1054
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Samsung Pay Payment System Integration in Mobile Application

Samsung Pay has its own SDK, separate from Google Pay, and works exclusively on Samsung devices with Samsung Wallet support (formerly Samsung Pay). The main distinction is support for both NFC and MST (Magnetic Secure Transmission), enabling payments on terminals without contactless readers. Integration requires registration in Samsung Pay Developers Portal and obtaining a Service ID.

Registration and Service ID Acquisition

Before writing code:

  1. Register at pay.samsung.com/developers
  2. Create a Service Profile — specify service type (In-App Payment), country, and name
  3. Obtain Service ID for sandbox and production environments
  4. Upload CSR to generate a certificate (similar to Apple Pay)

Samsung Pay API supports two tokenization models: via Payment Gateway (your acquirer supports Samsung Pay) or direct integration with Samsung Pay Server.

SDK Integration

// build.gradle (app)
dependencies {
    implementation files('libs/SamsungPaySDK-2.x.x.jar')
    // or via Maven if available
}

Permissions in AndroidManifest:

<uses-permission android:name="com.samsung.android.spay.permission.ACCESS_SERVICE" />

Samsung Pay Availability Check

import com.samsung.android.sdk.samsungpay.v2.SamsungPay
import com.samsung.android.sdk.samsungpay.v2.SpaySdk
import com.samsung.android.sdk.samsungpay.v2.StatusListener

val bundle = Bundle().apply {
    putString(SamsungPay.PARTNER_SERVICE_TYPE, SpaySdk.ServiceType.INAPP_PAYMENT.toString())
}

val samsungPay = SamsungPay(context, bundle)

samsungPay.getSamsungPayStatus(object : StatusListener {
    override fun onSuccess(status: Int, bundle: Bundle) {
        when (status) {
            SpaySdk.SPAY_READY -> showSamsungPayButton()
            SpaySdk.SPAY_NOT_READY -> {
                // Samsung Pay installed, but not configured (no cards)
                samsungPay.goToUpdatePage() // offer to add card
            }
            SpaySdk.SPAY_NOT_SUPPORTED -> hideSamsungPayButton()
            SpaySdk.SPAY_NOT_ALLOWED_TEMPORALLY -> {
                // Temporarily blocked (MDM, device protection)
                hideSamsungPayButton()
            }
        }
    }

    override fun onFail(errorCode: Int, bundle: Bundle) {
        hideSamsungPayButton()
    }
})

Creating and Launching Payment Request

import com.samsung.android.sdk.samsungpay.v2.payment.CustomSheetPaymentInfo
import com.samsung.android.sdk.samsungpay.v2.payment.PaymentManager
import com.samsung.android.sdk.samsungpay.v2.payment.sheet.*

val paymentInfo = CustomSheetPaymentInfo.Builder()
    .setMerchantId("YOUR_MERCHANT_ID")
    .setMerchantName("Your Company")
    .setOrderNumber("ORDER-1234")
    .setAddressInPaymentSheet(CustomSheetPaymentInfo.AddressInPaymentSheet.DO_NOT_SHOW)
    .setAllowedCardBrands(listOf(
        SpaySdk.Brand.VISA,
        SpaySdk.Brand.MASTERCARD,
        SpaySdk.Brand.MIR
    ))
    .setCardHolderNameEnabled(false)
    .setRecurringEnabled(false)
    .build()

val customSheet = CustomSheet()
val amountControl = AmountBoxControl("amountId", "RUB")
amountControl.addItem("subtotal", "Товары", 1250.0, "")
amountControl.addItem("shipping", "Доставка", 250.0, "")
amountControl.setAmountTotal(1500.0, AmountConstants.FORMAT_TOTAL_PRICE_ONLY)
customSheet.addControl(amountControl)

val paymentManager = PaymentManager(context, partnerInfo)

paymentManager.startInAppPayWithCustomSheet(
    paymentInfo,
    customSheet,
    object : PaymentManager.CustomSheetTransactionInfoListener {
        override fun onCardInfoUpdated(cardInfo: CardInfo, customSheet: CustomSheet) {
            // Called when card changes — update total amount if needed
            paymentManager.updateSheet(customSheet)
        }

        override fun onSuccess(response: CustomSheetPaymentInfo, paymentCredential: String, extraPaymentData: Bundle) {
            // paymentCredential — encrypted token for backend transmission
            sendCredentialToBackend(paymentCredential)
        }

        override fun onFailure(errorCode: Int, bundle: Bundle) {
            handleError(errorCode)
        }
    }
)

Common Integration Pitfalls

SPAY_NOT_SUPPORTED on Samsung device. Occurs when: Samsung Pay not installed (on some markets — Samsung Wallet), Android < 5.0, or device from older lineup without MST/NFC support.

ERROR_NOT_SUPPORTED_ENVIRONMENT error. Sandbox Service ID used with production environment or vice versa. Samsung enforces strict separation — sandbox application does not work with production Service ID.

onCardInfoUpdated called but updateSheet not invoked. Samsung Pay waits for updateSheet call after each onCardInfoUpdated — otherwise interface freezes. This is not a bug, it is a mandatory pattern.

Testing

Samsung Pay requires a physical Samsung device. Emulator is not supported. For sandbox testing, add a test card through Samsung Pay Developer section in Samsung Pay settings.

Work Scope

  • Service Profile registration in Samsung Pay Developers Portal
  • Samsung Pay SDK integration in Android project
  • Status checking and button display implementation
  • CustomSheet configuration with order line items
  • Payment credential processing and provider transmission
  • Testing on physical Samsung device

Timeline

2–3 days. Cost calculated individually.