Once a template is ready, partners receive an 'Add to Wallet' link. The following contents describe the web link and card data specification by types.
Web link includes identifier for the partner, but also card data in the below URL format.
[Link Format]
https://a.swallet.link/atw/v1/{Card Id}#Clip?cdata={encrypted data}
For backward compatibility, we support also: https://api-card.walletsvc.samsung.com/wlt/{Product Id}/{Card Id}#Clip?cdata={encrypted data}
[Card Data Specification]
#Hash name and query parameters: the hash name is '#Clip' (The first letter is capital)
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.
Example: Card object
{ "card": { "type": "ticket", "subType": "movies", "data": [ { "refId": "ref-20230304-001", "createdAt": 1612660039000, "language": "en", "attributes": { "title": "Parasite", "mainImg": https://../main.png }, "localization": [ { "language": "ko", "attributes": { "title": "Samsung Wallet" } } ] } ] } }
Example: web link
https://a.swallet.link/atw/v1/1656147182764415319#Clip?cdata=eyJjdHkiOiJKV1QiLCJhbGciOiJsInRpbWVzdGFtcCI6ImNyZWF0ZWQgdGltZSIsInBhcnRuZXJJRCI6InBhcnRuZXIgSUQifQ. … … … … Dn0_oZ3xcr0JuQ3mlSzLIUTxFoTewnZ0MQj7kiNjysNm5Xfwqt5vcN20PeebeLgUx8VJXLy4_9G4BHQ-hd4O9POYuTuAWew.YzdlMTFhO -NYCeL3T0YzNzAD2KcK_HrtwIGEErHLGn6ydaq_fpFdSlxsA3ZJtNpg3wcuqEw5cIdpbPFswbQLropqEpNawg5nlm3DKAA4a1dzaZMbSR1BGZHrH_vIKnx3CY5MO0jNBexl_YIZ5_wB379UYSwumQiPiTZVg2IjYvfht17I4
In some cases, the tokenized data exceeds specific character limits on browser can be truncated. In most cases, recommendation is that the JWT don't exceed 2048 bytes.
This chapter proposes a option which contains reference ID(refId) only for the web link. With the unique id, Samsung server attempts inquiring wallet card data in the typical flow data format. For details, see a chapter Get Card Data.
https://a.swallet.link/atw/v1/{Card Id}#Clip?pdata={Reference Id}
pdata: This has identification for each users' wallet card contents called refId. For secure transactions, reference ID must guarantee a form that cannot be inferred.