SDK Programming Guide
  • 3.3.11 Opening Favorite Cards from a partner app
  • Partner apps: Issuer (KR-only feature)

  • The startSimplePay() API method of the PaymentManager class is used to request payment with Favorite Cards. With this method, the issuer app launches the Samsung Pay payment screen with a specific card or the list of registered cards already in Samsung Pay for user selection pursuant to making an in-store payment. Currently this API is available on KR device only.

    The result is delivered to StatusListener, which provides the following events:

    • onSuccess() - called when the request succeeds; provides the status of the request and extra bundle data related to the request.
    • onFail() - called when the request fails; returns the error code and extra bundle data related to the request.
  • The following example demonstrates the use of the startSimplePay() API method.
  • // Issuer can get cardID from getAllCards() API result.
    String cardId = "cardID_test";  
    Bundle metaData = new Bundle(); 
    metaData.putString(PaymentManager.EXTRA_ISSUER_NAME, "issuer name");  
    		PaymentManager.TRANSACTION_TYPE_MST | PaymentManager.TRANSACTION_TYPE_NFC);
    // Set the selected cardId and metaData for in-store(offline) payment
    CardInfo cardInfo = new  CardInfo.Builder().setCardId(cardId).setCardMetaData(metaData).build();
    paymentManager.startSimplePay(cardInfo, new StatusListener() { 
    		public void onSuccess(int status, Bundle data) { 
    				// called when the Favorite Cards screen is shown to user with specified card
    		public void onFail(int error, Bundle data) { 
    				// called if Samsung Pay is not able to show Favorite Cards on the screen