Partner apps: Issuer
An issuer app can call the addCard() API method of CardManager to add a card to Samsung Pay by providing required card details, making it convenient for users to add their debit/credit cards to Samsung Pay right from the issuer app without additional steps, like manually switching between apps.
For most issuers, getWalletInfo() can be used for requesting current wallet information to determine if the issuer’s card is eligible to be added to Samsung Pay. When the Add to Samsung Pay button is pressed, the issuer app can optionally call the getWalletInfo() API method prior to calling the addCard() API.
String cardType = Card.CARD_TYPE_CREDIT; String tokenizationProvider = AddCardInfo.PROVIDER_ABCD; // Samsung Pay does not provide detailed payload information. // Generate provisioning payload in accordance with your card network specifications. String testPayload = "ThisIsTestPayloadCardInfo1234567890"; Bundle cardDetail = new Bundle(); cardDetail.putString(AddCardInfo.EXTRA_PROVISION_PAYLOAD, testPayload); AddCardInfo addCardInfo = new AddCardInfo(cardType, tokenizationProvider, cardDetail); cardManager.addCard(addCardInfo, new AddCardListener() { @Override public void onSuccess(int status, Card card) { Log.d(TAG, "onSuccess callback is called"); } @Override public void onFail(int error, Bundle errorData ) { Log.d(TAG, "onFail callback is called, code: " + error); } @Override public void onProgress(int currentCount, int totalCount, Bundle bundleData) { Log.d(TAG,"onProgress callback is called : " + currentCount + " / " + totalCount); } });