For Samsung Wallet integration, partners will need to insert an "Verify with Samsung Wallet" script into their systems. To implement an "Verify with Samsung Wallet" button, partner should follow the procedure below:
Create the tokenized card data (Cdata). Card data is the actual content of the wallet card and it has several formats based on the card type. Refer to the CData Generation Sample Code for details.
Important
The card data token expires in 30 seconds after creation, so it needs to be created right after the user clicks the "Verify with Samsung Wallet” button.
For "Verify with Samsung Wallet" integration, you may also need some base data. You can find that and other necessary information on Partners Portal
Implementing VWW button on the Web
This section explains how to implement an "Verify with Samsung Wallet" button using JavaScript in a web view.
Web Button Reference with Importing API JavaScript
If partner implement the "Verify with Samsung Wallet" button using this script, the button is shown only on the devices that support Samsung Wallet.
To automatically parse <samsung:wallet> HTML tags when the page is loaded, partners should include the following standard JavaScript:
Partners can use these tags or JavaScript functions for the web button if they are rendering HTML and have proper partner permissions. Partners can also use the script by referring to the various attributes.
samsung:wallet HTML Tag
The ‘samsung:wallet’ namespace tag defines the placement and various attributes of the "Verify with Samsung Wallet" web button for Samsung Wallet.
Flag to display the "Verify with Samsung Wallet" image button in one-line format. Default: true (one-line).
locale
String
N
Locale of the "Verify with Samsung Wallet" image button.
rdclickurl
String
Y
URL for logging a button click event. * Value granted from the Partners Portal.
rdimpressionurl
String
Y
URL for logging a button impression event. * Value granted from the Partners Portal.
showforced
String
N
Flag to force the "Verify with Samsung Wallet" button to be displayed. Default: false.
mediatheme
String
N
Load the button’s resources from the media theme policy. There are 4 themes: default, inversion, lightonly, and darkonly. Default: default. *default: Load the button’s theme according to the prefers-color-scheme policy. *inversion: Load the inverse of the default button’s theme. *lightonly: Load the light theme of the default button. *darkonly: Load the dark theme of the default button.
style
String(CSSStyleDeclaration)
N
Load the button with custom style
onshowbutton
Function
N
Callback handler function for the button’s on-show event
onclickbutton
Function
N
Callback handler function for the button’s on-click event. If you register the handler function, you must return a callback or promise value. * Refer to Usage of onClickButton Handler for more details.
samsungWallet.addButton Function
This function allows partners to explicitly render the Samsung Wallet API for the "Verify with Samsung Wallet" web button.
Flag to display the "Verify with Samsung Wallet" image button in one-line format. Default: true (one-line).
locale
String
N
Locale of the "Verify with Samsung Wallet" image button.
RDClickUrl
String
Y
URL for logging a button click event. * Value granted from the Partners Portal.
RDimpressionurl
String
Y
URL for logging a button impression event. * Value granted from the Partners Portal.
showForced
String
N
Flag to force the "Verify with Samsung Wallet" button to be displayed. Default: false.
mediaTheme
String
N
Load the button’s resources from the media theme policy. There are 4 themes: default, inversion, lightonly, and darkonly. Default: default. *default: Load the button’s theme according to the prefers-color-scheme policy. *inversion: Load the inverse of the default button’s theme. *lightonly: Load the light theme of the default button. *darkonly: Load the dark theme of the default button.
style
Object(CSSStyleDeclaration)
N
Load the button with custom style
onShowButton
Function
N
Callback handler function for the button’s on-show event
onClickButton
Function
N
Callback handler function for the button’s on-click event. If you register the handler function, you must return a callback or promise value. * Refer to Usage of onClickButton Handler for more details.
Usage of onClickButton Handler
Partners can choose whether to proceed with the next "Verify with Samsung Wallet" step using a promise or a callback function, if they register a callback handler in onClickButton.
We recommend that partner add the process of generating JWT cdata (add cdata to options.cdata) to this handler, because of the cdata expiration time.
The function parameters are defined as follows.
Attribute
Type
Required
Description
options
Button attributes
N
Attributes of the current button
callback
Function
N
Callback function to pass the flag to proceed. Default: false.
(Promise resolve)
Function
N
Promise-resolved value to pass the flag to proceed Default: false.
Callback to web button process from callback attributes (for ES5)
By executing a callback function with a flag, you can proceed to the next 'Verify with Samsung Wallet' process.
onClickButton: function (options, callback) {
// TODO partner's process
callback(flag)
}
Callback to web button process from returning Promise (for ES6)
By returning a promise with a resolving flag, you can proceed to the next ‘Verify with Samsung Wallet’ process.
onClickButton: async (options) => {
return new Promise(async (resolve, reject) => {
// TODO partner's process (await)
resolve(flag)
})
}
Implementing VWW button on the App
This section explains how to implement an "Verifying with Samsung Wallet" button in the partner’s app.
Please download below sample code and refer it
Data Transmit Link
The most common and straightforward method is the Data Transmit Link approach, which securely includes tokenized data in the ATW link. The ATW link format for this method is as follows.
The name Data Transmit Link has been changed from Typical flow.
Wallet card identifier issued from Partner portal when the partner manager signs up for partner services and registers the wallet card they want to service.
Hash path parameters
#Clip
String
Required
Parameters for the Hash link * The first letter is capitalized
Query parameters
cdata
String
Required
Actual payload data in basic JSON format to communicate between partners and Samsung Wallet. This must be secured in JWT(JSON Web Token) format. * Refer to Security for more details.
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.