Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
tutorials
blogwallet cards. notice this article introduces non-payment service cards. if you want to learn more about the payment service of samsung wallet, visit the samsung pay page. you can get information on online payment services such as in-app payments, web checkout, and w3c payments. add to samsung wallet service let's delve deeper into the "add to samsung wallet" feature. digitized content registered in samsung wallet comes in the form of cards called wallet cards. registering a wallet card is effortless: simply click the "add to samsung wallet" button, and the card is stored securely on users’ galaxy smartphones. "add to samsung wallet" button and wallet card notice the benefits of using wallet cards can be found in the commercial video forgetting can be awesome. wallet cards the "add to samsung wallet" service is an open platform that supports offering various types of content such as wallet cards. we are streamlining service integration with content providers across different regions and adding useful features. boarding pass event ticket loyalty gift card coupon id card generic card pay as you go (in progress) reservation (in progress) digital key (in progress) notice generic card supports unstructured forms of cards. be a samsung wallet partner partner onboarding to begin offering content through samsung wallet, you must first register as a partner on the samsung wallet partner portal. the integration process is detailed on the samsung developer portal. to join the samsung wallet partner portal, create a samsung account that is used as the service administrator. wallet card management once enrolled, you can create service cards on the wallet cards menu. each card is assigned a card id representing the service, and you can set the card type and linking information. you can manage cards according to their status – test or live. configuring wallet card notice after completing all required forms for the wallet card, click the launch button to request card activation. before providing the service to actual users, remember to turn off the 'test mode.' how to safely secure user data key generation and certificate request the registration process includes certificate exchange to securely transmit service data. refer to the diagram and developer guide, security key & certificate creation guide, to complete the certificate registration and partner enrollment smoothly. certificates exchange process ensuring data security to prevent forgery and leakage of user card data, secure tokenization processing is required. json web token (jwt), which includes encryption and signature, has a validity time basis for verification, thus providing enhanced security. in particular, when generating this token, the key and certificate previously obtained through the certificate exchange process are used. process of generating and verifying security tokens notice depending on how partners provide content services to users, you can choose how to deliver data to the samsung wallet service. two ways to transfer wallet card data add to samsung wallet interface provides two methods for partners to deliver users digital content as wallet cards. data transmit link the general way to transfer wallet card data is to organize tokenized data in the link attached to the button, and the card data is transmitted to the samsung wallet service when the user clicks the button. as long as samsung wallet support is confirmed, you can generate a link containing the user's card data and configure the "add to samsung wallet" button to run the link when pressed, either on an application or web page. data transmit process data fetch link another method to transfer wallet card data is to include only the refid, which represents the user's content, in the "add to samsung wallet" link and transmit it to the samsung wallet service. when a user clicks the "add to samsung wallet" button, samsung servers refer to the get card data api information set on the wallet card and retrieve user content using the received refid to complete registration. data fetch process this method is suitable for providing user's data through email or mms messages where static links cannot be avoided. there is an option to secure these static links. data fetch process for static links setting up data synchronization on the partner portal, you can set up the wallet card information and configure the server interaction api that the content provider needs to prepare. this api is an interface for managing card registrations, deletions, information, and state changes to sync with those registered on samsung wallet. register wallet cards when a user card is added to samsung wallet, samsung wallet servers use the send card state api to communicate card registration and deletion status to the content provider, allowing them to manage content that needs to be synchronized with samsung wallet. when a wallet card is registered, added event is sent to the partner's server update wallet cards changes to the synchronization target content can be notified to the samsung wallet service through the update notification api. here, the value that distinguishes each piece of content is the refid that the partner must provide when registering the users’ wallet card. through the get card data api, samsung wallet servers can check the latest content information any time. if updates occur on the partner's side, updated event notifications should be sent to the samsung server in case users withdraw content from the partner's side in case users delete cards from samsung wallet notice both servers should verify requests using the authorization header of the api request. this authorization token is in jwt format, familiar from card data security. effortless wallet card registration with just one click this feature is primarily composed of a link-connected button and can be provided through the content provider's application, web page, email, or mms message. various service channels javascript library for web developers we provide a javascript library and a user guide, implement the button, to help integrate your web pages. creating buttons and links in your app for configuring buttons in applications, utilize the button image resources. providing services via mms, email, or qr codes to provide services through fixed links, check out the details of the data fetch link. these static links can also be used by scanning qr codes. experience the service and practice you can experience service integration development using the codelab and use the testing tool to preregister the wallet cards created on the partner portal, which could be helpful. conclusion we've looked at how to provide digital content through the "add to samsung wallet" feature. we continuously update the guides on the developer portal, so please refer to them when preparing for integration. summary the "add to samsung wallet" service welcomes participation from content service partners and developers. for inquiries or technical support, please contact us through the form provided on the developer portal. i hope this post has been helpful, and now i'll conclude my writing here. thank you. this post was written based on the sdc23 korea session.
Choi, Jonghwa
Develop Samsung Wallet
docwallet cards this chapter defines wallet card data fields for the attributes object of each wallet card type the structure for configuring wallet cards follows the defined specification configuring the card data in the specified formatted json structure is required see the details for each card type type value description card object card object required card information card type string 16 required wallet card type card subtype string 16 required wallet card sub type card data[] array of object required wallet card data containerallows up to 6 objects at once data[] refid string 32 required a unique content identifier defined by the content provider data[] createdat long 13 required data creation timestamp epoch timestamp in milliseconds * utc±00 00 data[] updatedat long 13 required data creation timestamp epoch timestamp in milliseconds * utc±00 00 data[] language string 8 required default content language code e g , en, ko data[] attributes object required attributes of card data * refer to the following chapters for each type data[] attributes {fields} attribute fields by card type data[] localization[] array of object optional information for multilingual support localization[] language string 8 required multilingual content language code e g , en, ko localization[] attributes {fields} for displaying a given language, ‘data[] attributes’ can be replaced by localized versions * refer to the following chapters for each type example example card object { "card" { "type" "ticket", "subtype" "movies", "data" [{ "refid" "ref-20230304-001", "createdat" 1612660039000, "language" "en", "attributes" { "title" "samsung wallet", "mainimg" "https // /main png" *refer to the following chapters for each type }, "localization" [{ "language" "ko", "attributes" { "title" "삼성 월렛" } }] }] } } to ensure secure transmission of card data, it must be tokenized in jwt format for this purpose, you will require the certificate obtained using the partner's email account when signing up for the partner portal for detailed information on secure data tokenization, please refer to the security chapter *image resources provided by urls can be cached therefore, in order for the image resource to be replaced immediately, the corresponding url path must be changed boarding pass 'boarding pass' cards support one-off transit types such as airlines, trains, buses, ferries, and etc boarding passes in wallet can remind the user of boarding time and help during check-in depending on the integration level, it can provide status information updates related to flights, and journeys, such as boarding gate changes or cancellations wallet card type wallet card subtype boardingpass airlines, trains, buses, others -airlines -buses -trains type value description attributes {fields} 1 title string 32 required main title e g , 'boarding pass' 2 transittype string 16 optional transit type * this will be deprecated 3 groupingid string 32 optional identifier used to group related cards 4 orderid string 32 optional unique identifier for an order 5 providerlogo string 256 required url of the logo image the file size should not exceed than 256 kb 6 providerlogo darkurl string 256 required url of the logo image in dark mode the file size should not exceed 256 kb 7 providerlogo lighturl string 256 required url of the logo image in light mode the file size should not exceed 256 kb 8 providername string 32 required display name of the boarding pass provider 9 user string 64 conditional passenger name * required if subtype is airlines 10 usertype string 32 optional passenger type i e , classification of passengers, like child, adult 11 transitoperator string 64 optional operator name 12 vehiclenumber string 32 conditional transit or route number i e , flight number on airlines * required if subtype is airlines 13 transitclass string 32 optional transit class i e , premium class for buses 14 transitfare string 32 optional general fare or purchase fare 15 coachnumber string 16 optional identifier assigned to each individual carriage e g , b4 16 seatclass string 32 conditional seat class * required if subtype is airlines 17 seatnumber string 16 required individual number of the passenger seat e g , a-9, free 18 seatfacing string 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 19 reservationnumber string 32 required number of the transit reservation 20 boardingpriority string 32 optional information on whether entitles the passenger to board before others i e , if the passengers are pregnant 21 boardingseqno string 32 optional boarding sequence number 22 boardinggroup string 8 optional value of boarding group or zone e g , b 23 boardingtime long 13 optional boarding time epoch timestamp in milliseconds 24 boardingtime utcoffset string 8 conditional utc offset of boarding time at the departure point * required if boardingtime exist 25 gateclosingtime long 13 optional boarding gate closing time epoch timestamp in milliseconds 26 gateclosingtime utcoffset string 8 conditional utc offset of gate closing time at the departure point * required if gateclosingtime exist 27 baggageallowance string 16 optional baggage allowance 28 departname string 32 conditional name of the departure point * required if subtype is airlines 29 departcode string 8 conditional code for the departure point * required if subtype is airlines 30 departterminal string 8 conditional terminal name of the departure point * required if subtype is airlines 31 departgate string 8 optional gate name of the departure point 32 estimatedoractualstartdate long 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 33 estimatedoractualstartdate utcoffset string 8 conditional utc offset of time at the departure point * required if estimatedoractualstartdate exists 34 arrivename string 32 conditional name of the arrival point * required if subtype is airlines 35 arrivecode string 8 conditional code for the arrival point * required if subtype is airlines 36 arriveterminal string 8 optional terminal name of the arrival point 37 arrivegate string 8 optional gate name of the arrival point 38 estimatedoractualenddate long 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 39 estimatedoractualenddate utcoffset string 8 conditional utc offset of time at the arrival point * required if estimatedoractualenddate exists 40 locations string 1024 optional list of locations where the card can be used * see location format 41 bgcolor string 8 required color of the card art e g , #00ffff 42 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 43 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 44 applinklogo string 256 required app link image url the file size should not exceed 256 kb 45 applinkname string 32 required app link name 46 applinkdata string 256 required information about the partner app link 47 extrainfo string 512 optional additional information to be delivered to customers * see additional information format 48 noticedesc string 5000 optional text of the notice * long content is allowed * see additional information format 49 csinfo string 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 50 displaytsaprecheckyn string 1 optional flag whether to display the tsa precheck image either ‘y’ or ‘n’ image size 68x20 / 140x20 51 membershipstatuslevel string 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 52 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 53 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode, * see barcode format 54 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial, *see barcode format 55 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code, * see barcode format 56 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 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 원" } } ] } ] } } event ticket 'event ticket' cards support event commodities for performances, sports, movies, entrances, and etc event tickets in wallet can provide additional information about the event and an alarm before the event time and expiration ticket cards support event commodities for performances, sports, movies, and entrance wallet card type wallet card subtype ticket performances, sports, movies, entrances, others -performances -movies -sports -entrances type value description attributes {fields} 1 title string 32 required main title e g , mlb ticket 2 category string 16 optional ticket category * this will be deprecated 3 eventid string 32 optional if full cancelation of the event occurs, find and process all tickets with this id 4 groupingid string 32 optional identifier used to group related cards 5 orderid string 32 optional a unique identifier for an order 6 mainimg string 256 required url for main ticket image the file size should not exceed 512 kb 7 subtitle1 string 32 optional the auxiliary field which displays supporting information 8 logoimage string 256 required logo image url to be displayed in the card item the file size should not exceed 256 kb 9 logoimage darkurl string 256 required logo image url in dark mode the file size should not exceed 256 kb 10 logoimage lighturl string 256 required logo image url in light mode the file size should not exceed 256 kb 11 wideimage string 256 optional wide horizontal image url displayed on the card information screen the file size should not exceed 256 kb 12 providername string 32 required ticket provider name 13 providerviewlink string 512 optional link to additional information from the provider* see links format 14 classification string 16 optional classification of tickets use onetime, regular, or annual * default onetime 15 holdername string 64 optional name of card holders 16 idphoto string 200000 optional holder’s photo image data encoded base64 17 idphoto format string 32 optional image file formate g , jpeg, png * unsupported image formats may exist 18 idphoto status string 16 optional status of the dataallowed value unchanged 19 grade string 32 optional ticket grade 20 seatclass string 32 optional seat class 21 entrance string 64 optional entrance gate 22 seatnumber string 256 optional seat location 23 seatlayoutimage string 256 optional url of the seat layout image the file size should not exceed 512 kb 24 issuedate long 13 required issue date epoch timestamp in milliseconds 25 reservationnumber string 32 required reservation number 26 user string 64 optional name of person who made the reservation 27 certification string 16 optional ticket certification e g ,r, as a film rating 28 reactivatableyn string 1 optional flag whether the card is able to activate an expired ticket temporarily either 'y' or 'n' * default 'n' 29 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n'* default 'n' 30 nonetworksupportyn string 1 optional set whether to support to open the wallet card under 'no network' status either 'y' or 'n' * default 'n' 31 startdate long 13 required start date displayed start date epoch timestamp in milliseconds 32 enddate long 13 optional end date displayed end date epoch timestamp in milliseconds * if null, the card will expire in 10 hours from startdate 33 person1 string 512 optional number of persons by category * see classification format 34 locations string 1024 optional list of locations where the card can be used * see location format 35 noticedesc string 5000 required text of the notice * long content is allowed * see additional information format 36 groupinfo1 string 64 optional the first common information with the same groupingid 37 groupinfo2 string 64 optional the second common information with the same groupingid *it is recommended to set groupinfo1 first 38 groupinfo3 string 64 optional the third common information with the same 'groupingid' *it is recommended to set groupinfo1, groupinfo2 first 39 csinfo string 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 40 privacymodeyn string 1 optional whether or not to require user authentication when using the cardeither ‘y’ or ‘n’* default ‘n’ 41 applinklogo string 256 required app link image url the file size should not exceed 256 kb 42 applinkname string 32 required app link name 43 applinkdata string 256 required information about the partner app link 44 bgcolor string 8 optional color of the card art e g , #00ffff 45 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 46 blinkcolor string 8 optional color of the blinking effect in the indicator areae g , #00ffff 47 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 48 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode * see barcode format 49 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial * see barcode format 50 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code * see barcode format 51 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 52 barcode interval string 4 optional update interval if support for dynamic updatesepoch timestamp in milliseconds 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" } } ] } ] } } coupon 'coupon' cards support digitized redeemable voucher coupons in wallet for various channels can provide alarms before expiration and update usage status wallet card type wallet card subtype coupon others type value description attributes {fields} 1 title string 32 required main title e g , free coupon 2 orderid string 32 optional unique identifier for an order 3 mainimg string 256 required url for the main coupon image the file size should not exceed 512 kb 4 logoimage string 256 optional logo image url to be displayed in the card item the file size should not exceed 256 kb 5 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb 6 logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb 7 brandname string 32 optional brand name 8 expiry long 13 required expiration date in timestamp format issued data is cleaned up after it expires epoch timestamp in milliseconds 9 issuedate long 13 required issue date epoch timestamp in milliseconds 10 redeemdate long 13 optional date when the coupon is used epoch timestamp in milliseconds 11 noticedesc string 5000 optional text of notice * html is supported 12 editableyn string 1 required flag whether the coupon can be modified either 'y' or 'n' 13 deletableyn string 1 required flag whether the coupon can be deleted either 'y' or 'n' 14 displayredeembuttonyn string 1 required flag whether the use completion button is displayed either 'y' or 'n' 15 notificationyn string 1 required flag whether a notification related to the coupon is delivered either 'y' or 'n' 16 applinklogo string 256 required app link image url the file size should not exceed 256 kb 17 applinkname string 32 required app link name 18 applinkdata string 256 required information about the partner app link 19 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen captureeither 'y' or 'n'* default 'n' 20 barcode value string 4096 conditional actual data that is delivered when the barcode/qr code is scanned 21 barcode value2 string 4096 conditional the secondary barcode data * required if ptformat is dualbarcode or dualbarcodeserial 22 barcode serialtype string 32 optional presentation type e g ,serialnumber, barcode * see barcode format 23 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial * see barcode format 24 barcode ptsubformat string 32 optional presentation sub-format e g ,code_128, qr_code * see barcode format 25 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 26 balance string 50 optional initial balance this is going to be shown as received it is recommended to use a one letter currency symbol e g , $1,000, 1,000p 27 summaryurl string 256 optional webpage url that show details, such as balance 28 usermessage string 256 optional message to forward 29 sender string 64 optional name of sender 30 redeemurl string 256 optional link to redeem coupons example { "card" { "type" "coupon", "subtype" "others", "data" [ { "refid" "ref-230712-0001", "createdat" 1612660039000, "updatedat" 1612660039000, "language" "en", "attributes" { "title" "free coupon", "mainimg" "https // /main png", "brandname" "samsung coupon", "expiry" 1637802725000, "issuedate" 1637457125000, "editableyn" "n", "deletableyn" "n", "displayredeembuttonyn" "y", "notificationyn" "y", "applinkname" "oo voucher", "applinklogo" "https // /applinklogo png", "applinkdata" "https //www oocoupon com", "barcode value" "cs16138353212584806754fg1802 ", "barcode serialtype" "barcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" } } ] } } gift card 'gift card' cards support enrolling prepaid cards also known as gift certificate, gift voucher or gift token links urls to get balance and transactions history in real time is provided in the partners portal if a partner needs to integrate communication between samsung wallet server and the partner’s server to support the feature, the partner has to set the links in partners portal wallet card type wallet card subtype giftcard others type value description attributes {fields} 1 title string 32 required main title e g , samsung gift card 2 eventid string 36 optional if full cancelation of the event occurs, find and process all gift cards with this id 3 orderid string 36 optional a unique identifier for an order 4 subtitle1 string 32 optional the auxiliary field which displays supporting information 5 logoimage string 256 optional logo image url to be displayed in the card item the file size should not exceed 256 kb 6 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb 7 logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb 8 providername string 32 required gift card provider name 9 user string 64 optional name of person who holds the gift card 10 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n', the default value is 'n' 11 startdate long 13 optional start date display start date epoch timestamp in milliseconds 12 enddate long 13 optional end date display end date epoch timestamp in milliseconds 13 locations string 1024 optional list of locations where the gift card can be used * see location format 14 noticedesc string 5000 optional text of the notice * long content is allowed * see additional information format 15 csinfo string 512 optional providers’ customer service informationusing data in json format converted to escape string * allowed items call, email, or website* see the example below 16 applinklogo string 256 required app link image url the file size should not exceed 256 kb 17 applinkname string 32 required app link name 18 applinkdata string 256 required information about the partner app link 19 bgimage string 256 optional url for card art background image the recommended size for image resources is 888 x 555 px 20 mainimg string 256 optional url for gift card image the file size should not exceed 512 kb 21 bgcolor string 8 optional color of the card art e g ,#00ffff 22 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 23 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 24 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 25 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode *see barcode format 26 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial *see barcode format 27 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code * see barcode format 28 barcode pin string 16 optional pin to show with a barcode 29 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 30 merchantid string 36 optional merchant identifier 31 merchantname string 32 optional merchant name to display 32 amount string 32 optional initial balance this is going to be shown as received e g , $1,000 33 balance string 32 optional remaining balance this is going to be shown as received e g , $1,000 34 summaryurl string 256 optional web url that show details, such as balance or transactions history example { "card" { "type" "giftcard", "subtype" "others", "data" [ { "refid" "b3fdc982-28c9-47a3-b02f-d484779698a7", "createdat" 1672574400000, "updatedat" 1672574400000, "language" "en", "attributes" { "title" "samsung gift card", "eventid" "event-001", "logoimage" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "logoimage darkurl" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "providername" "samsung gift card provider", "user" "ms jane doe", "noticedesc" "<ul><li>gift card test</li></ul>", "csinfo" "{\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\" }", "applinklogo" "https //play-lh googleusercontent com/znfa1roz7hpv9j-jiacbjmjudl2x-fnuwte0oyvbbcwvf5vpzoqqikbxgk7d-aptvag=w240-h480-rw", "applinkname" "gift card link", "applinkdata" "https //www samsung com/", "bgcolor" "#0a1a4f", "fontcolor" "light", "blinkcolor" "#00ffff", "barcode value" "cs16138353212584806754fg1802", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code" } } ] } } loyalty 'loyalty' cards support enrolling loyalty cards also known as membership links urls to get points in real time can be provided in the partners portal if a partner needs to integrate communication between samsung wallet server and the partner’s server to support the feature, the partner has to set the links in the partners portal wallet card type wallet card subtype loyalty others type value description attributes {fields} 1 title string 32 required main title e g ,samsung loyalty card 2 eventid string 36 optional if full cancelation of the event occurs, find and process all loyalty cards with this id 3 groupingid string 36 optional identifier used to group related cards 4 orderid string 36 optional a unique identifier for an order 5 subtitle1 string 32 optional the auxiliary field which displays supporting information 6 logoimage string 256 optional logo image url to be displayed in the card item the file size should not exceed 256 kb 7 logoimage darkurl string 256 optional logo image url in dark mode the file size should not exceed 256 kb 8 logoimage lighturl string 256 optional logo image url in light mode the file size should not exceed 256 kb 9 providername string 32 required loyalty card provider name 10 startdate long 13 optional start date display start date epoch timestamp in milliseconds 11 enddate long 13 optional end date display end date epoch timestamp in milliseconds 12 locations string 1024 optional list of locations where the card can be used * see location format 13 noticedesc string 5000 optional text of notice *html supported 14 csinfo string 512 optional providers’ customer service information using data in json format converted to escape string * allowed items call, email, website, facebook, pinterest, x, or instagram * see the example below 15 applinklogo string 256 required app link image url the file size should not exceed 256 kb 16 applinkname string 32 required app link name 17 applinkdata string 256 required information about the partner app link 18 bgimage string 256 optional background image for a card art the recommended size for image resources is 888 x 555 px 19 bgcolor string 8 optional color of the card art e g , #00ffff 20 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 21 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 22 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 23 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode * see barcode format 24 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial * see barcode format 25 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code *see barcode format 26 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 27 merchantid string 36 optional merchant identifier 28 merchantname string 32 optional merchant name to display 29 amount string 32 optional total amount of points or initial balance this is going to be shown as received it is recommended to use a one letter currency symbol e g , $ 1,000, 1,000p 30 balance string 32 optional available points or remaining balance this is going to be shown as received it is recommended to use a one letter currency symbol e g , $ 1,000, 1,000p 31 summaryurl string 256 optional webpage url that shows details, such as balance or transactions history example { "card" { "type" "loyalty", "subtype" "others", "data" [ { "refid" "b3fdc982-28c9-47a3-b02f-d484779698a8", "createdat" 1672574400000, "updatedat" 1672574400000, "language" "en", "attributes" { "title" "samsung loyalty card", "eventid" "event-001", "logoimage" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "logoimage darkurl" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "providername" "samsung loyalty card provider", "noticedesc" "<ul><li>loyalty card test</li></ul>", "csinfo" " {\"call\" \"0000-0000\",\"email\" \"samsungwallet@samsungwallet com\",\"website\" \"https //www samsungwallet com/cs/\",\"instagram\" \"https //www instagram com/samsungwallet\",\"pinterest\" \"https //www pinterest com/samsungwallet\",\"x\" \"https //www twitter com/samsungwallet\",\"facebook\" \"https //www facebook com/samsungwallet\" }", "applinklogo" "https //play-lh googleusercontent com/znfa1roz7hpv9j-jiacbjmjudl2x-fnuwte0oyvbbcwvf5vpzoqqikbxgk7d-aptvag=w240-h480-rw", "applinkname" "loyalty card link", "applinkdata" "https //www samsung com/", "bgcolor" "#0a1a4f", "barcode value" "cs16138353212584806754fg1802", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code", "amount" "1,000p", "balance" "500p" } } ] } } digital ids 'digital id' cards are used to present identification for employees, students, drivers, guests, etc wallet card type wallet card subtype idcard employees, nationals, students, drivers, guests, others -employees -nationals -students -drivers type value description attributes {fields} 1 title string 32 required main title of cardse g , commercial access, employee badge 2 holdername string 64 required name of card holders 3 secondholdername string 64 optional second name of card holders 4 organization string 64 optional organization of card holders belongingi e , name of department, division, affiliation, association or team 5 position string 64 optional position of card holders 6 identifier string 64 required unique id value 7 idnumber string 64 optional representative value for an idi e , id number, document number 8 address string 256 optional address of card holders 9 placeoflocation string 64 optional place of location associated with the cardholder 10 idphoto string 128k optional holder’s photo image data encoded base64the file size should not be greater than 128 kb 11 idphoto format string 32 optional image file formate g , jpeg, png* unsupported image formats may exist 12 idphoto status string 16 optional status of the dataallowed value unchanged 13 document string 1024k optional first document of identity 14 document format string 32 optional document format- allowed value pdf, jpeg, png 15 document status string 16 optional status of the dataallowed value unchanged 16 issuedate long 13 required issue date epoch timestamp in milliseconds 17 birthdate string 16 optional date of birth 18 gender string 16 optional gender of card holders 19 classification string 16 optional classified identity type 20 expiry long 13 optional expiry date in timestamp format issued data is cleaned up after it expires epoch timestamp in milliseconds 21 contacts string 32 optional personal contact information such as phone number 22 logoimage string 256 optional logo image url to be displayed in card item the file size should not exceed 256 kb 23 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 24 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 25 logotext string 16 optional text as an alternative to logoimage 26 providername string 32 required content provider name 27 issuername string 32 optional place of issue or issuing authority name 28 extrainfo string 512 optional additional information* see additional information format 29 noticedesc string 1024 optional text of the notice * long content is allowed * see additional information format 30 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 31 privacymodeyn string 1 optional whether or not to require user authentication when using the card either ‘y’ or ‘n’* default ‘n’ 32 applinklogo string 256 optional app link image url the file size should not exceed 256 kb 33 applinkname string 32 optional app link name 34 applinkdata string 256 optional information about the partner app link 35 locations string 1024 optional list of locations where the card can be used* see location format 36 coverimage string 256 optional card cover image urlthe file size should not exceed 512 kb the recommended size for image resources is 888 x 555 px 37 bgimage string 256 optional card background image urlthe file size should not exceed 512 kb the recommended size for image resources is 888 x 555 px 38 bgcolor string 8 optional color of the card art support hex color code e g , #015aaa 39 fontcolor string 8 optional color of the font on the card art allowed value black, white 40 blinkcolor string 8 optional color of the blinking effect in the indicator area support hex color code e g , #015aaa 41 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n' * default 'n' 42 barcode value string 4096 optional actual data that is delivered when the barcode/qr code is scanned 43 barcode serialtype string 32 optional presentation type e g , serialnumber, barcode, * see barcode format 44 barcode ptformat string 32 optional presentation format e g , barcode, qrcode, serial, * see barcode format 45 barcode ptsubformat string 32 optional presentation sub-format e g , code_128, qr_code, * see barcode format 46 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 * default l 47 barcode interval string 4 optional update interval if support for dynamic updates epoch timestamp in milliseconds 48 authentication string 64 optional authentication data which meets choose options * see authentication for details 49 provision data string 512 optional elements to complete provisioning* see provisioning for details 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", "document" "{base64 encoded pdf data}", "document 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" "삼성전자" } } ] } ] } } pay as you go 'pay as you go' card supports a system that pays just before using the cost for the service wallet card type wallet card subtype payasyougo evcharges, others type value description attributes {fields} 1 title string 32 required main title of cardse g , samsung charge card 2 subtitle1 string 32 optional the auxiliary field which displays supporting information 3 logoimage string 256 optional logo image url to be displayed in the card item the file size must not be greater than 256 kb 4 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 5 logoimage lighturl string 256 optional logo image url in light mode the file size must not be greater than 256 kb * if this value does not exist, logoimage will be substituted 6 providername string 32 optional content provider name 7 holdername string 64 optional name of card holders 8 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either ‘y’ or ‘n’, the default value is ‘n’ 9 startdate long 13 optional start date display start date epoch timestamp in milliseconds 10 enddate long 13 optional end date display end date epoch timestamp in milliseconds 11 locations string 1024 optional list of locations where the card can be used * see location format 12 noticedesc string 5000 required text of the benefits using data in json format converted to escape string* see additional information information format 13 csinfo string 512 optional providers’ customer service information using data in json format converted to escape string * allowed items call, email, website, youtube, instagram, privacynotice, or termsandcondition* see the example below 14 applinklogo string 256 required app link image url the file size must not be greater than 256 kb 15 applinkname string 32 required app link name 16 applinkdata string 256 required information about the partner app link 17 bgimage string 256 optional url for card art background image 18 bgcolor string 8 optional color of the card art e g , #00ffff 19 fontcolor string 8 optional color of the font on the card art supported colors are white or black #000000 or #ffffff 20 blinkcolor string 8 optional color of the blinking effect which indicates that a card cannot be captured in the indicator area e g , #00ffff 21 barcode value string 4096 conditional barcode data, serial number * required if serialtype isn’t 'none' 22 barcode serialtype string 32 required presentation type barcode/qr/serial/none * see barcode format 23 barcode ptformat string 32 conditional presentation format * see barcode format* required if serialtype isn’t 'none' 24 barcode ptsubformat string 32 conditional 25 barcode pin string 16 optional pin to show with a barcode 26 identifier string 64 optional unique id value such as a membership number 27 grade string 32 optional grade value 28 authentication string 64 optional authentication data which meets choose options * see authentication for details 29 provision data string 512 optional elements to complete provisioning* see provisioning for details 30 transactions string 4096 optional transaction history * long content is allowed * see transactions format 31 summaryurl string 256 optional webpage url that show details, such as transactions example { "card" { "type" "payasyougo", "subtype" "evcharges", "data" [ { "refid" "b3fdc982-28c9-47a3-b02f-d484779698a7", "createdat" 1672574400000, "updatedat" 1672574400000, "language" "en", "attributes" { "title" "ev charge card", "logoimage" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "logoimage darkurl" "https //gpp walletsvc samsung com/mcs/images/contents/wallet_intro_logo png", "providername" "ev-samsung", "holdername" "ms jane doe", "preventcaptureyn" "y", "enddate" 1772574400000, "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"포인트 적립\",\"content\" [\"결제금액 1000원당 포인트가 적립됩니다 \"]},{\"title\" \"포인트 사용방법\",\"content\" [\"적립하신 포인트의 유효기간은 발생일로부터 5년입니다 \",\"유효기간이 지난 포인트는 소멸됩니다 \"]}]}", "csinfo" " {\"call\" \"0000-0000\",\"website\" \"https //www samsungwallet com/cs/\",\"instagram\" \"https //www instagram com/samsungwallet\",\"youtube\" \"https //www youtube com/@samsungwallet\",\"privacynotice\" \"https //privacy samsungwallet com/\",\"termsandcondition\" \"https //www samsungwallet com/tnc\" }", "applinklogo" "https //play-lh googleusercontent com/znfa1roz7hpv9j-jiacbjmjudl2x-fnuwte0oyvbbcwvf5vpzoqqikbxgk7d-aptvag=w240-h480-rw", "applinkname" "ev charge link", "applinkdata" "https //www samsungev com/", "bgcolor" "#0a1a4f", "fontcolor" "#ffffff", "blinkcolor" "#00ffff", "barcode value" "1234000067890000", "barcode serialtype" "qrcode", "barcode ptformat" "qrcodeserial", "barcode ptsubformat" "qr_code", "barcode pin" "1234", "identifier" "ev-001", "grade" "prime", "authentication" "sdaiwegjhewoghewoihgewo", "provision data" "asd2hfih9gwejdahgi4uaewhgeo6whgo12ewhgoewahg1iawpriuq7hg5wel", "transactions" "{\"transactions\" [{\"date\" \"2023-09-10 12 00 00\",\"description\" \"ev-samsung suwon\"},{\"date\" \"2023-09-20 18 00 00\",\"description\" \"ev-samsung gangnam\"}]}" } } ] } } generic card 'generic card' is defined for registering various forms of cards that aren't defined as other types partners can customize the items on the generic card to display by connecting them with card data wallet card type wallet card subtype generic others type value description attributes {fields} 1 title string 32 required main title 2 subtitle string 32 optional the auxiliary field which displays supporting information 3 providername string 32 required provider name 4 eventid string 32 optional event identifier 5 groupingid string 32 optional identifier used to group related cards 6 startdate long 13 required start date display start date epoch timestamp in milliseconds 7 startdate relativenotitime string 4 optional the relative time from startdate in minutes to provide a notification to the usere g , 5, 10, 15, 30, 60, and up to 2880 8 enddate long 13 optional end date display end date epoch timestamp in milliseconds 9 enddate relativenotitime string 4 optional the relative time from enddate in minutes to provide a notification to the usere g , 5, 10, 15, 30, 60, and up to 2880 10 mainimg string 256 required url for main image the file size should not exceed 512 kb 11 logoimage string 256 optional logo image url to be displayed in card item the file size should not exceed 256 kb 12 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 13 logoimage lighturl string 256 optional logo image url in light modethe file size should not exceed 256 kb* if this value does not exist, logoimage will be substituted 14 coverimage string 256 optional card cover image urlthe file size should not exceed 512 kb the recommended size for image resources is 888 x 555 px 15 bgimage string 256 optional card background image urlthe file size should not exceed 512 kbthe recommended size for image resources is 888 x 555 px 16 text{i} string 64 optional text item i 1~15 17 image{i} string 128k optional image item i 1~5 18 image{i} lighturl string 256 optional image item in light mode 19 image{i} darkurl string 256 optional image item in dark mode 20 image{i} status string 16 optional image item status 21 serial{i} value string 4096 optional actual data that is delivered when the barcode/qr code is scanned i 1~2 22 serial{i} serialtype string 32 optional presentation typee g , serialnumber, barcode, * see barcode format 23 serial{i} ptformat string 32 optional presentation formate g , barcode, qrcode, serial, * see barcode format 24 serial{i} ptsubformat string 32 optional presentation sub-formate g , code_128, qr_code, * see barcode format 25 serial{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 26 noticedesc string 1024 required notice description * long content is allowed * see additional information format 27 csinfo string 512 optional providers’ customer service information using data in json format converted to escape string* allowed items calls, emails, or websites 28 providerviewlink string 512 optional link to additional information from the provider* see links format 29 privacymodeyn string 1 optional whether or not to require user authentication when using the cardeither ‘y’ or ‘n’* default ‘n’ 30 bgcolor string 8 optional color of the card art e g , #00ffff 31 fontcolor string 8 optional color of the font on the card art acceptable values dark, light 32 blinkcolor string 8 optional color of the blinking effect in the indicator areae g , #00ffff 33 preventcaptureyn string 1 optional flag whether this wallet card view prevents screen capture either 'y' or 'n'* default 'n' 34 nonetworksupportyn string 1 optional sets whether to support to open the wallet card under 'no network' status either 'y' or 'n'* default 'n' 35 applinklogo string 256 required app link image url the file size should not exceed 256 kb 36 applinkname string 32 required app link name 37 applinkdata string 256 required information about the partner app link 38 locations string 1024 optional list of locations where the card can be used * see location format example { "card" { "type" "generic", "subtype" "others", "data" [ { "createdat" 1661745824345, "updatedat" 1661745824345, "language" "en", "refid" "refid-012345", "attributes" { "title" "samsung generic card", "subtitle" "personal members", "providername" "samsung", "startdate" 1661751274000, "startdate utcoffset" "utc+9", "enddate" 1761778000000, "enddate utcoffset" "utc+9", "enddate relativenotitime" "1440", "text1" "13047623", "text2" "silver", "text3" "suwon station branch", "text4" "031 000-1235", "timestamp1" 1761751274000, "timestamp1 utcoffset" "utc+9", "mainimg" "https //www samsung com/images/main png", "image1" "https //www samsung com/images/image1 png", "image1 darkurl" "https //www samsung com/images/dark png", "image1 lighturl" "https //www samsung com/images/light png", "serial1 value" ">1180mm2241b7c 0000000000000298060000000000 0 090870907 ", "serial1 serialtype" "qrcode", "serial1 ptformat" "qrcode", "serial1 ptsubformat" "qr_code", "bgcolor" "#ff5000", "fontcolor" "dark", "noticedesc" "{\"count\" 2,\"info\" [{\"title\" \"notice1\",\"content\" [\"description1\",\"description2\"]},{\"title\" \"notice2\",\"content\" [\"description1\",\"description2\"]}]}", "csinfo" "{\"calls\" [{\"key\" \"emergency\",\"value\" \"82 123-4567\"},{\"key\" \"customer service\",\"value\" \"82 123-9876\"}],\"emails\" [{\"key\" \"cs team\",\"value\" \"cs@atwsample com\"}],\"websites\" [{\"key\" \"faq\",\"value\" \"https //atwhomepage com/faq\"},{\"key\" \"support\",\"value\" \"https //atwhomepage com/support\"}]}", "providerviewlink" "{\"count\" 1,\"info\" [{\"link\" \"https //samsung external info link/refid-012345\",\"type\" \"web\",\"text\" \"see more information\"}]}", "applinkdata" "https //www samsung com/", "applinklogo" "https //www samsung com/logo png", "applinkname" "samsung" }, "localization" [ { "language" "ko", "attributes" { "title" "삼성 제네릭 카드", "subtitle" "개인 멤버스", "providername" "삼성", "text2" "실버 등급", "text3" "수원역점" } } ] } ] } }
Develop Samsung Wallet
docwallet cards overall managing process the following image illustrates the process of managing wallet cards create wallet cards draft status partners can create and manage their wallet cards with this step-by-step guide manage wallet cards you can manage all registered wallet cards you can edit wallet cards and check their status general information the general information page allows the partner to enter administrative details to manage their cards, as well as to define common parameters for the wallet item description testing mode all data generated in testing mode is periodically deleted be sure to turn off the "testing mode" setting after the test is over wallet card name representative title of the wallet card wallet card id unique wallet card domain name partner app package name partner application package name wallet card template pre-defined partner wallet card template partner get card data url for the partner api call to receive card data if the partner uses this api, enter the url otherwise leave it blank partner send card state url for the partner api call to send a card state notification if the partner uses this api, enter the url otherwise leave it blank samsung server ips samsung wallet server ips which need to be allowed by the partner’s firewall, separately described for inbound and outbound wearable wallet assistance whether to support the wearable wallet service support ‘no network’ status whether to support wallet card opening during the ‘no network’ status description description of the wallet card select template you can choose from various types of wallet card templates optimized for partners such as boarding pass, ticket, coupon, and digital id you can select the type of wallet card from the select wallet card template pop-up window first, select the one you want in the wallet card type drop-down menu and then click wallet card sub type to select one of the templates belonging to the card type wallet card type boarding pass wallet card type tickets wallet card type coupons wallet card type digital id wallet card type gift cards wallet card type loyalty view wallet card you can view all registered information for a wallet card, as well as edit and delete it launch wallet cards you can launch and activate cards, at which point they move to verification you can activate a card by clicking the "launch" button once a card is launched, the button text changes to 'launched' the activation cannot be canceled when a card is launched, its status changes to 'verifying', and then to ‘active’ after administrator approval rejected wallet cards if the wallet card is rejected after launching, you can modify the card and re-launch the administrator registers the reason for rejection when rejecting the launched wallet card it is sent to the partner by email from the system, including the reason for rejection partners can apply for launch again by checking the reason for rejection and modifying the wallet card information testing mode you can test a card internally to make sure everything works before you officially expose it to users the "testing mode" option is enabled by default all data generated in testing mode is periodically deleted card exposure is not affected even when the testing mode is enabled when testing mode is activated, samsung wallet may show error code and message on the card addition screen be sure to turn off testing mode after the test is over admin approval active status all launched cards are activated after the administrator's approval when a card is launched, its status changes to 'verifying' and then to 'active' after administrator approval when the card is activated, it is made visible to the user "add to wallet" integration for wallet integration, you need to insert an "add to wallet" script to your system the "add to wallet" script is available for web, android, and email/mms each system has different script composition to implement an "add to wallet" button, follow the procedure below create the tokenized card data cdata card data is the actual content data of wallet card and it has several formats based on the card type refer to cdata generation sample code for details copy the sample "add to wallet" script from the partners portal’s wallet card page and replace "cdata" with the data token created above apply the script to your system see web integration sample code and android integration sample code for details below is the "add to wallet" script guide in the partners portal for "add to wallet" integration, you may need some base data you can find that and other necessary information on partners portal and wallet api spec you can also add image beacon in the script for tracking effect analysis performance monitoring the samsung wallet service is monitored to get an effective measure of the wallet performance overview wallet card total number of wallet cards registered in the portal wallet card type total number of wallet card types registered in the portal wallet card template total number of templates registered in the portal recent trends provides key indicators and trend charts for the selected period you can change the period and wallet card type being reviewed item description registered registration by wallet card category impressions count when the coupon or banner is displayed on each screen page click count of click on a specific link to the number of total users who view a coupon or banner click through rate percentage of clicks against impressions in the coupon or banner[ctr % = clicks/impressions] stats of all wallet cards provides detailed statistical information for the selected wallet card you can change the period, template, and wallet card type you can check detailed information and charts for each indicator item description registered registration by wallet card category number of registrations by wallet card category and registrations by template number of registrations by template , registered number of registrations for the specified wallet card category/template , registration by partner number of registrations by partner active device number of device registering cards in the wallet max number of unique device ids dmid the max number means the maximum value during the statistical period - the hourly graph shows the maximum time's value - the daily graph shows the maximum date's value top 10 of all templates statistics on top 10 templates based on number of registrations or clicks & ctr add to wallet - impressions number of impressions counts for 'add to wallet' button add to wallet - clicks number of clicks for 'add to wallet' button add to wallet – click through rate ratio of clicks against impressions for 'add to wallet' button[ctr % = clicks/impressions] wallet cards - impressions number of exposures of registered content wallet cards – clicks number of clicks on registered content wallet cards – click through rate click through rate of registered content age & gender age & gender statistics for impression/click/ctr data by wallet card / wallet category registered by end user
Learn Code Lab
codelabwallet cards with the samsung wallet partners site, you must become an official samsung partner once done, you can fully utilize this code lab you can learn more by visiting samsung wallet partner onboarding process, here in samsung developers overview samsung wallet is an application that securely stores essential items such as boarding passes, tickets, and coupons, making them easily accessible from anywhere with this app, users can access various partner wallet cards in one place, simply by swiping up from the bottom of the screen the add to samsung wallet service provides interfaces for users to conveniently add digital content to samsung wallet here are examples of the supported wallet cards boarding pass journey information such as flights, trains, and buses can be provided as notifications, allowing easy retrieval when checking in by configuring server synchronization, updates to journey information such as gate changes, schedule changes, or cancellations can be received by the users ticket notifications about events and additional information, including benefits, can be provided based on real-time utilization of performances, sports games, movies, and admission tickets, status updates related to expiration and availability can be provided gift card gift card, also referred to as a prepaid card, provides real-time balance and transaction history loyalty loyalty cards function as membership credentials, managing membership information through these cards, loyalty points can be administered and redeemed id id cards can fulfill identification verification purposes, such as identity cards, employee cards, and licenses physical documents can be represented through wallet cards, and near field communication nfc -based authentication can be provided reservation reservation cards can contain diverse online booking details, including rental cars, restaurants, and accommodations ongoing reservation information can be managed as a journey pay as you go pay as you go cards allow users to register services that can be charged and utilized according to their preference for convenient use generic card generic cards enable users to create customized cards by selecting preferred card template layouts and designing elements notedepending on your country or region, some card types are not supported if you need assistance, please contact us at developer samsung com/dashboard/support the image below shows the process of managing wallet cards for more information, refer to manage wallet cards set up your environment you will need the following latest version of samsung wallet app from galaxy store samsung galaxy device that supports samsung wallet access to samsung wallet partners site internet browser, such as chrome openssl intellij idea or any java ide optional start the onboarding process partners can manage wallet cards and monitor performance with the samsung wallet partners site to join as partner generate a private key and certificate signing request csr using the openssl command you can follow the instructions in security factors notea private key enables encryption and is the most important component of certificates while csr, which is a necessary factor to obtain a signed certificate, includes the public key and additional information like organization and country proceed to register in the samsung wallet partners site using your samsung account follow the samsung wallet partner onboarding process upload the generated csr for data encryption in encryption setting management section after registration, you will receive a welcome email noteupon receiving the certificates via email, be sure to keep the information safe from exposure and only use them for the following purposes signed certificate used along with the private key to sign data samsung certificate used to encrypt card data and validate authentication tokens in server api headers create a wallet card follow the steps below to create a wallet card in samsung wallet partners site click the wallet cards menu and choose create wallet card fill out the general information form with the details of the wallet card in wallet card template, choose a card type and sub type select the design type and click done you can choose from various types of wallet card templates optimized for partners after inputting all necessary details, click save to set the wallet card status to draft launch the wallet card you can launch and request activation of the card by clicking the launch button upon agreeing to proceed, the launch button text changes to launched and the card status becomes verifying add the card to samsung wallet using the test tool open a web browser on your computer or galaxy mobile device, and go to the following link partner walletsvc samsung com/addtowallettest go to add to wallet tab and click choose key file to upload your private key in the select card dropdown menu, select the created card to display the card details and populate sample data navigate to the form tab and modify the card data as desired notethe structure for configuring wallet cards follows the defined specification you can refer to the full list of card-specific attributes specification scroll down to the bottom of the page and click the add to samsung wallet button click done when a preview of the card shows on your mobile screen with a message indicating that the card has been added to your wallet once the card is added to your samsung wallet app, you can check its details by clicking on it noteyou can also go to the playground tab and add cards to the samsung wallet app even without creating a card on the wallet partners site update the status of the added card if a server api info partner get card data and partner send card state is registered in the wallet card, real-time updates of the user's registered cards can be provided notefor more information, see server interaction modify and update the card's status by utilizing the push notification feature of the test tool navigate to the push notification tab ensure that the correct private key is uploaded and the same card as in the add to wallet tab is selected copy the ref id value from the add to wallet tab and paste it into ref id field in the push notification tab in the status field, enter one of the following card states expired, redeemed, held, suspended, or deleted the current state is set to active then, click the request push notification button check the card in the samsung wallet app to confirm the change tokenize card data and implement the add to samsung wallet button to your service optional notethis step is optional, but if you want to learn how to integrate the add to samsung wallet button into your services like an android app, web app, or email, you can follow these steps the samsung wallet partners site provides generated add to samsung wallet scripts for each wallet card you create you can simply copy and paste these scripts into your partner apps web and android or include them in emails/mms messages to implement the add to wallet button, follow these steps go to the [add to wallet script guide] section of the card you created click show to view the available scripts and then copy the appropriate script for your service develop a program that can generate tokenized card data cdata the cdata represents the actual content of the wallet card and comes in different formats depending on the card type you can check the cdata generation sample code for reference the cdata is derived from the card data, which is in json format for testing purposes, you can utilize the generated json from the test tool follow the implementing atw button guide to determine where to incorporate the generated cdata and gain further insights into this process you're done! congratulations! you have successfully achieved the goal of this code lab topic now, you can utilize the add to samsung wallet service by yourself! to learn more about samsung wallet, visit developer samsung com/wallet
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 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 example https //a swallet link/atw/v3/1656147182764415319#clip?cdata=eyjjdhkioijkv1qilcjhbgcioijsinrpbwvzdgftcci6imnyzwf0zwqgdgltzsisinbhcnruzxjjrci6inbhcnruzxigsuqifq … … … … dn0_oz3xcr0juq3mlszliutxfotewnz0mqj7kinjysnm5xfwqt5vcn20peebelgux8vjxly4_9g4bhq-hd4o9poyutuawew yzdlmtfho -nycel3t0yznzad2kck_hrtwigeerhlgn6ydaq_fpfdslxsa3zjtnpg3wcuqew5cidpbpfswbqlropqepnawg5nlm3dkaa4a1dzazmbsr1bgzhrh_viknx3cy5mo0jnbexl_yiz5_wb379uyswumqipitzvg2ijyvfht17i4 data fetch link in cases involving sensitive data or when providing static links, data fetch link method is highly recommended links using this approach include only a unique reference id, and wallet cards are added by querying data through get card data path as specified in partner portal the name data fetch link has been changed from slim data flow please be aware that if the link is exposed to unintended users, it can be exploited please prepare the integration with this in mind it is crucial to ensure that the refid, used for a reference value, is generated in a manner that is not easily deducible by potential attackers type value description url https //a swallet link/atw/v3/{certificateid}/{cardid}#clip?pdata={pdata} path parameters certificateid string required certificate identifier based on a csr during onboarding 4 digits alphanumeric * must be generated from partner portal cardid string required wallet card identifier * it must be generated from partners portal hash path parameters #clip string required parameters for the hash link query parameter pdata string required unique id defined by content providers this has identification for each user's wallet card contents * for secure transactions, a reference id refid must be in a form that cannot be inferred example https //a swallet link/atw/v3/ymtt/1656147182764415319#clip?pdata=sighcziwm9g provider-initiated api register card api this is an api that allows partners to provide wallet cards to users request payload must include user information then the user device is notified of card registration through a push notification card data specification card id {card id} is an id issued when the partner manager signs up for partner services and register the wallet card they want to service refer to partner onboarding guide document for details cdata actual payload data in basic json format to communicate between partners and samsung wallet see the details on the below sheet card data token the specific wallet card data mentioned as cdata must be secured in jwt json web token format see a chapter security for details request type value description method post url /atw/v1/cards/{cardid} headers authorization string 1024 required credential token the token can have prefix "bearer" as an authorization type i e , bearer * see authorization token x-smcs-partner-id string 32 required partner id x-request-id string 32 required request identifier random generated uuid string x-smcs-cc2 string 2 required country code iso-3166-1 alpha-2 of user account path parameters cardid string 32 required wallet card identifier granted from partner portal body parameters cdata object 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 * see the chapter security for more details payload object card object required wallet card object card type string 16 required wallet card type *see wallet cards card subtype string 16 required wallet card sub type *see *wallet cards card data[] array of object required wallet card data container data[] refid string 32 required a unique content identifier defined by the content provider data[] createdat long 13 required data creation timestamp epoch timestamp in milliseconds *utc±00 00 data[] updatedat long 13 required data update timestamp epoch timestamp in milliseconds *utc±00 00 data[] language string 8 required default card language code e g en, ko data[] attributes object required container of attributes data[] attributes {fields} required attributes fields by card type *see wallet cards data[] localization[] array of object optional container of localizationed language*see wallet cards localization[] language string 8 required multilingual contenct language code e g en, ko localization[] attributes {fields} for displaying a given language, ‘data[] attributes’ can be replaced by localized versions *see wallet cards account object conditional user account object account type string required type of user identifiere g phonenumber, email account value string required user identifier example success * example card object { "card" { "type" "ticket", "subtype" "movies", "data" [{ "refid" "ref-20230304-001", "createdat" 1612660039000, "language" "en", "attributes" { "title" "samsung wallet", "mainimg" "https // /main png" *refer to wallet cards }, "localization" [{ "language" "ko", "attributes" { "title" "삼성 월렛" } }] }] }, "account" { "type" "phonenumber", "value" "+821012345678” } } * example post /atw/v1/cards/1656147182764415319 [headers] authorization eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjg1o x-smcs-partner-id partner-id-0001 x-request-id req-202303140003 x-request-cc2 kr [payload] { “cdata” “eyjjdhkioijkv1qilcjhbgcioijsinrpbwvzdgftcci6imnyzwf0z…” } response type value description http status 200 ok payload n/a example 200 ok result http status code description 200 200 ok 400 400 bad request requests cannot or will not be processed the request due to something that is perceived to be a client error 401 401 unauthorized authorization token is invalid or expired 500 500 internal server error 503 503 service unavailable
Develop Samsung Wallet
docwallet card creation in general, wallet card creation and modification are possible through the ‘wallet partners portal' however, a server api is provided for cases where it is necessary to manage a large number of cards cards created through api can also be checked and managed in the same way on the ‘wallet partners portal' changes to each card status can be processed at the ‘wallet partners portal', and information on how to change them should be checked through the partner server portal guide the description of each state is as follows state description draft when a wallet card is created for the first time, it becomes a “draft” state in this state, all setting values can be modified verifying in order for the card to launch and activate, it must go through the verification step the “verifying” state is a step in which the administrator requests approval in order to be verified in order to be verified, at least one csr must be registered and general information must be configured rejected the administrator registers the reason for rejection when rejecting the launched wallet card it is sent to the partner by email from the system, including the reason for rejection partners can apply for launch again by checking the reason for rejection and modifying the wallet card information active the administrator has approved partner’s requests the card is activated, and the activation cannot be canceled when the card is activated, it is made visible to the user blocked the activated card has been blocked this function can only be performed by the administrator for reference, the “testing mode” is maintained on after the card is created, and it is impossible to turn on the “testing mode” again after the “testing mode” is turned off even if the card is active, if the testing mode is on, the service is not normal the testing mode must be changed to off it is now possible to add wallet cards to a user's wallet wallet cards are added as described in 'add to samsung wallet', but in special cases, wallet cards can be added automatically only to allowed partners without user interaction api guidelines 'adding wallet card templates' defines interfaces for providers to conveniently create wallet cards to samsung wallet the generated wallet card templates can be managed for updates using 'updating wallet card templates' authorized partners can add wallet cards to users directly from the partner server using 'adding wallet cards' below [service domain] environment domain public domain https //tsapi-card walletsvc samsung com adding wallet card templates this chapter describes how to create wallet card to samsung wallet [request] type value description method post url /partner/v1/card/template headers authorization string 1024 required credential token the token can have prefix bearer" as an authorization type i e , bearer <credentials> x-smcs-partner-id string 32 required partner id x-request-id string 32 required request identifier random generated uuid string x-smcs-cc2 string 2 required country code iso-3166-1 alpha-2 of user account body parameters ctemplate object required tokenized card template actual payload data in basicjson format to communicate betweenpartners and samsung wallet this must be secured in jwt json web token format * see the chapter security for more details payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id unique value for each template created by a partner this value is set to a number of 19 digits or less cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 required main headquarters location code refer to iso-3166-1 alpha-2 for the country code cardtemplate cardtype string 100 required template card type refer to wallet cards cardtemplate subtype string 100 required template card sub type refer to wallet cards cardtemplate designtype string 100 optional the value that defines the design type of the wallet card refer to wallet cards cardtemplate applogoimg string 200 optional banner logo image url the maximum size of that image is 1024*1024e g http //www yourdomain com/banner_logo_image png cardtemplate saveinserveryn string 1 optional sets whether to save the card data this value can only be set in the ‘id card’ type cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate nonetworksupportyn string 1 optional sets whether to support to openthe wallet card under 'no network' status this feature cannot be modified after the wallet card is approved either 'y' or 'n' * default 'n' cardtemplate sharebuttonexposureyn string 1 optional sets whether to support to sharing function this feature cannot be modified after the wallet card is approved either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional if this value is set, user authentication is required when using the card, to protect the user's sensitive information either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional this value is screen capture prevention flag whether the contents view prevents screen capture cardtemplate category string 20 optional this item can only be set if the card type is “generic” set the category to get more detailed statistical information e g parking_pass, membership, reservations, insurance, health, receipt, coupon_stamp, note, photo, others cardtemplate prtnrcarddata string 1000 optional partner url of <get card data> check the url format below and implement api according to uri refer to partner server api specification e g https //yourdomain cardtemplate prtnrcardstate string 1000 optional partner url of <get card state> check the url format below and implement api according to uri refer to partner server api specification e g https //yourdomain cardtemplate prtnrmempoint string 1000 optional partner url of <get membership point> cardtemplate cardmetacp string 1000 optional partner url of <get card meta cp> cardtemplate getfulfillmentlist string 1000 optional partner url of <get fulfillment list> cardtemplate prtnrbalance string 1000 optional partner url of <get card balance> cardtemplate state string 15 optional when creating a card, it can be used to create the card's state as a “verifying” state rather than a “draft” state you can only choose “draft” or verifying”* default 'draft' cardtemplate desc string 500 optional description example * example card template object { "prtnrid" "4083254626439156160", "templaterefid" "123456781864545365", "title" "coupon", "countrycode" "kr", "cardtype" "coupon", "subtype" "others", "nonetworksupportyn" "n", "sharebuttonexposureyn" "y" } * example post /partner/v1/card/template [headers] authorization eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjg1o x-smcs-partner-id partner-id-0001 x-request-id req-202303140003 x-request-cc2 kr [payload] { "ctemplate" "eyjjdhkioijkv1qilcjhbgcioijsinrpbwvzdgftcci6imnyzwf0z…" } [response] type value description http status 200 ok payload cardid wallet card id example 200 ok { "cardid" "3hdpejr6qi380", "resultcode" "0", "resultmessage" "success" } [result]] http status code description 200 200 ok 400 400 bad request requests cannot or will not be processed the request due to something that is perceived to be a client error 401 401 unauthorized authorization token is invalid or expired 500 500 internal server error 503 503 service unavailable updating wallet card templates wallet card tmplates updated through api can also be checked and managed in the same way on the ‘wallet partners portal' partners can manage all wallet cards they have created [request] type value description method post url /partner/v1/card/template?cardid={card id} headers authorization string 1024 required credential token the token can have prefix "bearer" as an authorization type i e , bearer <credentials> x-smcs-partner-id string 32 required partner id x-request-id string 32 required request identifier random generated uuid string x-smcs-cc2 string 2 required country code iso-3166-1 alpha-2 of user account path parameters n/a query parameter card id string 32 required wallet card identifier granted from partner portal * it exists when updating a specific card template body parameters ctemplate object required tokenized card template actual payload data in basic json format to communicate between partners and samsung wallet this must be secured in jwt json web token format * see the chapter security for more details payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate cardid string 32 required cardid received a response when creating a card cardtemplate templaterefid string 19 required partner template id unique value for each template created by a partner this value is set to a number of 19 digits or less cardtemplate title string 32 optional wallet card name cardtemplate countrycode string 2 optional main headquarters location code refer to iso-3166-1 alpha-2 for the country code cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url the maximum size of that image is 1024*1024 cardtemplate saveinserveryn string 1 optional sets whether to save the card data this value can only be set in the ‘id card’ type cardtemplate nonetworksupportyn string 1 optional sets whether to support to openthe wallet card under 'nonetwork' status this featurecannot be modified after thewallet card is approved either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional sets whether to support to sharing function this feature cannot be modified after the wallet card is approved either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional if this value is set, user authentication is required when using the card, to protect the user's sensitive information either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional this value is screen capture prevention flag whether the contents view prevents screen capture cardtemplate category string 20 optional this item can only be set if the card type is “generic” set the category to get more detailed statistical information e g parking_pass, membership, reservations, insurance, health, receipt, coupon_stamp, note, photo, others cardtemplate prtnrcarddata string 1000 optional partner url of <get card data>check the url format below and implement api according to uri refer to partner server api specification e g https //yourdomain cardtemplate prtnrcardstate string 1000 optional partner url of <get card state>check the url format below and implement api according to uri refer to partner server api specification e g https //yourdomain cardtemplate prtnrmempoint string 1000 optional partner url of <get membership point> cardtemplate cardmetacp string 1000 optional partner url of <get card meta cp> cardtemplate getfulfillmentlist string 1000 optional partner url of <get fulfillment list> cardtemplate prtnrbalance string 1000 optional partner url of <get card balance> cardtemplate state string 15 optional if the card status is “draft”, you can only select “verifying” cardtemplate testingmodeoff string 1 optional this value can be set only when the card status is active normal service is possible only when the testing mode is changed to off * default ‘n’ cardtemplate desc string 500 optional description example *example card template object { "prtnrid" "4083254626439156160", "cardid" "3hdpejr6qi380", "templaterefid" "123456781864545365", "title" "coupon", "countrycode" "kr", "nonetworksupportyn" "n", "sharebuttonexposureyn" "y" } * example post /partner/v1/card/template?cardid=3hdpejr6qi380 [headers] authorization eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjg1o x-smcs-partner-id partner-id-0001 x-request-id req-202303140003 x-request-cc2 kr [payload] { "ctemplate" "eyjjdhkioijkv1qilcjhbgcioijsinrpbwvzdgftcci6imnyzwf0z…" } [response] type value description http status 200 ok payload cardid wallet card id example 200 ok { "cardid" "3hdpejr6qi380", "resultcode" "0", "resultmessage" "success" } [result]] http status code description 200 200 ok 400 400 bad request requests cannot or will not be processed the request due to something that is perceived to be a client error 401 401 unauthorized authorization token is invalid or expired 500 500 internal server error 503 503 service unavailable adding wallet cards a typical addition to wallet card is triggered by user interaction, such as pressing the 'add to wallet' button or link however, if the user consents, we support automatically adding a wallet card to the user for a special purpose this is an api that allows partners to provide wallet cards to users the request payload must contain information about the target to which the card is to be added this information may be related to your account, or it may be information about a card that is already registered then the user device is notified of card registration through a push notification partners wishing to use this api must be granted permission by an administrator [card data specification] card id {card id} is an id issued when the partner manager signs up for partner services and register the wallet card they want to service refer to partner onboarding guide document for details cdata actual payload data in basic json format to communicate between partners and samsung wallet see the details on the below sheet card data token card data token the specific wallet card data mentioned as cdata must be secured in jwt json web token format see a chapter security for details [request] type value description method post url /{cc2}/atw/v1/cards/{card id} headers authorization string 1024 required credential token the token can have prefix "bearer" as an authorization type i e , bearer <credentials> x-smcs-partner-id string 32 required partner id x-request-id string 32 required request identifier random generated uuid string x-smcs-cc2 string 2 required country code iso-3166-1 alpha-2 of user account path parameters cc2 string 2 conditional country code iso-3166-1 alpha-2 * required if using public domain card id string 32 required wallet card identifier granted from partner portal body parameters cdata object 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 * see the chapter security for more details payload object card object required wallet card object card type string 16 required wallet card type *see wallet cards card subtype string 16 required wallet card sub type *see wallet cards card data[] array of object required wallet card data container data[] refid string 32 required a unique content identifier defined by the content provider data[] createdat long 13 required data creation timestamp epoch timestamp in milliseconds *utc±00 00 data[] updatedat long 13 required data update timestamp epoch timestamp in milliseconds *utc±00 00 data[] language string 8 required default card language code e g en, ko data[] attributes object required container of attributes data[] attributes {fields} required attributes fields by card type*see wallet cards data[] localization[] array of object optional container of localizationed language*see wallet cards localization[] language string 8 required multilingual contenct language code e g en, ko localization[] attributes {fields} for displaying a given language, ‘data[] attributes’ can be replaced by localized versions *see wallet cards account object conditional user account object account type string 16 required type of user identifier e g phonenumber, email account value string 64 required user identifier example * example card object { "card" { "type" "ticket", "subtype" "movies", "data" [{ "refid" "ref-20230304-001", "createdat" 1612660039000, "language" "en", "attributes" { "title" "samsung wallet", "mainimg" "https // /main png" *refer to wallet cards }, "localization" [{ "language" "ko", "attributes" { "title" "삼성 월렛" } }] }] }, "account" { "type" "phonenumber", "value" "+821012345678” } } * example post /atw/v1/cards/1656147182764415319 [headers] authorization eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjg1o x-smcs-partner-id partner-id-0001 x-request-id req-202303140003 x-request-cc2 kr [payload] { "cdata" "eyjjdhkioijkv1qilcjhbgcioijsinrpbwvzdgftcci6imnyzwf0z…" } [response] type value description http status 200 ok payload n/a example 200 ok [result]] http status code description 200 200 ok 400 400 bad request requests cannot or will not be processed the request due to something that is perceived to be a client error 401 401 unauthorized authorization token is invalid or expired 500 500 internal server error 503 503 service unavailable resources wallet card templates & attributes boarding pass card type boardingpass sub type airlines, train , buses type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “boardingpass”* required when creating a template cardtemplate subtype string 100 conditional select from these values “airlines”, “trains”, “buses”* required when creating a template cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode off either 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240 "templaterefid" "2138240408282551312", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "boardingpass", "subtype" "airlines", "applogoimg" "http //www yourdomain com/banner_logo_image png", "nonetworksupportyn" "n" "sharebuttonexposureyn" "y" "privacymodeyn" "n" "preventcaptureyn" "n" } } event ticket card type ticket sub type performances, sports, movies, entrances, others type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “ticket”* required when creating a template cardtemplate subtype string 100 conditional select from these values performances, sports, movies, entrances, others* required when creating a template cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode offeither 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240", "templaterefid" "2138240408282551314", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "ticket", "subtype" "entrances", "applogoimg" "http //www yourdomain com/banner_logo_image png", "nonetworksupportyn" "n", "sharebuttonexposureyn" "n", "privacymodeyn" "n", "preventcaptureyn" "n" } } coupon card type coupon sub type others type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “coupon”* required when creating a template cardtemplate subtype string 100 conditional this value set “others”* required when creating a template cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode off either 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240", "templaterefid" "2138240408282551313", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "coupon", "subtype" "others", "applogoimg" "http //www yourdomain com/banner_logo_image png", "nonetworksupportyn" "n", "sharebuttonexposureyn" "y", "privacymodeyn" "n", "preventcaptureyn" "n", } } gift card card type giftcard sub type others type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “giftcard”* required when creating a template cardtemplate subtype string 100 conditional this value set “others”* required when creating a template cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode off either 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240", "templaterefid" "2138240408282551315", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "gift", "subtype" "others", "applogoimg" "http //www yourdomain com/banner_logo_image png", "nonetworksupportyn" "n", "sharebuttonexposureyn" "y", "privacymodeyn" "n", "preventcaptureyn" "n", } } loyalty card type loyalty sub type others type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “loyalty”* required when creating a template cardtemplate subtype string 100 conditional this value set “others”* required when creating a template cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode off either 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240", "templaterefid" "2138240408282551316", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "loyalty", "subtype" "others", "applogoimg" "http //www yourdomain com/banner_logo_image png", "nonetworksupportyn" "n", "sharebuttonexposureyn" "n", "privacymodeyn" "n", "preventcaptureyn" "n" } } id card card type idcard sub type employees, nationals , drivers, others type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “idcard”* required when creating a template cardtemplate subtype string 100 conditional select from these values employees, nationals , drivers,others* required when creating a template cardtemplate saveinserveryn string 2 optional either 'y' or 'n'* default 'y' cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode off either 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240", "templaterefid" "2138240408282551317", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "idcard", "subtype" "employees", "applogoimg" "http //www yourdomain com/banner_logo_image png", "saveinserveryn" "y", "nonetworksupportyn" "n", "sharebuttonexposureyn" "y", "privacymodeyn" "n", "preventcaptureyn" "n" } } pay as you go card type payasyougo sub type evcharges type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “payasyougo”* required when creating a template cardtemplate subtype string 100 conditional this value set “evcharges”* required when creating a template cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate sharebuttonexposureyn string 1 optional either 'y' or 'n'* default 'y' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode offeither 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240", "templaterefid" "2138240408282551318", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "payasyougo", "subtype" "evcharges", "applogoimg" "http //www yourdomain com/banner_logo_image png", "nonetworksupportyn" "n", "sharebuttonexposureyn" "y", "privacymodeyn" "n", "preventcaptureyn" "n" } } generic card card type generic sub type others type value description payload object cardtemplate object required wallet card template object cardtemplate prtnrid string 32 required partner id cardtemplate templaterefid string 19 required partner template id cardtemplate title string 32 required wallet card name cardtemplate countrycode string 2 conditional main headquarters location* required when creating a template cardtemplate cardtype string 100 conditional this value set “generic”* required when creating a template cardtemplate subtype string 100 conditional this value set “others”* required when creating a template cardtemplate designtype string 100 optional select from these values “generic 01”, “generic 02”, “generic 03”* default “generic 01” cardtemplate prtnrapppckgname string 128 optional app package name cardtemplate applogoimg string 200 optional banner logo image url cardtemplate nonetworksupportyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate privacymodeyn string 1 optional either 'y' or 'n'* default 'n' cardtemplate preventcaptureyn string 1 optional screen capture prevention flag cardtemplate category string 20 optional select from these values “parking_pass”, “membership”, “reservations”, “insurance”, “health”, “receipt”, “coupon_stamp”, “note”, “photo”, “others” cardtemplate state string 15 optional wallet card's state* default 'draft' cardtemplate testingmodeoff string 1 optional testmode offeither 'y' or 'n'* default ‘n’available only when updating templates cardtemplate desc string 500 optional description { "cardtemplate" { "prtnrid" "4082825513190138240", "templaterefid" "2138240408282551319", "title" "wallet card title", "prtnrapppckgname" "prtnrapppckgname", "countrycode" "us", "desc" "desc", "cardtype" "generic", "subtype" "others", "applogoimg" "http //www yourdomain com/banner_logo_image png", "designtype" "generic 02", "nonetworksupportyn" "n", "category" "membership", "privacymodeyn" "n", "preventcaptureyn" "n" } }
tutorials mobile
blogwallet card which you must create and launch within the samsung wallet portal. after successfully launching the card, you can create an “add to wallet” link for it. prerequisites before you can create wallet cards for samsung wallet, complete the samsung wallet partner registration and onboarding process, including encryption setup. after onboarding, you receive an email with your public key and signed security certificate. keep this information in a safe place. important your company can only obtain partnership for a single samsung account. store your private key securely, as it is needed for wallet card management. your encryption settings cannot be modified without administrator approval. creating wallet cards samsung wallet supports the following wallet card types: boarding pass event ticket coupon gift card loyalty card id card create your wallet card at the samsung wallet portal. you can create as many cards as you need. the samsung wallet portal also allows you to manage your cards and monitor their performance. testing wallet cards use the “add to wallet” test tool to test the card at any time, before or after launching it: in the samsung wallet portal, enable testing mode for the card you want to test. skip this step if you have already launched the card. on your samsung device, go to the “add to wallet” test tool and sign in with your samsung account. select the card from the list and provide test data in the appropriate fields. in the “partner’s private key” field, paste your decrypted private key. this must be the same private key that was used during onboarding. noteif your private key is encrypted, you must first decode it with the ssl command. an encrypted key starts with the following text: -----begin encrypted private key----- once decoded, the key starts with the following text: -----begin private key----- 5. tap the “add to samsung wallet” button to add the card to samsung wallet on your device. for more information about testing wallet cards, see “add to wallet” test tool. launching wallet cards when you are ready to make the wallet card accessible to users, click “launch” to start the verification process. launching a card cannot be canceled. figure 1: wallet card launched the samsung wallet administrator reviews the card and approves or rejects it. if your card is rejected, check the rejection email for the reason. modify the card to address the issue and launch it again. for more information about wallet card verification, see launch wallet cards (verifying status) and launch wallet cards (rejected status). implementing “add to wallet” links after launching your wallet card, create a link that users can click to add the content to their samsung wallet. to include the card data in tokenized form, use the following url format: https://a.swallet.link/atw/v1/{card id}#clip?cdata={cdata token} where: {card id} path parameter is the unique identifier for the wallet card in the samsung wallet portal. #clip hash parameter is case-sensitive. cdata query parameter contains the encrypted card data in jwt format. for more information, see the "cdata token generation" section below. if the encrypted card data is longer than 2048 bytes, or you do not want to include the tokenized data in the url, store and reference the card data on your server. create the url in the following format: https://a.swallet.link/atw/v1/{card id}#clip?pdata={reference id} where: {card id} path parameter is the unique identifier for the wallet card in the samsung wallet portal. #clip hash parameter is case-sensitive. pdata query parameter is the unique identifier for the card data stored on your server. for more information on “add to wallet” links, see add to wallet interface. cdata token generation the card data in basic json format must be provided as a jwt (json web token). for token generation details, see security. you can also study the cdata generation sample code. to ensure your cdata token is valid, keep the following requirements in mind: pay attention to the mandatory fields in the card object. all timestamps are utc epoch time in milliseconds. card data attributes vary based on the card type. for detailed card data specifications, see wallet cards. your private key must match the key used for the security certificate signed by samsung. if you are using the correct private key, the following commands generate the same hash: $ openssl rsa -noout -modulus -in partner.key | openssl md5 $ openssl x509 -noout -modulus -in partner.crt | openssl md5 generated jwt tokens expire in 30 seconds. the “add to wallet” link must be used within this time. otherwise, you must generate a new token and new link. next steps to integrate the “add to wallet” feature as a button in your application or website, see implement the button. you can update the information on a card that has been stored in a user’s samsung wallet by communicating between your server and the samsung server. for information, see server interaction. if you have any questions or face difficulties implementing the content in this article, you can contact samsung developer support. related resources samsung wallet documentation integrate “add to samsung wallet” button into partner services code lab
M. A. Hasan Molla
Develop Samsung Wallet
docwallet card into your samsung wallet application, such as a boarding pass, ticket, coupon etc push notification feature for testing push notification scenarios for the samsung wallet application partners can access the test site using the address below server url prod https //partner walletsvc samsung com/addtowallettest sign in partners can sign in with their samsung account on a mobile device by clicking the "sign in" button "add to wallet" test partners can test their wallet cards by entering the information for each area, as shown below input partner's private key input the private key of a valid partner you want to test the private key can only be imported based on pkcs8 / algorithm rs256 select partner’s wallet card choose a partner card from the list to test it test for add to wallet complete entering the card data and click "add to samsung wallet" button each type of wallet card details is described in the wallet cards section
Develop Samsung Wallet
docwallet cards is an e-wallet service that allows customers using samsung devices to add various digitized contents to samsung wallet users can add their tickets, coupons, boarding passes, and other types of data into samsung wallet using an "add to wallet" link given in online channels like application notifications, web pages, or email and social media messages this document describes how to implement samsung wallet cards service features from the integration partner's point of view integration steps partner account a samsung account is necessary to manage your own service for samsung wallet the account is used to sign up and sign in to the partners portal onboarding the interaction keys are issued from a service onboarding step the partner manager should fill basic information of the company and card details on partner portal, choose the card type and template that fit their contents, which will then provide keys such as card id and partner id to ensure safe data communication, make sure to prepare security key factors samsung will sign the provided csr then deliver certificates used to create the secured data see the document 'samsung wallet partner onboarding guide' for onboarding details see the chapter security for more details add to samsung wallet partner managers have to configure 'add to samsung wallet' button on their contents the button must configure the link to the promised web page with the specific format the linked page will initiate a basic process of storing cards on samsung wallet service see the chapter implement the button for more details every digitized contents on 'add-to-wallet' link is identified by a reference id refid if the same reference id is reused, the existing card will be updated with new data without notice see the chapter "add to wallet" interfaces for more details samsung wallet app won't cache every resource no-cache web contents must be used for interfaces such as cdn in other words, the app won't consider work with '304 not modified' management the stored wallet card contents on samsung wallet can be updated to predefined states if partners want to manage the contents on samsung wallet, interaction between samsung and partner servers is necessary see the chapter server interaction for more details service flow this chapter describes how to bring users' digitized content to samsung wallet once partner service onboarding is complete and card templates are ready, it is possible to add contents such as boarding passes, coupons and tickets into samsung wallet see the service flow below preparation the contents intended to store on samsung wallet must be tokenized as jwt json web token when using data transmit link considering what environments the button will be displayed in such as app, web, mms or email when you plan to integrate this service see the chapter implement the button for more details add to wallet once users who want to store contents click or tab the linked button, it initiates the process of adding to samsung wallet see "add to wallet" interfaces for more details partners can consider the option*data fetch link* when they provide full content data samsung will notify the result through server interface named send card state this works as a callback for 'add to wallet' process delivering events and country code for the user wallet card for interactions after storing contents on samsung wallet, server interfaces are needed which is defined on the chapter server interaction update wallet cards if the wallet card contents should be updated by partners, they must call samsung server api path parameter 'cc2' must be set to the value brought from callback named 'send card state' api which includes 'added' event see a chapter samsung server api for more details update notification is for single content cancel notification is for calling off every user's wallet card contents related to a specific event get card data payload has the same format of card information as the one of 'add to wallet' send card state can also have an event 'deleted' to notify a wallet card deletion on samsung wallet by users card states wallet cards have several states for each content provider’s notifications and user actions the state diagram below describes wallet card states from beginning to end state diagram
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 wallet portal on-boarding information please review the attached partner on-boarding guide for the samsung wallet portal the rp partner needs registration information on the wallet portal wallet portal currently offers 'add to wallet' & ‘verify with wallet’ functionality to rp partners please proceed with the registration by referring to the url of the developer site below connect to partner portal the wallet partners portal access is via url below connect to the wallet partners portal partner onboarding partner on-boarding details are accessed via url below partner onboarding manage wallet cards to use the online rp function, you need to create a card as a relying party type refer to the manage wallet cards overall managing process the following image illustrates the process of managing samsung wallet cards create wallet cards draft status partners can create and manage their wallet cards with this step-by-step guide manage wallet cards partners can manage all registered wallet cards partners can edit wallet cards and check their status general information the general information page allows the partner to enter administrative details to manage their cards, as well as to define common parameters for the samsung wallet item description testing mode all data generated during testing mode is periodically deleted be sure to turn off the 'testing mode' setting after the test is over wallet card name representative title of the wallet card wallet card id unique wallet card domain name automatically generated partner app package name partner app package name wallet card template pre-defined partner’s wallet card template type > sub type > design type wallet card custom setting type authentication issuer set the authentication issuer for the relying party service to be provided as this wallet card please select authentication issuers from the identity provider groups only authentication issuers with the same “service location” as the relying party service are displayed ※ the identity provider of the “authentication issuer”is supported depending on the "service location" set partner get card data url through which a partner receives a card data inquiry api callif a partner uses this api, enter the url otherwise, leave it blank ※ the attribute could be activated with the approval of a manager partner send card state url through which a partner receives a card data inquiry api callif a partner uses this api, enter the url otherwise, leave it blank ※ the attribute could be activated with the approval of a manager samsung server ips samsung wallet server ips which need to be allowed at the partner’s firewall separately described for inbound and outbound calls service location select a regional limit for the wallet card if there was no selected location, the wallet card is shown in all locations if the specified location was selected, the wallet card is shown only in the selected location users can 'verify with samsung wallet' only in service locations where the wallet service is provided ※ the identity provider of the “authentication issuer” is supported depending on the "service location" set main headquarters location check to set it as a 'main location' as the company's main service country head office for creating and proceeding with wallet cards, notification e-mails such as wallet card approval requests are sent only to the selected main location wallet card data save in server set whether to store wallet card data in the server to protect personal information if the card has sensitive information, you can contact the developer support team not to save it description description of the wallet card select template partners can choose from various types of wallet card templates optimized for partners such as boarding pass, ticket, coupon, and digital id ※ for rp partners select "relying party type > other sub type" to set the relying party wallet card partners can select the type of wallet card needed to register from the 'select wallet card template' pop-up first, select the wallet card type and then select the wallet card sub type to select one of the templates belonging to it wallet card custom setting you must set the attributes of the "wallet card custom setting" according to the wallet card ttype you selected ※ for rp partners the "authentication issuer" attribute is a unique property of the relying party card the identity provider of the authentication issuer is supported depending on the "service location" set e g if service location is in the us, the authentication issuer field only supports an identity provider belonging to the us when the parent hierarchy value is checked, its children values created later are automatically checked in the united states, the authentication issuer is the state government, and the driver's license can be understood as an mdl mobile driver's license view wallet card partners can view all the registered information, edit and delete the wallet card launch wallet cards verifying status partners can launch and activate cards you can activate a card by clicking the launch button once a card is launched, the button text changes to 'launched' the activation cannot be canceled when a card is launched, its status changes to 'verifying', and then to ‘active’ after administrator approval launch wallet cards rejected status if the wallet card is rejected after launching, partners can modify and re-launch the administrator registers the reason for rejection when rejecting a launched wallet card partners will receive an email from the system, including the reason for rejection partners can apply for launching again by checking the reason for rejection and modifying the wallet card information testing mode partners can test a card internally to make sure everything works before officially release to the users by default, the ‘testing mode’ option is enabled all data generated in testing mode is periodically deleted card exposure is not affected even when the testing mode is enabled be sure to turn off the testing mode after the test is over testing mode on → testing mode off admin approval active status all launched cards are activated after the administrator's approval when a card is launched, its status changes to 'verifying' and then to ‘active’ after administrator approval when the card is activated, it becomes visible to the user verify with samsung wallet integration to integrate the wallet, you need to run the ‘verify with samsung wallet’ script into your system the verify with samsung wallet script is available for both web and android platforms each system has a different composition to implement the verify with samsung wallet button, follow the steps below in order create tokenized card data cdata card data is the actual content data of wallet card and it has several format based on card type please refer to generate_cdata sample code for detail copy the sample verify with samsung wallet script from partner portal’s wallet card page and replace cdata with the data token created above apply the script to your system please see web_integration sample code and app_integration sample code for detail below are ‘verify with samsung wallet’ script guide in partner portal to integrate the ‘verify with samsung wallet’ you may need some base data you can find this base data and other necessary information on the partner portal and the wallet api spec you can also add image beacon in the script for tracking effect analysis sequence/flow diagram this section describes the flows that are two currently supported the app2app and web2app ones rp partners should select the model based on their integration preference same-device app2app via native wallet sdk diagram with numbered flows explanation of each flow 2 load button resources the verify with samsung wallet integration and the sample code are both supported 3 check service available devices this is the process of checking whether the device supports the verify with samsung wallet function rp partners can implement it by referring to the provided sample code 4 show button with web link you can implement it by referring to the provided sample code refer to the data transmit link 6 tokenize card data as jwt this step generates cdata and card data token refer to https //developer samsung com/wallet/api/implement-the-button html refer to the wallet card and relying party 7 verify with samsung wallet link the link will invoke the walletapp using applink technology in the meantime, the app2app sdk makes a direct connection between the walletapp and partnerapp 10 getmdocrequestdata deviceengagementbytes the walletapp makes deviceengagementbytes according to the iso-18013-5 and send it to the partnerapp 11 sendmdocrequestdata sessionestablishment the partnerapp build sessionestablishmentbytes iso-18013-5 and encrypt it with hkdf iso-18013-5, 9 1 1 5 cryptographic operations 13 sendmdocresponse encryptedresponse the walletapp sends an encrypted iso-18013-5 response payload to the partnerapp same-device web2app via wallet api diagram with numbered flows explanation of each flow 2 load button resources verify with samsung wallet integration and the sample code both supported 3 check service available devices this is the process of checking whether the device supports the verify with samsung wallet function rp partners can implement this by referring to the provided sample code 4 show button with web link rp partners can implement this by referring to the provided sample code refer to the data transmit link 6 tokenize card data as jwt this step generates cdata, card data token refer to https //developer samsung com/wallet/api/implement-the-button html refer to the wallet card and relying party 7 verify with samsung wallet link the link will invoke the walletapp using the applink technology 10 transfer deviceengagement the walletapp makes deviceengagementbytes according to the iso-18013-5 and sends it to the partnerserver through the wallet server 11~12 request key api send key the wallet backend server converts the data received from the request and cardid information into jwt jws + jwe and delivers it to the partner server the partner server must decrypt the jwt jws + jwe data again the partnerapp build sessionestablishmentbytes iso-18013-5 and encrypt it with hkdf iso-18013-5, 9 1 1 5 cryptographic operations the partner server must create and transmit the data fields required for authentication as jwt jws + jwe in response to the wallet backed server partners should refer to the code links below for encryption, decryption, requiredata 14 send mdoc response the walletapp sends an encrypted iso-18013-5 response payload to the partnerserver through the wallet server 15 request auth api send authentication data the authentication data card information received in step 14 is converted into jwt jws+jwe and transmitted to the partner server the partner server must decrypt the jwt jws + jwe data again rp partner can refer to the code links below for decryption, verify cross-device not supported currently, samsung wallet does not support cross-device functionality this functionality will be added soon data transmit link this is how rp partners can create a data transmit link it is a method of safely including tokenized data within the verify with samsung wallet vww link the format of the vww link for this method is as follows the name data transmit link has been changed from typical flow item value description url https //a swallet link/vww/v1/{cardid}#clip?cdata={cdata} path parameters 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 hash path parameters #clip string 5 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 * see the chapter security for more details example https //a swallet link/vww/v1/1656147182764415319#clip?cdata=eyjjdhkioijkv1qilcjhbgcioijsinrpbwvzdgftcci6imnyzwf0zwqgdgltzsisinbhcnruzxjjrci6inbhcnruzxigsuqifq … … … … dn0_oz3xcr0juq3mlszliutxfotewnz0mqj7kinjysnm5xfwqt5vcn20peebelgux8vjxly4_9g4bhq-hd4o9poyutuawew yzdlmtfho -nycel3t0yznzad2kck_hrtwigeerhlgn6ydaq_fpfdslxsa3zjtnpg3wcuqew5cidpbpfswbqlropqepnawg5nlm3dkaa4a1dzazmbsr1bgzhrh_viknx3cy5mo0jnbexl_yiz5_wb379uyswumqipitzvg2ijyvfht17i4 wallet cards refer to the wallet cards this chapter defines wallet card data fields for the attributes object of each wallet card type the structure for configuring wallet cards follows the defined specification configuring the card data in the specified formatted json structure is required see the details for each card type type value description card object card object required card information card type string 16 required wallet card type card subtype string 16 required allet card sub type card data[] array of object required wallet card data containerallows up to 6 objects at once data[] refid string 32 required a unique content identifier definedby the content provider data[] createdat long 13 required data creation timestamp epoch timestamp in milliseconds utc±00 00 data[] updatedat long 13 required data creation timestamp epoch timestamp in milliseconds utc±00 00 data[] language string 8 required default content language code e g , en, ko data[] attributes object required card data attributes * refer to the following chapters for each type data[] attributes {fields} attribute fields by card type data[] localization[] array of object optional information for multilingual support localization[] language string 8 required multilingual content language code e g , en, ko, etc localization[] attributes {fields} for displaying a given language,‘data[] attributes’ can be replaced bylocalized versions * refer to the following chapters for each type example example card object { "card" { "type" "ticket", "subtype" "movies", "data" [{ "refid" "ref-20230304-001", "createdat" 1612660039000, "language" "en", "attributes" { "title" "samsung wallet", "mainimg" "https // /main png" *refer to wallet cards for each type }, "localization" [{ "language" "ko", "attributes" { "title" "삼성 월렛" } }] }] } } to ensure secure card data transmission, it must be tokenized in jwt format for this purpose, partner will need the certificate obtained using the partner's email account when signing up for the partner portal for detailed information on secure data tokenization, partners can refer to the security chapter *image resources provided by urls can be cached therefore, for the image resource to be replaced immediately, the corresponding url path must be changed relying party ‘relyingparty’ cards are used for verifier authentication when partners create the verify with samsung wallet button, they will need to create cdata this is the data spec included when creating the cdata of relayingparty type wallet card type wallet card subtype relyingparty others type value description attributes{fields} 1 logoimage string 256 required url of the logo image the file size must not be greater than 256 kb 2 logoimage darkurl string 256 required url of the logo image the file size must not be greater than 256 kb 3 logoimage lighturl string 256 required url of the logo image the file size must not be greater than 256 kb 4 fontcolor string 8 optional display color of the font during user authentication 5 providername string 32 required display name during user authentication 6 clienttype string 32 required information on whether the client operates as an application or web 7 clientpackagename string 32 required if the client is operating as an app, enter the package name, if it works on the web, enter a service name example { "card" { "type" "relyingparty", "subtype" "others", "data" [ { "refid" "0613001", "createdat" 1686657600000, "updatedat " 1686657600000, "language" "en", "attributes" { "logoimage" "https //samsung com", "logoimage darkurl" "https //dark samsung com", "logoimage lighturl" "https //light samsung com", "fontcolor" "black", "providername" "company name", "clienttype" "app", "clientpackagename" "com companyname app" } } ] } } implementing vww button 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 first, proceed with script composition with the sample script on the partner portal or refer to the integration sample code 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 <script src="https //us-cdn-gpp mcsvc samsung com/lib/wallet-card js" type="text/javascript"></script> 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 <samsung wallet type="vww" authtoken="auth_token" cardid="card_id" cdata="cdata" partnercode="partner_code" buttonid="button_id" buttontype="btnvwsw" rdclickurl="rd_click_url" rdimpressionurl="rd_impression_url"></samsung wallet> button attributes attribute type required description type string y service type default is "atw"• "atw" 'add to samsung wallet' • "vww" verify with samsung wallet' authtoken string y api auth tokenit would be generated on the partners portal cardid string y wallet card identifier* value granted from the partners portal cdata string y encrypted card object json * this field needs to be encrypted * refer to security for more details partnercode string y partner code * value granted from the partners portal buttonid string y dom element id for the "verify with samsung wallet" web button for samsung wallet buttontype string n "verify with samsung wallet" button type ["btnsw" / "btnvwsw", default btnsw] inline string n 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 samsungwallet addbutton { type "vww", authtoken "auth_token", cardid "card_id", cdata "cdata", partnercode "partner_code", targetid "target_id", buttonid "button_id", buttontype "btnvwsw", 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 attribute type required description type string y service type default is "atw"• "atw" 'add to samsung wallet' • "vww" verify with samsung wallet' authtoken string y api auth tokenit would be generated on the partners portal cardid string y wallet card identifier* value granted from the partners portal cdata string y encrypted card object json * this field needs to be encrypted * refer to security for more details partnercode string y partner code * value granted from the partners portal targetid string y dom document object model element id to place the "verify with samsung wallet" web button for samsung wallet buttonid string y dom element id for the "verify with samsung wallet" web button for samsung wallet buttontype string n "verify with samsung wallet" button type ["btnsw" / "btnvwsw", default btnsw] inline string n 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 proceeddefault 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 app2app sdk integration specs description & use rp sdk is an app2app sdk for samsung wallet driver's license service online scenarios this sdk provides an implementation for direct communication between the samsung wallet and partner applications build the settings rpsdk requires additional dependencies with dependencies { implementation "rp-sdk-1 0-release aar" implementation "androidx core core-ktx 1 3 2" implementation "androidx lifecycle lifecycle-runtime-ktx 2 7 0" implementation "androidx lifecycle lifecycle-livedata-core-ktx 2 7 0" implementation "io reactivex rxjava2 rxjava 2 2 21" implementation "io reactivex rxjava2 rxkotlin 2 4 0" implementation "io reactivex rxjava2 rxandroid 2 1 1" implementation "com squareup okhttp3 okhttp 4 11 0" implementation "com google code gson gson 2 10 1" implementation "org bouncycastle bcprov-jdk15to18 1 66" implementation "com nimbusds nimbus-jose-jwt 9 37 3" } androidmanifest xml <manifest xmlns android="http //schemas android com/apk/res/android"> <uses-permission android name="android permission internet" /> <queries> <package android name="com samsung android spay" /> </queries> </manifest> r8 / proguard the specific rules are already bundled into the aar which can be interpreted by r8 automatically sdk method app2app sdk supports one method request signature & parameters of the request method fun request targetpackagename string, requestid string, applink string, onresponselistener onresponselistener? = null parameter name description targetpackagename the pakcage name to connect to requestid a random string to identify each request applink the applink built by samsung mcs server guide onresponselistener a listener to receive each events or requests sample code binding button setonclicklistener { rpclientapis request "com samsung android spay", uuid randomuuid tostring , applink, object rpclientapis onresponselistener { override fun ongetmdocrequestdata deviceengagementbytes bytearray bytearray? { log i tag, "ongetmdocrequestdata $deviceengagementbytes " /** * 1 prepare mdoc request data iso-18013-5 * 2 build sessionestablishmentbytes iso-18013-5 * 3 encrypt it with hkdf iso-18013-5, 9 1 1 5 cryptographic operations **/ return "encryptedsessionestablishmentbytes" } override fun onmdocresponse encryptedresponse bytearray { log i tag, "onmdocresponse $encryptedresponse " /** * 1 decrypt it with hkdf iso-18013-5, 9 1 1 5 cryptographic operations * 2 cbor decode it **/ } override fun onmdocresponsefailed exception exception { log i tag, "onmdocresponsefailed $exception " } } } error code explanation the below exceptions might occur through the onmdocresponsefailed callback exceptions name description rpcommunicationexception this error occurs when the data requested by the listener is incorrect rpconnectionfailedexception this occurs when the app 2 app communication between apps is not working this usually occurs when the target package name is written incorrectly web2app api integration specs the api specifications that need to be implemented by the rp partner are described below called by samsung to the rp partner send key send the wallet application key info and return the data field types requested to the client for authentication of the mdl [request] type value description method post url {partner server url}/rp/v1 0/{cardid}/{refid}/key 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 path parameters cardid string 32 required wallet card identifier * refer to "add to wallet" interfaces for more details 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 * refer to "add to wallet" interfaces for more details 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 jwsheader getdefaultjwsheader final string ver, final string certificateid, final string partnerid { return new jwsheader builder jwsalgorithm rs256 contenttype "auth" customparam "partnerid", partnerid // partner id customparam "ver", ver // version customparam "certificateid", certificateid // partner crt id customparam utc, timeutils toutcepochmillifrom timeutils calculateutclocaldatetimefromnow 0 build ; } public static string generatesignedstringjws final jwsheader jwsheader, final key privatekey, final key publickey, final string payload { try { final jwsobject jwsobj = new jwsobject jwsheader, 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 ; }
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.