Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Samsung Wallet
docwallet card type wallet card type wallet card subtype idcard employees, nationals, students, drivers, guests, others employees nationals students drivers wallet card data fields attributes type value description attributes {fields} titlestring 32 required main title of cardse g , commercial access, employee badge holdernamestring 64 required name of card holders secondholdernamestring 64 optional second name of card holders organizationstring 64 optional organization of card holders belongingi e , name of department, division, affiliation, association or team, name of college or school positionstring 64 optional position of card holderse g , engineer, 5th grade identifierstring 64 required unique id valuei e , unique card number assigned to the card holdere g , s 123 456 789 012 x idnumberstring 64 optional representative value for an idi e , id number, document number, card/roll number assigned by the institution or collegee g , b19mba115 idstatusstring 64 optional card holder's statusex full time student, graduate, exchange, post-graduate, under-graduate addressstring 256 optional address of card holders placeoflocationstring 64 optional place of location associated with the cardholder idphotostring 128k optional holder’s photo image data encoded base64the file size should not be greater than 128 kb idphoto formatstring 32 optional image file formate g , jpeg, png* unsupported image formats may exist idphoto statusstring 16 optional status of the dataallowed value unchanged document deprecatedstring 1024k optional first document of identity document format deprecatedstring 32 optional document format- allowed value pdf, jpeg, png document status deprecatedstring 16 optional status of the dataallowed value unchanged document{i}string 1024k optional document of identitythis can be images of id cards or cardholder's photos on an enlarged screen image data encoded base64 in case the card has multiple documents, they can have an index i 1 ~ 5the file size should not be greater than 128 kb document{i} formatstring 32 optional document format- allowed value pdf, jpeg, png document{i} statusstring 16 optional status of the dataallowed value unchanged issuedatelong 13 required issue date epoch timestamp in milliseconds birthdatestring 16 optional date of birth genderstring 16 optional gender of card holders classificationstring 16 optional classified identity type expirylong 13 optional expiry date in timestamp format issued data is cleaned up after it expires epoch timestamp in milliseconds contactsstring 32 optional personal contact information such as phone number logoimagestring 256 optional logo image url to be displayed in card item the file size should not exceed 256 kb logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted logotext string 16 optional text as an alternative to logoimage providername string 32 required content provider namei e , partnering institute issuername string 32 optional place of issue or issuing authority name extrainfo string 512 optional additional informationi e , bloodgroup, guardianname, govrefid* see additional information format noticedesc string 5000 optional text of the notice * long content is allowed * see additional information format csinfo string 512 required providers’ customer service information using data in json format converted to escape string * allowed items call, email, or website* see the example below privacymodeyn string 1 optional whether or not to require user authentication when using the card either ‘y’ or ‘n’* default ‘n’ applinklogostring 256 optional app link image url the file size should not exceed 256 kb applinknamestring 32 optional app link name applinkdatastring 256 optional information about the partner app link locationsstring 1024 optional list of locations where the card can be used* see location format coverimagestring 256 optional card cover image urlthe file size should not exceed 512 kb the recommended size for image resources is 888 x 555 px bgimagestring 256 optional card background image urlthe file size should not exceed 512 kb the recommended size for image resources is 888 x 555 px bgcolorstring 8 optional color of the card art support hex color code e g , #015aaa fontcolorstring 8 optional color of the font on the card art allowed value black, white blinkcolorstring 8 optional color of the blinking effect in the indicator area support hex color code e g , #015aaa preventcaptureynstring 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n' * default 'n' barcode valuestring 4096 optional actual data that is delivered when the barcode/qr code is scanned barcode serialtypestring 32 optional presentation type e g , serialnumber, barcode, * see barcode format barcode ptformatstring 32 optional presentation format e g , barcode, qrcode, serial, * see barcode format barcode ptsubformatstring 32 optional presentation sub-format e g , code_128, qr_code, * see barcode format barcode errorcorrectionlevelstring 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes - code options l/m/q/h * default l barcode intervalstring 4 optional update interval if support for dynamic updates epoch timestamp in milliseconds authenticationstring 64 optional authentication data which meets choose options * see authentication for details provision datastring 512 optional elements to complete provisioning* see provisioning for details provision intervalstring 16 optional update interval if support for dynamic updatesepoch timestamp in milliseconds example { "card" { "type" "idcard", "subtype" "employees", "data" [ { "refid" "identitycard-bpo1r3e5-3313-0991-z404-sq12994414u8", "createdat" 1658385817000, "updatedat" 1658385817000, "language" "en", "attributes" { "title" "employee id card", "holdername" "kim samsung", "secondholdername" " samsung ", "organization" "digital wallet, mx", "position" "professional", "identifier" "2306070003", "idphoto" "{base64 encoded image data}", "idphoto format" "jpeg", "document1" "{base64 encoded pdf data}", "document1 format" "pdf", "document2" "{base64 encoded pdf data}", "document2 format" "pdf", "issuedate" "1658385817000", "expiry" "1765855665000", "logoimage" "https // /logo png", "providername" "samsung electronics", "extrainfo" "{\"count\" 1,\"info\" [{\"title\" \"shortcode\",\"content\" [\"404457\"]}]}", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"notice1\",\"content\" [\"description1\",\"description2\"]},{\"title\" \"notice2\",\"content\" [\"description1\",\"description2\"]}]}", "csinfo" "{\"call\" \"555 123-4567\", \"email\" \"cs@email com\", \"website\" \"https //homepage com/cs\"}", "applinkname" "samsung electronics", "applinklogo" "https // /applinklogo png", "applinkdata" "https //www applinkorweblink com", "coverimage" "https // /card/cover png", "bgimage" "https // /card/background png", "fontcolor" "dark", "barcode value" "5728306720836720763017601", "barcode serialtype" "qrcode", "barcode ptformat" "qrcode", "barcode ptsubformat" "qr_code", "barcode interval" "300000", "authentication" "samsung@samsung com", "provision data" "{\"appkey\" \"abcdefaei;fadaf=\",\"telno\" \"01012345678\",\"provider\" \"sec\",\"id\" \"0000000000000000\",\"authkey\" \"a3b7fgj0ea\"}" }, "localization" [ { "language" "ko", "attributes" { "title" "사원증", "holdername" "김삼성", "secondholdername" "kim samsung", "providername" "삼성전자" } } ] } ] } }
tutorials mobile
blogwallet cards and then create wallet card. for more details about creating a card, check the manage wallet cards documentation. select generic card from the available card templates. modify the card information. when you have finished editing card information, launch the card to complete card setup. for more information on how to launch the card, see launch wallet cards. template editor use the template editor to modify the card template. from the "cardart" view, you can modify the card color, set a background image or change the logo image properties. from the "enlarge" view, you can modify the {{text1}} and {{text2}} labels. however, only the label itself can be changed in the template editor. to set the label value, you need to update the json file. from the "detail" view, you can modify the "textgroup" and "applink" properties. modify the text label according to your needs. it is also possible to add new text fields, with a maximum of 12 text fields allowed. after every modification, click save. finally, apply all changes by clicking apply. if you want to preview your changes, just click preview. add to samsung wallet now that the card has been created in the site, it is ready to be distributed to fulfill your business needs. implement the "add to samsung wallet" functionality to the platform where you are planning to distribute the cards. when users click "add to samsung wallet," the card is added to the wallet application on the user’s galaxy device. this functionality can be added through the application/mobile web, mms, or email. additionally, you can use a qr code on a computer web browser and kiosk. samsung provides a codelab guide for developers so that they can easily understand the implementation. for additional information on the codelab guide, read utilize the add to samsung wallet service for digital cards. further details can also be found in the implementing atw button documentation. card specifications to complete the "add to samsung wallet" button implementation, you must generate the card data token and create a final url. for more information, see add to samsung wallet. let’s start by reviewing the generic card specifications to generate the card data token. the generic card follows the specifications below. for more information on them, see the generic card section. name description title the main title of the generic card. in the sample card, the title is "card title." in the image below, the title is "insurance identification card." subtitle the subtitle of the generic card. in the sample card, it is "card subtitle". providername use this field to set the card provider name. for more information, check the card json example below. however, the provider name depends on your card type and should be modified accordingly. eventid enter an id as an event identifier. in case your card is prepaid, for example a gift card, or if you have vouchers to events, such as concerts, it is possible to define an event id. for instance: "event-001". groupingid enter an identifier to group related cards. startdate enter the starting date and the epoch timestamp in milliseconds. startdate.relativenotitime enter the amount of time within which you want to provide a notification to the user. the notification time is the relative time from the startdate. the value can be up to 2880 milliseconds. enddate enter the end date and the epoch timestamp in milliseconds. enddate.relativenotitime enter the amount of time within which you want to provide a notification to the user. the notification time is the relative time from the enddate. the value can be up to 2880 milliseconds. logoimage set the logo image url. the file size must not exceed 256 kb. also this image can be set from the template editor. logoimage.darkurl set the logo image url for the dark mode. the file size must not exceed 256 kb. logoimage.lighturl set the logo image url for the light mode. the file size must not exceed 256 kb. bgimage set the background image url. the file size must not exceed 512 kb. text{i} set the label-text value that should be displayed for each field containing the details of your card. the label is defined in the template editor, shown in the image below. to set the value of the label, update the json file. image{i} enter the image url, such as: "https://www.samsung.com/images/image1.png". this url is just an example, you must update it according to your needs. this field only works in generic card type3. we have used a type1 card in the example. so this field in the example json has no effect on the card. you can find all three card type sample uis here. image{i}.lighturl enter the image url in light mode, such as: "https://www.samsung.com/images/light.png". this url is just an example, you must update it according to your needs. image{i}.darkurl enter the image url in dark mode, such as: "https://www.samsung.com/images/dark.png". this url is just an example, you must update it according to your needs. serial{i} set the serial for barcode or qr code. serial{i}.serialtype serial presentation type. for more information on the presentation types (serialtype), see references. serial{i}.ptformat set the presentation format. for more details on the presentation formats (ptformat), see references. serial{i}.ptsubformat set the presentation subformat here. for more details on the barcode formats (ptsubformat), see references. serial{i}.errorcorrectionlevel set the error correction levels in this field. the amount of redundancy or error correction data included in the code varies. qr codes offer four levels of error correction: l, m, q, and h. the qr field looks like the following in your card: privacymodeyn set the user authentication if required. set the value to "y" or "n" bgcolor set the card art color. fontcolor set the card art font color. nonetworksupportyn set the value to "y" to open the wallet card when under the "no network" status. otherwise, set the value to "n" noticedesc set the the notice description here. see the image below of how it is added to card. applinklogo add the application link logo url in this field. applinkname add the application link name in this field. applinkdata add the application link url in this field. locations list of locations where the card will be used. this information can be used to provide location-based services. samsung wallet can use this information to show maps, names of places, and addresses. for more information on the locations field and json format, check references. card json example in previous sections, you have learned about the card specifications. next, let’s implement the generic card fields according to your needs. in this section, as the aim is to create an insurance card, you must use the fields accordingly. samsung provides a specifically formatted json structure. you need to configure the card data objects within the structure’s data array. for more details, see the generic card section. { "card": { "type": "generic", "subtype": "others", "data": [ { "createdat": 1709712961000, "updatedat": 1709712961000, "language": "en ", "refid": "933533e1-9284-461c-905f-bc177526a8d1", "attributes": { "title": "insurance identification card", "subtitle": "insurance card", "providername": "samsung insurance co.", "eventid": "1", "groupingid":"1", "startdate": 1731299205000, "startdate.relativenotitime": 500, "enddate": 1731320805000, "enddate.relativenotitime": 400, "logoimage": "https://us-cdn-gpp.stg.mcsvc.samsung.com/mcp25/resource/2023/12/20/55ea769f-d14d-4c47-94cc-50cade36cdd9.png", "logoimage.darkurl": "https://us-cdn-gpp.stg.mcsvc.samsung.com/mcp25/resource/2023/12/20/55ea769f-d14d-4c47-94cc-50cade36cdd9.png", "logoimage.lighturl": "https://us-cdn-gpp.stg.mcsvc.samsung.com/mcp25/resource/2023/12/20/55ea769f-d14d-4c47-94cc-50cade36cdd9.png", "bgimage": "", "text1": "1234567", "text2": "samsung insurance co.", "text3": "jaqueline m", "text4": "samsung motors 2014 galaxy5", "text5": "11sam23sung3t", "text6": "(031)000-1235", "image1": "https://us-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/3/5/b9445e3f-2ef5-4d81-9fca-b7a8a7cd599f.png", "image1.darkurl": "https://us-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/3/5/b9445e3f-2ef5-4d81-9fca-b7a8a7cd599f.png", "image1.lighturl": "https://us-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/3/5/b9445e3f-2ef5-4d81-9fca-b7a8a7cd599f.png", "serial1.value": ">1180mm2241b7c 0000000000000298060000000000 0 090870907 ", "serial1.serialtype": "qrcode", "serial1.ptformat": "qrcode", "serial1.ptsubformat": "qr_code", "serial1.errorcorrectionlevel": "m", "privacymodeyn": "y", "bgcolor": "#3396ff", "fontcolor": "#ffffff", "nonetworksupportyn": "n", "noticedesc": "{\"count\":2,\"info\":[{\"title\":\"notice1\",\"content\":[\"description1\",\"description2\"]},{\"title\":\"notice2\",\"content\":[\"description1\",\"description2\"]}]}", "applinklogo": "https://www.samsung.com/logo.png", "applinkdata": "https://www.samsung.com/", "applinkname": "samsung insurance co.", "locations": "[{\"lat\": 37.2573276, \"lng\": 127.0528215, \"address\": \"suwon\", \"name\": \"digital city\"}]" } } ] } } generic card testing with the "add to wallet" test tool now, you can test the generic card with the "add to wallet" test tool provided by samsung. just follow these steps: sign in to the add to wallet test tool. for more information, see the samsung wallet test tool. enter the private key in the "enter partner private key" field. in this tool, you find all cards that you have created from the samsung wallet partner site in the "select card" section. for more information, see the samsung wallet partner site. select the generic card that you have just created. now select json from the data field and modify the existing json data fields according to the card specification details. after modifying the json data fields, check if the json is valid. finally, if the private key is valid, the "add to samsung wallet" button becomes active at the bottom of the page. then, just click add to samsung wallet to finish adding the generic card. if you use the provided example json and add the card to the wallet, the card looks like the following: server integration in this step, server configuration is needed because the generated jwt token expires after 30 seconds. developers are advised to only generate this token after a user has clicked the "add to wallet" button. as you have already performed testing with the "add to wallet" test tool, you need to configure your server. for more information on the implementation of both the "add to samsung wallet" button and server-side logic, see implementing "add to wallet" in an android application. this article explains how you can distribute your card with your android application and how to generate the jwt token at runtime, after pressing the "add to samsung wallet" button. conclusion you have now learned the basics for how to set up a generic card and test it for your business needs. in case you have further questions, contact samsung developer support. related resources utilize the add to samsung wallet service for digital cards introduce loyalty cards to your application with samsung wallet implementing "add to wallet" in an android application seamlessly integrate "add to wallet" for samsung wallet
M. A. Hasan Molla
Develop Samsung Wallet
docwallet card type wallet card type wallet card subtype ticket performances, sports, movies, entrances, others performances movies sports entrances wallet card data fields attributes type value description attributes {fields} title string 32 required main title e g , mlb ticket category string 16 optional ticket category * this will be deprecated eventid string 32 optional if full cancelation of the event occurs, find and process all tickets with this id groupingidstring 32 optional identifier used to group related cards orderidstring 32 optional a unique identifier for an order mainimg string 256 required url for main ticket image the file size should not exceed 512 kb subtitle1 string 32 optional the auxiliary field which displays supporting information logoimagestring 256 required logo image url to be displayed in the card item the file size should not exceed 256 kb logoimage darkurlstring 256 required logo image url in dark mode the file size should not exceed 256 kb logoimage lighturlstring 256 required logo image url in light mode the file size should not exceed 256 kb wideimagestring 256 optional wide horizontal image url displayed on the card information screen the file size should not exceed 256 kb providername string 32 required ticket provider name providerviewlinkstring 512 optional link to additional information from the provider* see links format classificationstring 16 optional classification of tickets use onetime, regular, or annual * default onetime holdernamestring 64 optional name of card holders idphotostring 20k optional holder’s photo image data encoded base64 idphoto format string 32 optional image file formate g , jpeg, png * unsupported image formats may exist idphoto status string 16 optional status of the dataallowed value unchanged gradestring 32 optional ticket grade seatclassstring 32 optional seat class entrancestring 64 optional entrance gate seatnumber string 256 optional seat location seatlayoutimage string 256 optional url of the seat layout image the file size should not exceed 512 kb issuedatelong 13 required issue date epoch timestamp in milliseconds reservationnumberstring 32 required reservation number userstring 64 optional name of person who made the reservation certification string 16 optional ticket certification e g ,r, as a film rating reactivatableynstring 1 optional flag whether the card is able to activate an expired ticket temporarily either 'y' or 'n' * default 'n' preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n'* default 'n' nonetworksupportyn string 1 optional set whether to support to open the wallet card under 'no network' status either 'y' or 'n' * default 'n' startdate long 13 required start date displayed start date epoch timestamp in milliseconds startdate utcoffset string 8 optional utc offset of start date time at the event location enddate long 13 optional end date displayed end date epoch timestamp in milliseconds * if null, the card will expire in 10 hours from startdate enddate utcoffsetstring 8 optional utc offset of start date time at the event location person1 string 512 optional number of persons by category * see classification format locationsstring 1024 optional list of locations where the card can be used * see location format noticedesc string 5000 required text of the notice * long content is allowed * see additional information format groupinfo1 string 64 optional the first common information with the same groupingid groupinfo2 string 64 optional the second common information with the same groupingid *it is recommended to set groupinfo1 first groupinfo3 string 64 optional the third common information with the same 'groupingid' *it is recommended to set groupinfo1, groupinfo2 first csinfostring 512 optional providers’ customer service informationusing data in json format converted to escape string * allowed items call, email, website, facebook, youtube, or instagram* see the example below privacymodeynstring 1 optional whether or not to require user authentication when using the cardeither ‘y’ or ‘n’* default ‘n’ applinklogo string 256 required app link image url the file size should not exceed 256 kb applinknamestring 32 required app link name applinkdatastring 256 required information about the partner app link bgcolor string 8 optional color of the card art e g , #00ffff fontcolor string 8 optional color of the font on the card art acceptable values dark, light blinkcolorstring 8 optional color of the blinking effect in the indicator areae g , #00ffff barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned barcode serialtype string 32 optional presentation type e g , serialnumber, barcode * see barcode format barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial * see barcode format barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code * see barcode format barcode errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes * code options l/m/q/h barcode intervalstring 4 optional update interval if support for dynamic updatesepoch timestamp in milliseconds provision data string 512 optional elements to complete provisioning* see provisioning for details provision interval string 16 optional update interval if support for dynamic updates epoch timestamp in milliseconds relcoupon{i} title string 32 conditional coupon title * required if this ticket has a related couponi 1~3 relcoupon{i} subtitle string 32 optional coupon subtitlei 1~3 relcoupon{i} providername string 32 conditional coupon provider name * required if this ticket has a related coupon i 1~3 relcoupon{i} imagefilesrc string 256 optional coupon image url the file size should not exceed 256 kb i 1~3 relcoupon{i} noticedescription string 1024 optional text of the notice * long content is allowed * see additional information format i 1~3 relcoupon{i} notificationtime long 13 optional coupon exposure time epoch timestamp in milliseconds i 1~3 relcoupon{i} value string 4096 conditional actual data that is delivered when the barcode/qr code is scanned i 1~3 relcoupon{i} serialtype string 32 required presentation typee g , serialnumber, barcode, * see barcode format i 1~3 relcoupon{i} ptformatstring 32 conditional presentation formate g , barcode, qrcode, serial, * see barcode format i 1~3 relcoupon{i} ptsubformat string 32 conditional presentation sub-formate g , code_128, qr_code, * see barcode format i 1~3 relcoupon{i} errorcorrectionlevel string 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes - code options l/m/q/h i 1~3 example { "card" { "type" "ticket", "subtype" "entrances", "data" [ { "refid" "ent-ticket-0613001", "createdat" 1686657600000, "updatedat" 1686657600000, "language" "en", "attributes" { "title" "galaxy land entrance ticket", "subtitle1" "standard", "classification" "annual", "groupingid" "group-0613001", "orderid" "ent-0613001", "mainimg" "https // /main png", "logoimage" "https // /logo png", "providername" "galaxy entertainment", "logoimage darkurl" "https // /logo-dark png", "issuedate" 1686657600000, "reservationnumber" "glx-0613-001", "startdate" 1686657600000, "enddate" 1718280000000, "holdername" "kim eunha", "idphoto data" "base64-encoded{image-file-data}", "idphoto format" "png", "grade" "family", "person1" "{\"person\" [{\"category\" \"adult\", \"count\" 1 }]}", "locations" "[{\"lat\" 37 256518, \"lng\" 127 053516, \"address\" \"samsung-ro yeongtong-gu, suwon\", \"name\" \"galaxy land central park\"}]", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"notice 1\",\"content\" [\"description 1-1\",\"description 1-2\"]},{\"title\" \"notice 2\",\"content\" [\"description 2-1\"]}]}", "groupinfo1" "adult 1", "groupinfo2" "standard", "groupinfo3" "family", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\",\"instagram\" \"https //www instagram com/samsungwallet\",\"youtube\" \"https //www youtube com/@samsungwallet\",\"facebook\" \"https //www facebook com/samsungwallet\" }", "applinkname" "galaxy ticket", "applinklogo" "https // /applinklogo png", "applinkdata" "https //www applinkdata com", "bgcolor" "#e86d1f", "fontcolor" "light", "blinkcolor" "#e86d1f", "barcode value" "serial-0613-001", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "갤럭시 랜드 입장권", "holdername" "김은하", "person1" "{\"person\" [{\"category\" \"어른\", \"count\" 1 }]}", "locations" "[{\"lat\" 37 256518, \"lng\" 127 053516, \"address\" \"samsung-ro yeongtong-gu, suwon\", \"name\" \"갤럭시 랜드 센트럴 파크\"}]", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"공지사항 1\",\"content\" [\"설명 1-1\",\"설명 1-2\"]},{\"title\" \"공지사항 2\",\"content\" [\"설명 2-1\"]}]}", "groupinfo1" "어른 1" } } ] } ] } }
Develop Samsung Wallet
docwallet cards and has several formats based on card type please see generate_cdata sample code for detail importantcdata token should expire in 30 seconds after creation, so cdata token needs to be created right after users actually click “add to wallet” button to implement ‘add to wallet’ button, you may need some base data you can find the base data and other necessary information on partner portal’s wallet card page samsung wallet on the web this section explains how to implement an "add to wallet" button using javascript in a web view web button reference with importing api javascript if you implement the "add to 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, include the following standard javascript <script src="https //us-cdn-gpp mcsvc samsung com/lib/wallet-card js" type="text/javascript"></script> you can use these tags or javascript functions for the web button if you're rendering html and you have proper partner permissions you 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 "add to wallet" web button for samsung wallet <samsung wallet cardid="card_id" cdata="cdata" partnercode="partner_code" buttonid="button_id" rdclickurl="rd_click_url" rdimpressionurl="rd_impression_url" ></samsung wallet> button attributes attribute description cardid string required wallet card identifier * value granted from the partners portal cdata string required encrypted card object json * this field needs to be encrypted * see security partnercode string required partner code * value granted from the partners portal buttonid string required dom element id for the "add to wallet" web button for samsung wallet buttontype string optional “add to wallet” button type [“btnsw” / “btnatsw” / “qrcode”, default btnsw] * see image resources authtoken string optional token generated when “qrcode” is used * required only if the “buttontype” is set to “qrcode” model string optional device model to display button* by default, value from user-agent is used if no value from user-agent, the button is displayed * to display buttons only on devices supporting samsung wallet, explicitly include the model name * for example, you can retrieve the device model name e g , sm-s928f from the browser's user-agent inline string optional flag to display the "add to wallet" image button in one-line format default true one-line locale string optional locale of the "add to wallet" image button * see image resources rdclickurl string required url for logging a button click event * value granted from the partners portal rdimpressionurl string required url for logging a button impression event * value granted from the partners portal showforced string optional flag to force the "add to wallet" button to be displayed default false mediatheme string optional 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 optional load the button with custom style target string optional option to choose button’s target name * default “wallet” onshowbutton function optional callback handler function for the button’s on-show event onclickbutton function optional callback handler function for the button’s on-click event if you register the handler function, you must return a callback or promise value * see usage of onclickbutton handler samsungwallet addbutton function this function allows you to explicitly render the samsung wallet api for the "add to wallet" web button samsungwallet addbutton { cardid "card_id", cdata "cdata", partnercode "partner_code", targetid "target_id", buttonid "button_id", rdclickurl "rd_click_url", rdimpressionurl "rd_impression_url", } button attributes unlike the samsung wallet html tag, you must use camelcase in the button attributes in function case attributes description cardid string required wallet card identifier * value granted from the partners portal cdata string required encrypted card object json * this field needs to be encrypted * see security partnercode string required partner code * value granted from the partners portal targetid string required dom document object model element id to place the "add to wallet" web button for samsung wallet buttonid string required dom element id for the "add to wallet" web button for samsung wallet buttontype string optional “add to wallet” button type [“btnsw” / “btnatsw” / “qrcode”, default btnsw] * see image resources authtoken string optional token generated when “qrcode” is used * required only if the “buttontype” is set to “qrcode” model string optional device model to display button* by default, value from user-agent is used if no value from user-agent, the button is displayed * to display buttons only on devices supporting samsung wallet, explicitly include the model name * for example, you can retrieve the device model name e g , sm-s928f from the browser's user-agent inline string optional flag to display the "add to wallet" image button in one-line format default true one-line locale string optional locale of the "add to wallet" image button * see image resources rdclickurl string required url of logging a button click event * value granted from the partners portal rdimpressionurl string required url of logging a button impression event * value granted from the partners portal showforced string optional flag to force the "add to wallet" button to be displayed default false mediatheme string optional 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 optional load the button with a custom style target string optional option to choose button’s target name * default “wallet” onshowbutton function optional callback handler function for the button’s on-show event onclickbutton function optional callback handler function for the button’s on-click event if you register the handler function, you must return a callback or promise value * see usage of onclickbutton handler usage of onclickbutton handler you can choose whether to proceed with the next "add to wallet" step using a promise or a callback function, if you register a callback handler in onclickbutton we recommend that you 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 attributes description options button attributes optional attributes of the current button callback function optional callback function to pass the flag to proceed default false promise resolve function optional 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 'add to 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 ‘add to wallet’ process onclickbutton async options => { return new promise async resolve, reject => { // todo partner's process await resolve flag } } importantthe card data token expires in 30 seconds after creation, so it needs to be created right after the user clicks the “add to wallet” button samsung wallet on the app the following outline explains how to implement the "add to wallet" button on a native application get button graphic resources from a repository depending on your service environment for more information, see image resources check availability by calling the "check service available devices" apo, then determine whether to show up the "add to wallet" button on the user device a if "available" on response has "true" -> support b if has "false" -> not support implement a jwt web link on the button triggered action app button on android [sample code implementation] public class walletcodesample { protected final static string tag = "samsungwalletsample"; protected static final string host = "https //api-us3 mpay samsung com"; protected static final string path = "wallet/cmn/v2 0/device/available"; /** * sample entry point of the usage */ public static void main { executors newsinglethreadexecutor submit -> { final string modelname = build model; final string countrycode = null; // optional country code iso_3166-2 final string servicetype = "wallet"; // required, fixed for samsung wallet final string partnercode = null; // required try { walletcodesample sample = new walletcodesample ; boolean iswalletsupported = sample checkwalletsupported modelname, countrycode, servicetype, partnercode ; string msg = string format "query for model %s , countrycode %s , servicetype %s , partnercode %s / wallet supported? %s ", modelname, countrycode, servicetype, partnercode, iswalletsupported ; log d tag, msg ; } catch exception e { // failed to check due to some reasons log e tag, e getmessage , e ; } } ; } /** * please see the wallet api spec document > '6 6 check service available devices' for more details * * @return true if wallet supported, otherwise false * @throws exception throws exception when it's not possible to get status due to any reasons */ public boolean checkwalletsupported @nonnull string modelname, @nullable string countrycode, @nonnull string servicetype, @nonnull string partnercode throws exception { if modelname == null || modelname isempty { log e tag, "model name is required parameter" ; throw new exception "something went wrong failed to get device model name " ; } if servicetype == null || servicetype isempty { log e tag, "servicetype is required parameter" ; throw new exception "something went wrong failed to get device servicetype " ; } if partnercode == null || partnercode isempty { log e tag, "partnercode is required parameter" ; throw new exception "something went wrong failed to get device partnercode " ; } string urlstring = makeurl modelname, countrycode, servicetype ; log i tag, "urlstring " + urlstring ; try { url url = new url urlstring ; httpurlconnection connection = httpurlconnection url openconnection ; connection setrequestproperty "partnercode", partnercode ; connection setrequestmethod "get" ; int responsecode = connection getresponsecode ; log i tag, "responsecode " + responsecode ; bufferedreader bufferedreader; if responsecode == 200 { bufferedreader = new bufferedreader new inputstreamreader connection getinputstream ; } else { bufferedreader = new bufferedreader new inputstreamreader connection geterrorstream ; } stringbuilder sb = new stringbuilder ; string inputline; while inputline = bufferedreader readline != null { log i tag, inputline ; sb append inputline ; } connection disconnect ; bufferedreader close ; // parse result jsonobject jsonobject = new jsonobject sb tostring ; string resultcode = jsonobject getstring "resultcode" ; string resultmessage = jsonobject getstring "resultmessage" ; if "0" equals resultcode && "success" equals resultmessage { return jsonobject getboolean "available" ; } else { throw new exception "something went wrong, resultcode " + resultcode + " , resultmessage " + resultmessage + " " ; } } catch ioexception e { log e tag, e getmessage , e ; throw new exception "something went wrong ioexception , " + e getmessage ; } catch jsonexception e { log e tag, e getmessage , e ; throw new exception "something went wrong, receive wrong formatted response, " + e getmessage ; } } protected string makeurl @nonnull string modelname, @nullable string countrycode, @nonnull string servicetype { stringbuilder sb = new stringbuilder ; sb append host append '/' ; sb append path ; sb append '?' append "servicetype" append '=' append servicetype ; sb append '&' append "modelname" append '=' append modelname ; if countrycode != null && !countrycode isempty { sb append '&' append "countrycode" append '=' append countrycode ; } return sb tostring ; } } importantthe card data token expires in 30 seconds after creation, so it needs to be created right after the user clicks the “add to wallet” button samsung wallet on an mms/email the following guides how to configure wallet code on email and mms messages implement the data fetch link process, including server apis you need to create a unique "reference id" for security reasons, make sure the "reference id" is complex enough that no important information can be inferred deliver a message including the web link through the chosen message platform for mms, the designed link shows up as a "smart suggestion" on samsung devices you can find a sample web link on the wallet cards guide on the partners portal for card data, samsung wallet asks the partner system to provide card details through the server api duplicate requests are prohibited on the same device link to “add to wallet” on an mms/email you can add an “add to wallet” web button even in environments where the javascript api cannot be loaded, such as sms or email these methods do not support controlling “add to wallet” button visibility [mms link] url link url attributes description url string required “add to wallet” link url * see data transmit link * see data fetch link [email on web button link] <a href="url"> <img src="image_url"> <img src="rd_impression_url" style="width 1px; height 1px;"> </a> attributes description url string required “add to wallet” link url * see data transmit link * see data fetch link image_url string required button’s image resource url * see image resources rd_impression_url string required impressions logging url * value granted from the partners portal statistics service samsung wallet serves useful statistics data of the integrated service on the partners portal the data configured by making simple api calls for each event such as button impression and click these are necessary to provide better services as well notestatistics api sample code you can find actual code sample at wallet script guide section in ‘wallet cards’ menu on the partner portal [event notification api] https //us-rd mcsvc samsung com/statistics/{event}/addtowlt?{parameters}&utm_source=partner&utm_medium={channel} {event} for each event in the following situations - impression when the “add to wallet” button has been shown - click when the “add to wallet” button has been clicked {parameters} includes key factors to figure out the service {channel} - app "samsung wallet" button in a native application - web "samsung wallet" button on the web - email "samsung wallet" button in an email for details, please visit 'wallet cards' menu on the partner portal
Develop Samsung Wallet
docwallet card type wallet card type wallet card subtype boardingpass airlines, trains, buses, others airlines buses trains wallet card data fields attributes type value description attributes {fields} titlestring 32 required main title e g , 'boarding pass' transittypestring 16 optional transit type * this will be deprecated groupingidstring 32 optional identifier used to group related cards orderidstring 32 optional unique identifier for an order providerlogostring 256 required url of the logo image the file size should not exceed than 256 kb providerlogo darkurlstring 256 required url of the logo image in dark mode the file size should not exceed 256 kb providerlogo lighturlstring 256 required url of the logo image in light mode the file size should not exceed 256 kb providernamestring 32 required display name of the boarding pass provider userstring 64 conditional passenger name * required if subtype is airlines usertypestring 32 optional passenger type i e , classification of passengers, like child, adult transitoperatorstring 64 optional operator name vehiclenumberstring 32 conditional transit or route number i e , flight number on airlines * required if subtype is airlines transitclassstring 32 optional transit class i e , premium class for buses transitfarestring 32 optional general fare or purchase fare coachnumberstring 16 optional identifier assigned to each individual carriage e g , b4 seatclassstring 32 conditional seat class * required if subtype is airlines seatnumberstring 16 required individual number of the passenger seat e g , a-9, free seatfacingstring 16 optional direction in which the seat is oriented within a carriage it indicates whether the seat is positioned to face the direction of travel or face the opposite direction e g , forward, backward reservationnumberstring 32 required number of the transit reservation boardingprioritystring 32 optional information on whether entitles the passenger to board before others i e , if the passengers are pregnant boardingseqnostring 32 optional boarding sequence number boardinggroupstring 8 optional value of boarding group or zone e g , b boardingtimelong 13 optional boarding time epoch timestamp in milliseconds boardingtime utcoffsetstring 8 conditional utc offset of boarding time at the departure point * required if boardingtime exist gateclosingtimelong 13 optional boarding gate closing time epoch timestamp in milliseconds gateclosingtime utcoffsetstring 8 conditional utc offset of gate closing time at the departure point * required if gateclosingtime exist baggageallowancestring 16 optional baggage allowance departnamestring 32 conditional name of the departure point * required if subtype is airlines departcodestring 8 conditional code for the departure point * required if subtype is airlines departterminalstring 8 conditional terminal name of the departure point * required if subtype is airlines departgatestring 8 optional gate name of the departure point estimatedoractualstartdatelong 13 conditional departure time epoch timestamp in milliseconds, i e , the estimated time the aircraft plans to pull from the gate, or the actual time the aircraft already pulled from the gate * required if subtype is airlines estimatedoractualstartdate utcoffsetstring 8 conditional utc offset of time at the departure point * required if estimatedoractualstartdate exists arrivenamestring 32 conditional name of the arrival point * required if subtype is airlines arrivecodestring 8 conditional code for the arrival point * required if subtype is airlines arriveterminalstring 8 optional terminal name of the arrival point arrivegatestring 8 optional gate name of the arrival point estimatedoractualenddatelong 13 conditional arrival time epoch timestamp in milliseconds, i e , the estimated time the aircraft plans to reach the destination gate not the runway , or the actual time it reached the gate * required if subtype is airlines estimatedoractualenddate utcoffsetstring 8 conditional utc offset of time at the arrival point * required if estimatedoractualenddate exists locationsstring 1024 optional list of locations where the card can be used * see location format bgcolorstring 8 required color of the card art e g , #00ffff fontcolorstring 8 optional color of the font on the card art acceptable values dark, light blinkcolorstring 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff applinklogostring 256 required app link image url the file size should not exceed 256 kb applinknamestring 32 required app link name applinkdatastring 256 required information about the partner app link extrainfostring 512 optional additional information to be delivered to customers * see additional information format noticedescstring 5000 optional text of the notice * long content is allowed * see additional information format csinfostring 512 optional providers’ customer service informationusing data in json format converted to escape string* allowed items call, email, or website* see below for an example displaytsaprecheckynstring 1 optional flag whether to display the tsa precheck image either ‘y’ or ‘n’ image size 68x20 / 140x20 membershipstatuslevelstring 256 optional image url for the status level of the airline alliance or own membership i e , airline skyteam, star alliance image size 68x20 / 140x20 barcode valuestring 4096 optional actual data that is delivered when the barcode/qr code is scanned barcode serialtypestring 32 optional presentation type e g , serialnumber, barcode, * see barcode format barcode ptformatstring 32 optional presentation format e g , barcode, qrcode, serial, *see barcode format barcode ptsubformatstring 32 optional presentation sub-format e g , code_128, qr_code, * see barcode format barcode errorcorrectionlevelstring 4 optional amount of redundancy or error correction data included in the code there are four error correction levels available in qr codes * code options l/m/q/h example airline boarding pass { "card" { "type" "boardingpass", "subtype" "airlines", "data" [ { "refid" "se16138353212584800001", "createdat" 1612660039000, "updatedat" 1612660039000, "language" "en", "attributes" { "title" "oo air boarding pass", "transittype" "airline", "groupingid" "se867132687321", "providerlogo" "https // /logoimage png", "providerlogo darkurl" "https // /logoimage png", "providername" "oo air", "user" "gil dong hong", "vehiclenumber" "se123", "seatclass" "economy plus", "seatnumber" "a15", "reservationnumber" "a238473-1", "boardingseqno" "32", "boardingtime" 1612660039000, "boardingtime utcoffset" "utc+09 00", "baggageallowance" "15kg", "departname" "seoul/incheon", "departcode" "inc", "departterminal" "c", "departgate" "1", "estimatedoractualstartdate" 1612660039000, "estimatedoractualstartdate utcoffset" "utc+09 00", "arrivename" "san francisco", "arrivecode" "sfo", "arriveterminal" "a", "arrivegate" "11", "estimatedoractualenddate" 1612660039000, "estimatedoractualenddate utcoffset" "utc-08 00", "bgcolor" "#ff00ff", "fontcolor" "dark", "applinklogo" "https // /applinklogo png", "applinkname" "oo airline", "applinkdata" "https //www ooairline com", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\"}", "barcode value" "cs16138353212584806754fg1802", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "oo 항공 탑승권", "providername" "oo 항공", "user" "홍 길동" } } ] } ] } } grouped bus boarding passes { "card" { "type" "boardingpass", "subtype" "buses", "data" [ { "refid" "ref-202211300001", "createdat" 1669782394000, "updatedat" 1669782394000, "language" "en", "attributes" { "title" "samsung bus boarding pass", "transittype" "bus", "groupingid" "grp-20221130001", "providerlogo" "https // /logoimage png", "providerlogo darkurl" "https // /logoimagedark png", "providername" "samsung bus", "user" "galaxy kim", "usertype" "adult", "transitoperator" "samsung transport co ", "seatnumber" "7-a", "reservationnumber" "rsvno-202211300001", "transitclass" "premium", "transitfare" "12,500 won", "boardingtime" 1671926400000, "boardingtime utcoffset" "utc+09 00", "departname" "east-seoul bus terminal", "departgate" "14", "estimatedoractualstartdate" 1671928200000, "estimatedoractualstartdate utcoffset" "utc+09 00", "arrivename" "suwon bus terminal", "bgcolor" "#f1c232", "fontcolor" "dark", "applinklogo" "https // /applinklogo png", "applinkname" "samsung bus", "applinkdata" "https //www samsung-bus com", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\"}", "barcode value" "161383532125848067541802", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "삼성버스 탑승권", "providername" "삼성버스", "user" "김 은하", "transitfare" "12,500 원" } } ] }, { "refid" "ref-202211300002", "createdat" 1669782394000, "updatedat" 1669782394000, "language" "en", "attributes" { "title" "samsung bus boarding pass", "transittype" "bus", "groupingid" "grp-20221130001", "providerlogo" "https // /logoimage png", "providerlogo darkurl" "https // /logoimagedark png", "providername" "samsung bus", "user" "samsung sam", "usertype" "child", "transitoperator" "samsung transport co ", "seatnumber" "7-b", "reservationnumber" "rsvno-202211300002", "transitclass" "preminum", "transitfare" "9,000 won", "boardingtime" 1671926400000, "boardingtime utcoffset" "utc+09 00", "departname" "east-seoul bus terminal", "departgate" "14", "estimatedoractualstartdate" 1671928200000, "estimatedoractualstartdate utcoffset" "utc+09 00", "arrivename" "suwon bus terminal", "bgcolor" "#f1c232", "fontcolor" "#000000", "applinklogo" "https // /applinklogo png", "applinkname" "samsung bus", "applinkdata" "https //www samsung-bus com", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\"}", "barcode value" "161383532125848067541802", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" }, "localization" [ { "language" "ko", "attributes" { "title" "삼성버스 탑승권", "providername" "삼성버스", "user" "사만다 삼성", "transitfare" "9,000 원" } } ] } ] } }
featured
blogwallet cards https://developer.samsung.com/wallet/manage.html step 3. integrate “add to samsung wallet” to your service https://developer.samsung.com/wallet/api/overview.html if you are in a country where the event ticket menu is not supported on galaxy devices, contact us through developer support and we will help you as quickly as possible.
Hye-In Min
Develop Samsung Wallet
docwallet cards [result] eyjrawqioijxtfquufvcs0vziiwizw5jijoiqteyoeddtsisimfszyi6iljtqtffnsj9 abo_ci81btj2d1a8tcgkfwbx9wpri4tkhhzwms8swct_2nnzhasi_nklmj3wnkm5gwaouny14zx_6eozhj6tdiicuq-rairs6woesu8xa2dt1sc5l17wu9wdsgok4anj0kiunii4pler3d-4fox1hx1fok9siwwqqfql4vnqg3he-i4j6cywoybphznybmkyynkiqfczl6lbttehc4tdaorpkwra3vmb0bbz5nyzf1axzfk-17tz0gfhs82a7gl9rej1k5b10_2qfgmhttffvcyytmkv3inmahq0b48l3sk1oppmfcuqigymvludbg_qwdnbl9eilinojjt8ar2nua zviyghusi5fb2rl2 gm5ivizrqqdr8npk1n2qreyai4md-fisfwtbbbgebhnhjmnu-c_o1yuyrvdhcm0ki_rvcdnzkdlcp_g7shskmroyin3bi92qgtkfh2v4y-kcug2dvgv9uiv3oxawvlikfcntmzizj3thv_fue7jrnrbwf2xmviwsqo5b0lmouskbhuhasqilre0rtc1fgn03qfe_e-b87vht5en2pnbydjv-6_8g3aessyodvhyzyayonlxw_kwqif-i5auwfiigk5lgvmuz9dsl6-qkgyiz5pl9nyydjjjpilibtualyvzb1ch-gskweuhiml62zr-chz2ado8vn0sroccjhcax6pbsp3x6fhyxhr65bjzan4lmdfsskn92bcfyclx8j_pgrlm4vui_-kx1lwparkwrtyxmebkmj-2w8numrnnpgt2erlo_hvtz8xh1kopvqjldjdg_qqfu_oewo3hvunkgqeu3qhi6eywvarb7ozsisz-f95o7k-kqtjhfbwz_yra2nxd2bcgc9ua966_9uq4ombwa-8fccawpxyyu4vzbz_ycv25j8grdqhhtw6n9tkzy4nu07jit4ccofvu5n_gsyn1qowd11-_lmk8amf-l5ddipvrun7dealjd8me4nsaakeslqfkz_sddsu0-05icfkm33quqp6fzn5ocy6dmn5kzbvqxzhghcg_a_k1xqqlx_kupl4jsaxcnciuyptdqbc0hxxwuiyrm3tcde6picymgcbpkc205niyld-6en43di4ykc029yqx8rsldoaa6rwvp-zehdkxynyilja-_8fw4ioqp6vk98ajz5t-ajqdk1h6n_opt-zcjkjzz-7r2x07bsa_5ng7iwambrsv1defxhiyv-esce1meif-na_411hgpja-gwczp_wsswlqra0rpdq208ly70xppu4h_3eh_6q8cy5yhhns93vfuo0nsqfniker25zwnid39zoiyj_de9gzjawxa3k0tprpn5mfdpxvtd0-ro4oqi34ab62-rubcdydsmtggihzy3shlgtyafrbzhmpmdkauoj9buirasqpnr4nahfq_s1m1uy5peeq3j0bozmcc4uasnqqnrrelqm8bkfqi41ggjrjm9uvkcr-pmfonsheoqjmce6zkua1qtoefxycdfoejbjqdbcycnoqgugodlqn2-3mkggrpvqvyaolomykc_sl8kpdvjxntkggzqb9vnlnlq9_fy3hmyor0zeexytajfua-4ilsfkg3crqkx3sccsp-w6rf7vfzx5vdhqbhfzbhbuxypfj1bdmis_w-xqdvr1kgblzmsw9grbwm2mk8rt9qpzinhcaqfv2dqagqth4vyuccq0mjcs5qgnbkwdiggvxfk7bhwhk2jrw3k4egjqna9lssnhcjhqz69m16ivbffktnz5ot0l-npkcqeifia-rjmwyy6beodzi8s7s4l4yvlmvjjidujxkb7zsqusvrvizpljmk1rsbvgww7rfojlci9ed-mhpsmxvepj2uxezxu95z_vx7i8xgszxmlwrmsi0eepa5tl7gqfxfimtv4v_o8rjiipqtdjmkenkflnvkn8wio7nosfyak1gplxkpr2scieltcirpweu_4y56yq3wxbvnwcax7yyjytubirk30znw84omyyljc67wntybeqi3ty1vz6wxraenn_dnwiku-ry_bvc9bjwzpgdnpzdtdqndhijleyk9zhzcwvjhvom7vms4cljs6ndqvm9yeilk55h-ejn22-1n1u6pmjeyfbvty0zfrf57sidtcitseejmhbm1uqdsk3rpfxv2hc0dyy9ok7uasdsifwhkczmue4qyurd3y4wvzhjjaprxqeqojfavz-vt-331jvajgkziifmpuyfck-kyrqbq193uya9sy6e-7ereid3cy7gylp9-tfsugobpulnydieamtqi1zaepwjkjqs9ljofdoojhxbqzy0-spitglnbmtuxpxqh6phh34vdb2fcgjttc8h1vp3_a0lvxxzumdu3jypc9ltqmxxg7xz4h4uqrvis2qm3xqwub1uto9syhfnpf16h0-u8bqdofg-yyba-qn_awn4ufs2ftfy-7yd1isp0g31lifmorplehz0pcgefo-mayacxsvgioptn67enmwe_grdwkzv27deocztmcn_fb7qvtdsle881rfz7lrhmitiuitdo4e0fkwuaz1cohrbpbhzmg30tljbxydb-lfq74rxfdc1eobj0vpcdaxomya9eoxcnt70tti16fr3lxjdysgqv_ihtfkdaummfyojjh_w9zagiwb2uxmhng0a3mpt8r80hzbppvh3hsb2uezww8aqtlmkalqf0g6nzqm181z46gnkz7w3h8a29-yci0ypz_m0pofihnwjrendjkew6azodehwyupsno7y93qdc8khhpzb84bkahbc2sye8wgvgmrhfiwsigfht_g3m8nlt3vfasqe98two0tzu3k72kmod8khdw6xq6oalxoba1m9wfi51wmjji8yr4ty-7pqdc51ombxsqurao0-6puja5dufuioq3yzm0iwr1yjciqaofp-xwn9crh287vjzhw2s4ges8s-wuda9yu61u3b1pwr0fyseouzquay_t3qkziaghvz0a2nefdy2wktmaonidqtsku8rhpknqalrc_ydnvyqooxnrdwjrxxilutvlaaqmygtl0zessrvpkh4inkiu0ikbdceqvnlcjqnuymc5u_dtic-pb7e9h4zwxm3talmlzoc-v1u0shzaqok3tvixa9uy9i3qvpz1realwg7w1yqquhpd-6pgolbddfqwxekb43jtry3wnxjizcgzoqwiuvpdhpzm0cyfzlx71cbcpyc3lkg_pduwkb2qjv2hjodusvstv8 bv9p-aoait1mfijswzevsg jws format [jws header] jws header requirement description alg required cryptographic algorithm used to generate signature e g , rs256 cty required payload content type set as "card" ver required token version set as 3 certificateid required certificate identifier based on a csr during onboarding 4 digits alphanumeric partnerid required partner identifier utc required creation time to prevent repeated use, the token expires after a certain period of time unix timestamp in milliseconds * time offset from utc of +00 00 [jws payload] jws payload requirement description jwe compact serialization required contains base64url jwe value [jws signature] jws signature requirement description jws signature required base64url signature of base64url utf8 jws header + ' ' + base64url jws payload [jws example] base64url utf8 jws header +' ' + base64url jws payload + ' ' + base64url jws signature [jws header] {"cty" "card","ver" 3,”certificateid” ”ymtt”,"partnerid" "1234567890","utc" 1631776245876,"alg" "rs256"} [jws payload] jwe result [result] eyjjdhkioijqqvntiiwidmvyijoxlcjwyxj0bmvyswqioiixmjm0nty3odkwiiwidxrjijoxnjm1odq1odu2mjq0lcjhbgcioijsuzi1niisimtpzci6ilbuti5qukllrvkifq zxlkcmfxuwlpaupyvezrdvvgvkntmfzaswl3avpxnwpjam9puvrfeu9fzeruu0lzsw1gc1p5stzjbepuuvrgzk5tsjkuqujpx0npodfcdeoyzdfhofrdz0tmv0j4ovdwukk0vgtosfp3bvm4c3djdf8ybk5asefzsv9us0xtajn3bktnnwd3yw9vbnkxnfpyxzzfb1posjzuzelpy1vrlxjhsvjznndvrvn1ofhbmmrumxndnwwxn3d1ovdkc2dpszrhbkows0lvtkljnfbmzvizzc00zm9ymuh4mwzvazlzsxdxcxfgcww0dm5xzznors1pneo2y3lxt1lccgh6tllctut5eu5rsxfgy3psnmxivfrfagm0verbt3jqs1dyytnwtuiwqkj6nu55ekyxyxh6rmstmtd0wjbhzmhtodjbn0dmovjfajflnuixmf8ycwzhbwhudgzgvmn5wvrns3yzsw5nyuhrmgi0oewzu0sxb1bqbuzddxfpz1lnvkxvrgjnx1fxzg5cbdllswxjbk9qanq4qxiytlvbllp2axlhsfvtatvgyjjsbdiuz201axzpenjruwrsoe5qszfomnfsrxlbstrnrc1gsvnmv1rcqkjnrwjotmhqtw51lwnfbzfzvvlsdmroq20ws2lfcnzjre5as0rmy1bfzzdzafnrtvjvwwlum2jjotjxz3rrrmgyvjrzlwtdducyrhzhvjlvsvyzb3hhv3zssutmy050bvppwmozvghwx0zvrtdkck5yyndmmlhnvkl3c1fvnwiwbg1vvxnlykh1sgfzculsukuwunrdmwznbjazcuzfx0utqjg3dmh0nuvumlbuqllesnytnl84zznhzxntew9kdkh5ellhww9uthhxx0txcwlglwk1qvv3rmljz0s1tgdwbvv6ourtbdytuutnwwl6nxbsow55ewrkampwswxpynr1yuxzdnpcmunilwdza3dfvwhptww2mlpslunoejjbzg84vm4wu1jvq2nksgnhwdzqqlnqm3g2rmh5wehynjvcslpbbjrsturmu3nltjkyymngewnmwdhkx3bnukxnnfzvsv8ts3gxbfdwqxjrd1j0wxhtrwjltuotmnc4tlvnuk5uced0mkvstg9fafz0wjhyadfrb3b2cwpmzgpkr19rcwzvx09fv08zshz1tkthuwv1m1fostzfevd2yxjin09ac0lzei1gotvpn0sts1f0smhmqld6x1lyqtjoeeqyqmnnyzl1qtk2nl85dve0b01cd0etoezjy0fxuhhzwvu0dlpcel95y1yynwo4r3jkcuhivhc2bjlus1p5ne51mddqsvq0y0nvrlz1nu5fr3n5bjfxb1demtetx2xnazhhtuyttdvkrglwdnj1bjderwfsskq4twu0tnnbqwtfu0xrzkt6x3nkzfn1mc0wnwljzkttmznxvvfqnmz6bjvpy1k2rg1unwtaqlzrwfpiz0hdr19bx0sxeffrbfhfa3vqtdrku0f4q05davvzufrecwjjmeh4whdvavlyttn0q0rlnnbpq3ltr0niuetdmja1tml5beqtnmvondnkstr5s0mwmjlzuxg4clnmre9bqtzsv3zwlvpfsgrlehloeulssketxzhgdzrpt3fwnnzlothbalo1vc1halfeszfonm5fb3b0lvpdsmtkwnotn3iyeda3qlnhxzvuzzdpd2ftqljtdjfkzuz4ael5vi1fc0nlmu1fawytbmffndexaedwsketr3ddenbfd3ntv2xxcmewulbectiwogxznzbyufb1nehfm0vixzzxogn5nvlosg5totnwzlvpme5tuwzoautluji1endosuqzoxpvaxlqx2rlowdaamfxwgezazbuuhjqbjvnzmrwwfzurdatcm80b3fjmzrhyjyylxjvqknkwwrzbvrhz0liwlkzc0hmr3r5qwzyqnpitvbnretbvu9koujvsvjhu3fwbni0tmfiznffuzftmvv5nxbfrvezajbit3pty2m0vufztlfrbnjyzuxxbthis0zrstqxr2dkukptovv2a0nslvbnrk9uu0hlt3fqbwnlnlpldwexcvrpruzywwnkrk9lakjqcurcy3ldtm9xr3vhb0rscw4yltnna0dhcnbwuvzzqw9st015s0nfu2w4a3bedmpytnrlz2d6uui5vm5sbmxrov9mwtnobxlvcjbaruv4evrhamz1ys00swxzrkthm2nyuwt4m3njq1nwlvc2cmy3dmz6wdv2rghxykhgwmjiynvywxbgajfirg1jc193lxhrrfzymutnymx6txnxowdsqndnmk1lohj0ovfqemlosgnhuwzwmmrryudrdgg0vnlvq2nxmg1kq1m1uwduqkt3zglhr1z4zms3qmh3sesyanjxm0s0zwdquu5houxtu05oq2pouvo2ou0xnmlwqmzma3ruejvvvdbmlw5qs2nrrulmauetcmptd1l5nkjfb2raathtn1m0bdrzdkxtdmpqaur1snhlqjdac1fvu1zyvml6ugxqtwsxunnidmd3vzdyzk9ktgnjowvklw1ichnnehzlcgoyvxhfwlhvotvax3zyn2k4eedtwnhtbfdybvnjmevfuee1vew3r1fmegzjtxrwnfzftzhsakljuff0repna0vos0zstlzrbjhxaw83bm9zzllbazfncgx4a1bsmlndsuvsvenjulb3zxvfnhk1nllxm3d4ylzud0nbwdd5ewp5vhvcsvjrmzb6tlc4ng9nwvlsskm2n3dudhlcrxfpm1rzmxz6nld4cmflbm5fze53swt1lvjzx2j2qzlcsldaugdetnbazfrkcw5eaglktev5szl6afpjd3zqsfzvbtdwtvm0q0xkczzozhfwbtl5zwlsazu1sc1fsm4ymi0xbjf1nnbnamv5rkj2dfkwekzyzju3c2lkvgnjdhnfrupnagjnmvvxzfnlm1jwrnh2mkhdmerzwtlpazd1qxnec0lgv2hlq1pndwu0uxlvcmqzwtrxdlpiampbufjycuvrb0pmyvzalvz0ltmzmwpwyupha3pjawznuhvzrmnrlwtzunfiute5m1vzytltwtzfltdfcmvjzdndetdhwwxqos1urlnvz29cufvmtnleauvbbxrrstf6ywvwd0planftouxkb0zkt09qafhicvp5mc1zcel0z0xuqk10dxhweffinnbosdm0dmrimmzdz2p0vem4adf2cdnfqtbmdnh4envnzfuzsllwyzlsdhfnwhhhn1hangg0vvfydkltmnftm1hrd1vcmxvutzltewhmtlbmmtzomc1voejrze9gry1zwwjblvfox0fxtjrvrlmyrlrgws03euqxaxnwmeczmuxjrm1punbmzuh6mhbjz0vmty1nyxlhy3hzvkdjt3b0bjy3rw5nd2vfr3jkd0t6vji3rgvvy3pubunux0zin1fwverzteu4odfsrno3thjotwlusvvjvgrvneuwrmtxvwfamunvshjccejowm1hmzb0tgpieflkqi1srne3nhjyzmrdmwvpqkowdlbjzef4b215qtlft1hdtnq3mhr0ste2rlizbhhqzfltr1f2x2lidgzrzgf1tu1gwu9kakhfvzlaywdjv2iydxhnae5hmeeztxbuofi4mehaqlbwdkgzsfnimnvleld3oefxvgxta0fscuywzzzuwnfnmtgxejq2z05lwjd3m2g4yti5lxldatb5uhpfbtbqt0zjag5xanjfbmrqs2v3nmfab0rfshd5vvbzbk83etkzuurjogtiafb6yjg0ymtbaejdmlnzzth3r3zntxjorkl3u2lnzmh0x0cztthobhqzdmzbc1floth0d28wvhp1m0s3mkttb0q4a2hkdzzyctzpywxyb2jbmu05d2zpntfxbwpqath5cjruws03chfeyzuxt21iefnrvxjbtzatnlb1ame1rfvgvulputn5wk0wavdsmvlky2lxqw9gcc1yv045q3jimjg3dkpaafcyczrhzxm4uy1xdwrhoxl1njf1m2ixchdsmgzzc0vpvxprdwfzx3qzcwtaawfhahzameeybkvgzfkyd2tubwfvbmlkcxrza3u4cmhqs25xyuxsq195zg52evfpt3huckr3sljyeelmdvrwbgfhuw1zz1rsmhplc1nsdnbrsdrjbmtjvtbpa0jeq2vrvm5mq0pxtnvztwm1dv9eveljlxbin0u5sdr6v3htm1rbbe1mem9dlxyxdtbzshphcw9rm3r2svhboxv5owkzcxzqejfyzufmv2c3dzf5cvfvafbkltzqr29symrkrnfxwevryjqzsnrsetn3bnhksvpdr1pvcxdpvxzqzehwem0wq3lmekx4nzfjqmnweumztgtnx3bevvdlqjjxslyysgpvzfvtdln0djguyny5cc1hb0fjddftzklkc1dazxztzw bwqnq5n8apkes9fbb4htdqbterdklaztmphx6r_h7k7og4lx3gmgds3fep6o4cs6jttutost6gdmudwzozztptwetj64p4of1wlzkf6tx8alrkaiqr2nptxh_ah87bkw69myzakb4d9obngp7qdk7izgkpq180olmbtpxiv-wkin92f6n2fpoi5bt1ws_hh8wxgla6nkm0s-roayl7gtvgbs6gohkhvgaxnhesqy7kzgqte9orcc_fliqyyrabhtpgybwb7wp0hpodzq0dpadumkkprs05vidfzjufxduyc7zbze-g_tixrjk3linf4rnzxyi0gohbw5grphu3wltg authorization token the restful api needs to include an authentication token jwt samsung and partners can use the token to authenticate api calls jwt format [jws header] jws header requirement description alg required cryptographic algorithm used to sign the payload e g , rs256 cty required payload content type, such as "auth" ver required token version set as 3 certificateid required certificate identifier based on a csr during onboarding 4 digits alphanumeric partnerid required partner id same as partnercode utc required creation time to prevent repeated use, the token expires after a certain period of time unix timestamp in milliseconds * time offset from utc of +00 00 [jws payload] jwe payload requirement description api required current api information api method required api method api path required api path refid optional a unique content identifier defined by the content provider authentication optional authentication value to be used in accordance with the pre-configured authentication method on wallet card * see the chapter authentication for more details updatedat optional data update timestamp epoch timestamp in milliseconds [jws header] {"cty" "auth","ver" 3,”certificateid” ”ymtt”,"partnerid" "1234567890","utc" 1631775948348,"alg" "rs256"} [jws payload] /** samsung server api > update notification **/ { "api" { "method" "post", "path" "/wltex/cards/12584806754/notification" }, "refid" " ref-20230304-0003" } /** partner server api > get card data **/ { "api" { "method" "get", "path" "/cards/12584806754/ref-20230304-0003" }, "refid" "ref-20230304-0003" } [jws result] eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjm0nty3odkwiiwidxrjijoxnjmxnzc1otq4mzq4lcjhbgcioijsuzi1niisimtpzci6ildmvc5qukllrvkifq ewogicagikfqssi6ihskicagicagicaibwv0ag9kijogikdfvcisciagicagicaginbhdggioiail2nhcmqvq1mxnjezodm1mzixmju4ndgwnjc1ncikicagih0sciagicaicmvmswqioiaiq1mxnjezodm1mzixmju4ndgwnjc1ncikfqo ascawii-ambjkoly_auzagxrwuumkfuhbznrlk0ykvbyog2dsljs-_xyq9tooh4cwsfpkej0vqkwbyrokabkhwmrdbkjrajeaq-87s-bqp1rcbelnzmfq66gcmbg9xpd6dmwwlnrazyszjrcyzkllu9si5qykrkyuoz34mcwzwdneos3z3gl1xft42m2-cduxkqwi0wfryanxiedwboiyu12sdnpsrbwlb7liw4omm6fg01dirtbk6ayumbf7zqjl_oygelv9jfdyoze0tqyklttshgdws7imyamha5nhagplhqivzaqoosa14gbcm1u0zdqw4jqa4-1vgjr_i5xea [authorization token] bearer eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjm0nty3odkwiiwidxrjijoxnjmxnzc1otq4mzq4lcjhbgcioijsuzi1niisimtpzci6ildmvc5qukllrvkifq ewogicagikfqssi6ihskicagicagicaibwv0ag9kijogikdfvcisciagicagicaginbhdggioiail2nhcmqvq1mxnjezodm1mzixmju4ndgwnjc1ncikicagih0sciagicaicmvmswqioiaiq1mxnjezodm1mzixmju4ndgwnjc1ncikfqo ascawii-ambjkoly_auzagxrwuumkfuhbznrlk0ykvbyog2dsljs-_xyq9tooh4cwsfpkej0vqkwbyrokabkhwmrdbkjrajeaq-87s-bqp1rcbelnzmfq66gcmbg9xpd6dmwwlnrazyszjrcyzkllu9si5qykrkyuoz34mcwzwdneos3z3gl1xft42m2-cduxkqwi0wfryanxiedwboiyu12sdnpsrbwlb7liw4omm6fg01dirtbk6ayumbf7zqjl_oygelv9jfdyoze0tqyklttshgdws7imyamha5nhagplhqivzaqoosa14gbcm1u0zdqw4jqa4-1vgjr_i5xea secure add to samsung wallet authentication defines the data format to authenticate the user registering/updating the card if need a custom user verification process, please get in touch with us via tech support [authentication data set] case type value description connecting information ci user’s ci value identifier of identity verification agency samsung account sa user’s samsung account verifying that the signed-in samsung account on the user's galaxy device matches subscriber identity module sim sim card information on mobile telephone devices verify the sim information being used on the user's mobile phone one-time password otp dynamic password the temporary password provided by the partner to the user is verified by receiving user input during the add to samsung wallet process access token token token to verify data retrieval request token data included in card data is used as a key accessed when querying a partner server this tokenized key can be reissued when the partner delivers updated card data [example] type sample data ci {"ci" "hsd0iuf9bew8ugb7wqeu6i"} sa {"account" "samsungwallet@samsung com"} sim [{"uiccid" "abcderwyt","telno" "821012345678","isprimary" true},{"uiccid" "abcderwys","telno" "01012345679","isprimary" false}] otp {"otp" "947253"} token {"x-access-token" "7c8d38690d0e3b6aa077198abd2554a3a7940b52cf86bd690c1"}
Develop Samsung Wallet
docwallet card identifier issued from partner portal when the partner manager signs up for partner services and registers the wallet card they want to service refid string 32 required unique content identifier defined by the content provider query parameter n/a payload data string 3000 required jwt data encrypted with the public key information and card type if decrypted this data is decoded, and it has the following format information { “data” “xxxxxxxxxxx”, “card” {"type" "relyingparty", "subtype" "others", "designtype" "us-01" }} [example] post {partner server url}/rp/v1 0/{cardid}/{refid}/key content-type application/json { “data” “eyjjdhkioijbvvriiiwidmvyijoimiisinbhcnruzxjjzci6inrlc3qilcj1dgmioje3mtyymdyznjaxmtasimfszyi6iljtmju2in0 zxlkbgjttwlpaupctvrjnfiwtk5jaxdpwvd4bklqb2lvbe5ctfu5qljwqxrnaluysw4wllz5afaxs0fnmvjhbzbdn2nix2pydgtfoddqbnhrrmpfwkppcnnsuus4mnn0owvxtjeyvzvmoejax1d5ngvzmze3vdnad0pncmpwzwdzoek3avlcwwrlogj5lxfimjblu3ruc3jsszlpslfnn1fam2xzauxscxltb0vlbervd0fpatrmry1jukzwdvlrbxrintg3utd1zwnuq1lwwgzwalvecg01yxbfbdv3szm1ugz3d0dkrem2tmowz1awbtz3nk1kdl9mddbvzwc2mwzjagdbyny0emxmzju2cvyzm0t6zjdjbwvpbkjrnnpmsgutymfwyxhvzk5ld2htzwvjuzftv3larm1nvlj6mefsmnbxa0dqlvjkt1iza3vzavo0vjfidy1aq2iyvwvwyvdzru9nuedrvw1mbtfuowjwt1zmz1nuv1f0se5pvtfjyvrhtg1dwlpvqs5pmzzrd1g4wmjnq21wd3o2ll9kzehfvxnnbm13b1drddrmcu4xmuncauntsnutbwpyv2zrckxos0zvenbss085ckdxbudpz0pqukf1ntfsotryc2vivwdfwu9ns2rgr1vomwjhmhb3y0tfngtjmet2dkfowhprodn0azbjqzrot2f6vzlmovntt0rhmu9imefoavfzqzddevfqnndnlwflvk8waejwsejkmeduruh1z3exc21vvmxrbjblsnjqwhm4x3fwcnplekwtadfpcfk1aes1zug5q3nisms0aehcngnmwulkrujfz09bcgzxcgfumgfsvgfmodhhdxlqsgzhdgrma0tlwdv0q0rtajixse5tt0fhwtjvwlzrr0hxu0wzngjabtu5aezmnvdha0ljce9bmhlwue9tqznwtflkv2jsmm85lkfoedbvytvgetzudkxkvxvketazshc e07yyl7ior3885vykss5_q1icpx750uu2ge5sujsedx3dr_u0x4tse9_0nxm46dywnfuxruagfjdnjhibc707li9vi3xtyihwnweifydgv1qb9oddkyyzuahxqmjhvuqncdt6df2caqzf5qgmvqfmgse_t7ipu8vqfxe34do-skzj8ftduss2ecdanbqokchih3m39noubpfhcx68plpcw50dixlupxwegniu2t3co24yliaklgac669accxdqr34utvuqhtjt_ftxkahalzoa34_hj_s82fivixh1itd74uojzse7ibwya_kvysozavnmztz2th9cbwycvx8wa” } [response] type value description http status code 200 ok payload data string 3000 required jwt data encrypted with the data field types requested to the client for authentication of the mdl [result] http status code description 200 ok success 400 bad request requests cannot or will not be processed due to something that is perceived to be a client error 401 unauthorized authorization token is invalid or expired 500 internal server error the server encountered an unexpected condition that prevented it from fulfilling the request 503 service unavailable the server is not ready to handle the request send authentication data the data is encrypted according to the requested data and then transmitted along with the data card information [request] type value description method post url {partner server url}/rp/v1 0/{cardid}/{refid}/auth headers authorization string 1024 required credential token the token can have the prefix "bearer" as an authorization type, e g , bearer <credentials> * refer to authorization token for more details pathparameters cardid string 32 required 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 refid string 32 required unique content identifier defined by the content provider queryparameter n/a payload data string 3000 required jwt data encrypted with the public key information and card type if decrypted this data is decoded, it has the following format information { “data” “xxxxxxxxxxx”, “card” {"type" "idcard","subtype" "drivers","designtype" "us-01" }} [example] post {partner server url}/rp/v1 0/{cardid}/{refid}/auth content-type application/json { “data” “eyjjdhkioijbvvriiiwidmvyijoimiisinbhcnruzxjjzci6inrlc3qilcj1dgmioje3mtyymdyznjaxmtasimfszyi6iljtmju2in0 zxlkbgjttwlpaupctvrjnfiwtk5jaxdpwvd4bklqb2lvbe5ctfu5qljwqxrnaluysw4wllz5afaxs0fnmvjhbzbdn2nix2pydgtfoddqbnhrrmpfwkppcnnsuus4mnn0owvxtjeyvzvmoejax1d5ngvzmze3vdnad0pncmpwzwdzoek3avlcwwrlogj5lxfimjblu3ruc3jsszlpslfnn1fam2xzauxscxltb0vlbervd0fpatrmry1jukzwdvlrbxrintg3utd1zwnuq1lwwgzwalvecg01yxbfbdv3szm1ugz3d0dkrem2tmowz1awbtz3nk1kdl9mddbvzwc2mwzjagdbyny0emxmzju2cvyzm0t6zjdjbwvpbkjrnnpmsgutymfwyxhvzk5ld2htzwvjuzftv3larm1nvlj6mefsmnbxa0dqlvjkt1iza3vzavo0vjfidy1aq2iyvwvwyvdzru9nuedrvw1mbtfuowjwt1zmz1nuv1f0se5pvtfjyvrhtg1dwlpvqs5pmzzrd1g4wmjnq21wd3o2ll9kzehfvxnnbm13b1drddrmcu4xmuncauntsnutbwpyv2zrckxos0zvenbss085ckdxbudpz0pqukf1ntfsotryc2vivwdfwu9ns2rgr1vomwjhmhb3y0tfngtjmet2dkfowhprodn0azbjqzrot2f6vzlmovntt0rhmu9imefoavfzqzddevfqnndnlwflvk8waejwsejkmeduruh1z3exc21vvmxrbjblsnjqwhm4x3fwcnplekwtadfpcfk1aes1zug5q3nisms0aehcngnmwulkrujfz09bcgzxcgfumgfsvgfmodhhdxlqsgzhdgrma0tlwdv0q0rtajixse5tt0fhwtjvwlzrr0hxu0wzngjabtu5aezmnvdha0ljce9bmhlwue9tqznwtflkv2jsmm85lkfoedbvytvgetzudkxkvxvketazshc e07yyl7ior3885vykss5_q1icpx750uu2ge5sujsedx3dr_u0x4tse9_0nxm46dywnfuxruagfjdnjhibc707li9vi3xtyihwnweifydgv1qb9oddkyyzuahxqmjhvuqncdt6df2caqzf5qgmvqfmgse_t7ipu8vqfxe34do-skzj8ftduss2ecdanbqokchih3m39noubpfhcx68plpcw50dixlupxwegniu2t3co24yliaklgac669accxdqr34utvuqhtjt_ftxkahalzoa34_hj_s82fivixh1itd74uojzse7ibwya_kvysozavnmztz2th9cbwycvx8wa” } [response] type value description http status code 200 ok400 bad request [result] http status code description 200 ok success 400 bad request requests cannot or will not be processed due to somethingthat is perceived to be a client error 401 unauthorized authorization token is invalid or expired 500 internal server error the server encountered an unexpected condition that prevented it from fulfilling the request 503 service unavailable the server is not ready to handle the request code explanation based on the sample code jwt jws + jwe decryption between the wallet backed server and partner server 1 verify by generateing a jws using the body data // generate jws by the body data private static signedjwt parsejwt final string data { try { return signedjwt parse data ; } catch parseexception e { log error "parserjwt error class {}, error message {}", e getclass , e getmessage ; throw new customexception httpstatus internal_server_error, "parserjwt error" ; } } // verify jws using samsung public key public requestbody getrequestbody final keyring keyring { final signedjwt signedjwt = jwtutils verify keyring gettargetpublickey , encrypteddata, 60 * 10000 ; // verify and generate jws try { final string strbody = jwtutils getdecryptedpayloadfrom keyring getsourceprivatekey , jweobject parse signedjwt getpayload tostring ; // decryption jwe by the jws return objectmapper readvalue strbody, requestbody class ; // convert to data format requested by client } catch parseexception | jsonprocessingexception e { log error "getrequestbody {}", e getmessage ; throw new customexception httpstatus internal_server_error, "data body parse error" ; } } 2 decrypt the jwe using the jws jweobject parse signedjwt getpayload tostring public static string getdecryptedpayloadfrom final key privatekey, final jweobject data { try { data decrypt new rsadecrypter privatekey privatekey ; // decryption jwe using partner private key return data getpayload tostring ; } catch joseexception e { log error "joseexception message {}", e getmessage ; throw new customexception httpstatus internal_server_error, "getdecryptedpayloadfrom error" ; } } 3 convert to the format send by the client public requestbody getrequestbody final keyring keyring { final signedjwt signedjwt = jwtutils verify keyring gettargetpublickey , encrypteddata, 60 * 10000 ; // verify and generate jws try { final string strbody = jwtutils getdecryptedpayloadfrom keyring getsourceprivatekey , jweobject parse signedjwt getpayload tostring ; // decryption jwe by the jws return objectmapper readvalue strbody, requestbody class ; // convert to data format requested by client } catch parseexception | jsonprocessingexception e { log error "getrequestbody {}", e getmessage ; throw new customexception httpstatus internal_server_error, "data body parse error" ; } } generate mdocestablishment 1 generate rsa key per refid public class transactioncontext { private final keypair keypair; // rsa key private final byte[] clientengagement; // body data received through key api, base64url decoded value @equalsandhashcode exclude private int encryptmessagecounter = 0; // count value when encrypted @equalsandhashcode exclude private int decryptmessagecounter = 0; // count value when decrypted } private cache<string, transactioncontext> contextcache; // rsa key management per refid with memory cache // generate and store rsa key per refid only once upon first request public transactioncontext settransactioncontext final string key, final string base64encodedclientengagement { log info "base64encodedclientpublickey {}", base64encodedclientengagement ; this contextcache put key, new transactioncontext keyutils generatekeypair , base64utils decode base64encodedclientengagement getbytes ; return this gettransactioncontextby key ; } // part of retrieving ras key based on refid public transactioncontext gettransactioncontextby final string key { return optional ofnullable this contextcache getifpresent key orelsethrow -> { log info "{} is empty", key ; return new customexception httpstatus bad_request, "no key matching the refid" ; } ; } 2 create request field values @override public mono<list<string>> createrequest final partnerinputdto inputdto { final string mockdata = "{ \"doctype\" \"org iso 18013 5 1 mdl\", \"namespaces\" { \"org iso 18013 5 1\" { \"sex\" false, \"portrait\" false, \"given_name\" false, \"issue_date\" false, \"expiry_date\" false, \"family_name\" false, \"document_number\" false, \"issuing_authority\" false }, \"org iso 18013 5 1 aamva\" { \"dhs_compliance\" false, \"edl_credential\" false } } }"; return mono just collections singletonlist mockdata ; } 3 generate establishment @allargsconstructor public class establishment { private final transactioncontext context; // info of client public key , partner private key, public key private final list<string> strreqs; // data field information required for authentication to the client private final keyring keyring; // rsa key information for jwt jws + jwe encryption and decryption between wallet backed server and partner server } protected cborobject generate { final cborobject sessionestablishment = cborobject newmap ; sessionestablishment set e_reader_key, cborobject fromobjectandtag keyutils getereaderkey context , tag_size ; // generate onekey by public key in transactioncontext sessionestablishment set data, cborobject fromobject cipherutils encrypt context, generaterequestformat getrequestcborobjectsfrom strreqs ; // add request data field information for authentication return sessionestablishment; } generate the response value jwt jws + jwe 1 generate establishment with jwe public static string encryptedstringjwe final key publickey, final string data { // please enter samsung public key and establishment data final jweobject jwe = new jweobject new jweheader builder jwealgorithm rsa_oaep_256, encryptionmethod a128gcm build , new payload data ; try { jwe encrypt new rsaencrypter rsapublickey publickey ; return jwe serialize ; } catch joseexception e { log error "encryptedstringjwe exception message {}", e getmessage ; throw new customexception httpstatus internal_server_error, "encryptedstringjwe error" ; } } 2 generate jws by jwe public static string generatesignedstringjws final key privatekey, final key publickey, final string payload { // enter your partner’s public key, private key, and jwe data try { final jwsobject jwsobj = new jwsobject getdefaultjwsheader , new payload payload ; jwssigner signer = new rsassasigner new rsakey builder rsapublickey publickey privatekey rsaprivatekey privatekey build ; jwsobj sign signer ; return jwsobj serialize ; } catch joseexception e { log error "encryptedstringjws exception message {}", e getmessage ; throw new customexception httpstatus internal_server_error, "generatesignedstringjws error" ; } } 3 generate jwt jws + jwe public partneroutputdto topartneroutputdto { final cborobject generate = this generate ; final string establishment = base64 geturlencoder encodetostring generate encodetobytes ; final string strjwe = jwtutils encryptedstringjwe keyring gettargetpublickey , establishment ; final jwsheader jwsheader = jwtutils getdefaultjwsheader keyring getversion , keyring getcertificateid , "partnerid" ; return new partneroutputdto jwtutils generatesignedstringjws jwsheader, keyring getsourceprivatekey , keyring getsourcepublickey ,strjwe ; } authentication processing for values in data fields requested for authentication 1 retrieve transactioncontext value stored in cache using refid value @override public mono<transactioncontext> getcontext final partnerinputdto inputdto { return mono just this transactioncontextmanager gettransactioncontextby inputdto getrefid ; } 2 processes the decryption process of the request body data like jwt jws + jwe decryption between wallet backed server and partner server 3 generate mdocresponse public class mdocresponse { private final transactioncontext context; // managed tranactioncontext by refid private final byte[] data; // base64url decoded data after decrypting jwt jws + jwe data public mdocresponse final transactioncontext context, final string inputdto { this context = context; this data = base64utils decode inputdto getbytes standardcharsets utf_8 ; } } 4 get the field values requested for authentication from the data in mdocresponse public string getdata { // sessiondata = { // ? "data" bstr ; encrypted mdoc response or mdoc request // ? "status" uint ; status code // } final cborobject response = cborobject decodefrombytes data ; checktype response, cbortype map ; final cborobject data = response get data ; checktype data, cbortype bytestring ; return cborobject decodefrombytes isencryptedmode ? cipherutils decrypt this context, data getbytestring data getbytestring tojsonstring ; } 5 create a session value using the transactioncontext value managed by refid and then decrypt it private static byte[] processcipher final ciphermode ciphermode, final transactioncontext context, final byte[] bytes { // ciphermode encrypt or decrypt, bytes data passed by the client try { cipher cipher = cipher getinstance "aes/gcm/nopadding" ; final int counter = ciphermode encrypt == ciphermode ? context getencryptmessagecounter context getdecryptmessagecounter ; gcmparameterspec parameterspec = new gcmparameterspec 128, getsessionkeyiv ciphermode identifier, counter ; cipher init ciphermode ciphermode , getsecretkeyspec context, ciphermode info , parameterspec ; return cipher dofinal bytes ; } catch invalidalgorithmparameterexception | nosuchpaddingexception | illegalblocksizeexception | nosuchalgorithmexception | badpaddingexception | invalidkeyexception e { log error "error type {}, message {}", e getclass , e getmessage ; throw new customexception httpstatus internal_server_error, "processcipher error" ; } } 6 examining data received from the client @override public mono<void> authentication final string response { log info "response info {}", response ; return mono empty ; }
Develop Samsung Wallet
docwallet card as the 'relying party' type in wallet portal step2 select app2app or web2app select the integration model app2app or web2app follow steps listed in each subsection implement functions implement verify with samsung wallet follow steps listed in implementing vww button app2app implement partner app with rp sdk follow steps listed in the app2app sdk integration specs web2app implement server apis follow steps listed in the web2app api integration specs step3 test 'verify with samsung wallet' function and release the function to user test overall 'verify with samsung wallet' function remove test mode in wallet portal after test is done expose the 'verify with samsung wallet' function to the user in partner side
Develop Samsung Wallet
webadd to wallet,boost your business. you can now create and publish content such as coupons, boarding pass or tickets to the users of samsung wallet. get started together with new partner you can now create and publish content such as coupons, boarding pass or tickets to the users of samsung wallet. this is enabled by a two-step process where you onboarding on our partner portal. what can beadded to samsung wallet boarding pass boarding passes can be added to wallet. registered boarding passes enable smoother check-ins and boarding time reminders. gift cards gift cards can be added to wallet. registered gift cards are securely stored and easy to access when needed. membership memberships can be added to wallet. registered membership cards display the membership point status and addtional membership program information. tickets movie and event tickets can be added to wallet. registered tickets can provide expiration reminders and additional ticket information. coupons coupons from various channels, such as sms, mms, email, and in-service can be added to wallet. registered coupons can provide expiration reminders and usage status information. generic cards generic cards can be added to wallet. registered generic cards can display various types of card art templates and undefined label fields. this type lets you add a variety of scalable cards to the wallet. ev charge cards ev charge cards can be added to wallet. registered ev charge cards allow the user to start charging their vehicles and receive benefits from their charging networks easily and conveniently. digital ids digital ids, such as driver's licenses, company ids, student ids, and others, can be added to wallet. registered digital ids can be used to access your place or prove your identity online and offline. boarding pass boarding passes can be added to wallet. registered boarding passes enable smoother check-ins and boarding time reminders. gift cards gift cards can be added to wallet. registered gift cards are securely stored and easy to access when needed. membership memberships can be added to wallet. registered membership cards display the membership point status and addtional membership program information. tickets movie and event tickets can be added to wallet. registered tickets can provide expiration reminders and additional ticket information. coupons coupons from various channels, such as sms, mms, email, and in-service can be added to wallet. registered coupons can provide expiration reminders and usage status information. generic cards generic cards can be added to wallet. registered generic cards can display various types of card art templates and undefined label fields. this type lets you add a variety of scalable cards to the wallet. ev charge cards ev charge cards can be added to wallet. registered ev charge cards allow the user to start charging their vehicles and receive benefits from their charging networks easily and conveniently. digital ids digital ids, such as driver's licenses, company ids, student ids, and others, can be added to wallet. registered digital ids can be used to access your place or prove your identity online and offline. how to designsamsung wallet we encourage you to learn and follow the rules and guidelines suggested to ensure message consistency and drive brand awareness. learn more news and blogs learn more how can we help you? faq search frequently asked questionsby keywords. join the forum visit the forum to ask questions andexchange ideas with other developers. get support submit a 1:1 support request and receive a response within 2 business days.
We use cookies to improve your experience on our website and to show you relevant advertising. Manage you settings for our cookies below.
These cookies are essential as they enable you to move around the website. This category cannot be disabled.
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.
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.
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.
You have successfully updated your cookie preferences.