Utilize the Add to Samsung Wallet service for digital cards


Objective

Learn how to use the Add to Samsung Wallet service so that users can store digital contents, such as boarding passes, tickets, and coupons, to their Samsung Wallet app.

Partnership Request

To create, manage, and monitor performance of wallet cards with the Samsung Wallet Partners site, you must become an official Samsung partner. Once done, you can fully utilize this Code Lab. You can learn more by visiting Samsung Wallet Partner Onboarding process, here in Samsung Developers.

Overview

Samsung Wallet is an application that securely stores essential items such as boarding passes, tickets, and coupons, making them easily accessible from anywhere. With this app, users can access various partner wallet cards in one place, simply by swiping up from the bottom of the screen.

The Add to Samsung Wallet service provides interfaces for users to conveniently add digital content to Samsung Wallet. Here are examples of the supported wallet cards:

  • Boarding Pass

    Journey information such as flights, trains, and buses can be provided as notifications, allowing easy retrieval when checking in. By configuring server synchronization, updates to journey information such as gate changes, schedule changes, or cancellations can be received by the users.


  • Ticket

    Notifications about events and additional information, including benefits, can be provided. Based on real-time utilization of performances, sports games, movies, and admission tickets, status updates related to expiration and availability can be provided.


  • Gift Card

    Gift Card, also referred to as a Prepaid Card, provides real-time balance and transaction history.


  • Loyalty

    Loyalty cards function as membership credentials, managing membership information. Through these cards, loyalty points can be administered and redeemed.


  • ID

    ID cards can fulfill identification verification purposes, such as identity cards, employee cards, and licenses. Physical documents can be represented through wallet cards, and near field communication (NFC)-based authentication can be provided.


  • Reservation

    Reservation cards can contain diverse online booking details, including rental cars, restaurants, and accommodations. Ongoing reservation information can be managed as a journey.


  • Pay As You Go

    Pay As You Go cards allow users to register services that can be charged and utilized according to their preference for convenient use.


  • Generic Card

    Generic cards enable users to create customized cards by selecting preferred card template layouts and designing elements.

The image below shows the process of managing wallet cards.

For more information, refer to Manage Wallet Cards.

Set up your environment

You will need the following:

  • Latest version of Samsung Wallet app from Galaxy Store

  • Samsung Galaxy device that supports Samsung Wallet

  • Access to Samsung Wallet Partners site

  • Internet browser, such as Chrome

  • OpenSSL

  • IntelliJ IDEA or any Java IDE (Optional)

Start the onboarding process

Partners can manage wallet cards and monitor performance with the Samsung Wallet Partners site. To join as partner:

  1. Generate a private key and certificate signing request (CSR) using the OpenSSL command. You can follow the instructions in Security Factors.
  1. Proceed to register in the Samsung Wallet Partners site using your Samsung Account.  Follow the Samsung Wallet Partner Onboarding process.

  2. Upload the generated CSR for data encryption in Encryption Setting Management section.

  3. After registration, you will receive a welcome email.

Create a wallet card

Follow the steps below to create a wallet card in Samsung Wallet Partners site:

  1. Click the Wallet Cards menu and choose Create Wallet Card.

  2. Fill out the General information form with the details of the wallet card.

  1. In Wallet Card Template, choose a card type and sub type.

  2. Select the design type and click Done. You can choose from various types of wallet card templates optimized for partners.

  1. After inputting all necessary details, click Save to set the wallet card status to Draft.

Launch the wallet card

You can launch and request activation of the card by clicking the Launch button.

Upon agreeing to proceed, the Launch button text changes to Launched and the card status becomes Verifying.

Add the card to Samsung Wallet using the Test Tool

  1. Open a web browser on your computer or Galaxy mobile device, and go to the following link:

    partner.walletsvc.samsung.com/addToWalletTest


  2. Go to Add To Wallet tab and click Choose Key File to upload your private key.

  3. In the Select Card dropdown menu, select the created card to display the card details and populate sample data.

  4. Navigate to the Form tab and modify the card data as desired.

  1. Scroll down to the bottom of the page and click the Add to Samsung Wallet button.

  2. Click Done when a preview of the card shows on your mobile screen with a message indicating that the card has been added to your wallet.

  3. Once the card is added to your Samsung Wallet app, you can check its details by clicking on it.

Update the status of the added card

If a server API info (Partner Get card data and Partner Send card state) is registered in the wallet card, real-time updates of the user's registered cards can be provided.

Modify and update the card's status by utilizing the Push Notification feature of the Test Tool.

  1. Navigate to the Push Notification tab.

  2. Ensure that the correct private key is uploaded and the same card as in the Add to Wallet tab is selected.

  3. Copy the Ref ID value from the Add to Wallet tab and paste it into Ref ID field in the Push Notification tab.

  4. In the Status field, enter one of the following card states: EXPIRED, REDEEMED, HELD, SUSPENDED, or DELETED. The current state is set to ACTIVE.

  5. Then, click the Request Push Notification button.

  6. Check the card in the Samsung Wallet app to confirm the change.

Tokenize card data and implement the Add To Samsung Wallet button to your service (optional)

The Samsung Wallet Partners site provides generated Add to Samsung Wallet scripts for each wallet card you create. You can simply copy and paste these scripts into your partner apps (Web and Android) or include them in emails/MMS messages.

To implement the Add to Wallet button, follow these steps:

  1. Go to the [Add to Wallet Script Guide] section of the card you created. Click Show to view the available scripts and then copy the appropriate script for your service.

  2. Develop a program that can generate tokenized card data (CData). The CData represents the actual content of the wallet card and comes in different formats depending on the card type. You can check the CData Generation Sample Code for reference.

  3. The CData is derived from the card data, which is in JSON format. For testing purposes, you can utilize the generated JSON from the Test Tool.

  4. Follow the Implementing ATW button guide to determine where to incorporate the generated CData and gain further insights into this process.

You're done!

Congratulations! You have successfully achieved the goal of this Code Lab topic.
Now, you can utilize the Add to Samsung Wallet service by yourself!

To learn more about Samsung Wallet, visit:
developer.samsung.com/wallet