Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Samsung Pay
docoutbound to partner general contract base url base url for outbound apis to be provided by the partner during the onboarding process security mutual ssl is required common headers header name type validation description request-id uuid required unique identifier for the request partner-id uuid required unique identifier that is provided to partner during onboarding response-id uuid required request-id echoed back in the response headers event notification notify partner for events request post /notifications body event regid description registration id type uuid validation required example event type description event type type enum refer to event types and errors for details validation required example event error description more information about the failure type enum refer to event types and errors for details validation optional example event desc description additional description of the event type string validation optional example user description container for user information type object validation conditional will be present for payment cards example user id description samsung account id type string validation required example emailmatches description is true if the email provided in the registration request matches with samsung account email type boolean validation conditional it is present only if an email was provided in the registration request example phonematches description is true if the phone number provided in the registration request matches with device phone number type boolean validation conditional it is present only if a phone number was provided in the registration request example device description container for device information type object validation conditional will be present for payment cards example device id description device id type string validation required example device imeilast4 description last 4 of device imei type string size 4 validation optional example device seriallast4 description last 4 of device serial number type string size 4 validation optional example device locale country description device country code type countrycode validation optional example wallet description container for wallet information type object validation conditional will be present for payment cards example wallet id description wallet id type string validation required example event types and errors type error description wa_ready wallet app is ready for provisioning wa_provisioned indicates card was successfully provisioned into the wallet wa_provision_failure indicates provisioning failed for some unknown reason wa_provision_failure card_already_present indicates card is already present response status http/1 1 200 ok header name value content-type application/json body card data encrypteddata description encrypted pan data that will be returned to the device to provision the card type string size 65536 validation conditional required if card data was not provided in the registration request example example post /notifications { "event" { "regid" "395ce2e29485442cbd9bacdc77105126", "type" "wa_ready" }, "emailmatches" true, "phonematches" true, "user" { "id" "rcsm3gwjt9mxgfwy5sg123" }, "wallet" { "id" "gpccugejs9giih8zch1111" }, "device" { "id" "mtuxmte5mdawmjawmdm1n999", "imeilast4" "6166", "locale" { "country" "us" }, "seriallast4" "4934" } } http/1 1 200 ok { "card" { "data" { "encrypteddata" "*****" } } }
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 class watchmanager java lang object samsungpaybase com samsung android sdk samsungpay v2 watchmanager all implemented interfaces apptoappconstants public final class watchmanager extends samsungpaybase implements apptoappconstants this class provides apis for watch management partner apps must check the samsung pay watch status on the device before performing any card management also, this class provides apis getting cards information, adding new card to samsung pay on watch, and so on since api level 2 5 field summary fields modifier and type field description static final string device_serial_num key to represent device serial number to generate the paymentappinstanceid static final int error_invalid_parameter this error indicates that the given parameter is invalid this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error static final int error_spay_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay gear static final int error_spay_watch_connection this error indicates that samsung pay watch plug-in can not connect with samsung pay watch partner app should ask user to check bluetooth connection or pairing static final int error_spay_watch_pay_progress this error indicates that samsung pay watch is in a process of payment static final int error_spay_watch_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay watch static final int spay_watch_taking_log_for_report this error indicates that samsung pay watch is taking log for error report static final int spay_watch_update_is_ongoing this error indicates that samsung pay watch being updated fields inherited from interface com samsung android sdk samsungpay v2 apptoappconstants error_auth_code_expired, error_auth_code_invalid, error_auth_code_max_try_reached, error_auth_code_type_invalid, error_authentication_closed, error_authentication_failed, error_authentication_not_ready, error_authentication_timed_out, error_card_already_registered, error_card_idv_not_supported, error_card_not_supported, error_framework_internal, error_invalid_card, error_invalid_cardinput, error_max_card_num_reached, error_max_pan_provision_num_reached, error_server_reject, error_tsm_fail, error_verify_card, error_wallet_id_mismatch, extra_app2app_intent, extra_app2app_payload, extra_card_balance, extra_card_status_reason, extra_issuer_app_card_linked constructor summary constructors constructor description watchmanager android content context context, partnerinfo partnerinfo api to get the watchmanager instance the caller should set valid serviceid method summary all methodsinstance methodsconcrete methods modifier and type method description void activatesamsungpay api to bring the samsung pay on watch app to a state in which cards can be added samsung pay on watch might be samsung account is not signed in state partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_setup_not_completed, partner app can call this api to launch samsung pay on watch and user can sign in to the app void addcard addcardinfo addcardinfo, addcardlistener listener api to add a card from partner app example issuer/bank app to samsung pay on watch partner app uses this api to add card to samsung pay on watch by providing the required card details void getallcards android os bundle cardfilter, getcardlistener listener api to get all the cards from samsung pay on watch for the given filter void getsamsungpaystatus statuslistener listener api to get the samsung pay on watch status on the device partner issuers applications must call this api to check the current state of samsung pay on watch before doing any operation void getwalletinfo list<string> keys, statuslistener listener api to get the requested wallet information from samsung pay on watch partner app can use this information to uniquely identify the user and samsung pay on watch app on a particular device void gotoupdatepage api to go to samsung pay on watch update page partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_app_need_to_update, partner app can call this api to go to update samsung pay on watch app methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait field details device_serial_num public static final string device_serial_num key to represent device serial number to generate the paymentappinstanceid since api level 2 5 see also constant field values error_spay_pin_lock_setup_canceled public static final int error_spay_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay gear since api level 2 5 see also constant field values error_invalid_parameter public static final int error_invalid_parameter this error indicates that the given parameter is invalid this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error since api level 2 5 see also constant field values error_spay_watch_pin_lock_setup_canceled public static final int error_spay_watch_pin_lock_setup_canceled this error indicates that user canceled the pin lock setup partner app should ask user to setup pin for samsung pay watch since api level 2 5 see also constant field values spay_watch_update_is_ongoing public static final int spay_watch_update_is_ongoing this error indicates that samsung pay watch being updated since api level 2 5 see also constant field values spay_watch_taking_log_for_report public static final int spay_watch_taking_log_for_report this error indicates that samsung pay watch is taking log for error report since api level 2 5 see also constant field values error_spay_watch_pay_progress public static final int error_spay_watch_pay_progress this error indicates that samsung pay watch is in a process of payment since api level 2 5 see also constant field values error_spay_watch_connection public static final int error_spay_watch_connection this error indicates that samsung pay watch plug-in can not connect with samsung pay watch partner app should ask user to check bluetooth connection or pairing since api level 2 5 see also constant field values constructor details watchmanager public watchmanager android content context context, partnerinfo partnerinfo api to get the watchmanager instance the caller should set valid serviceid partnerinfo is passed to samsung pay on watch for caller verification context ct = activity; // or context ct = service; string issuername = "mybank"; // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager extra_issuer_name, issuername ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager ct, pinfo ; parameters context - activity context or service context partnerinfo - partner information throws nullpointerexception - thrown if parameters are null since api level 2 5 method details getsamsungpaystatus public void getsamsungpaystatus @nonnull statuslistener listener api to get the samsung pay on watch status on the device partner issuers applications must call this api to check the current state of samsung pay on watch before doing any operation // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; watchmanager getsamsungpaystatus new statuslistener { @override public void onsuccess int status, bundle data { // success case if status == spay_ready { log d tag, "samsung pay on watch is ready on the device" ; // perform your operation } else if status == spay_not_ready { // samsung pay on watch is supported but not fully ready // if extra_error_reason is error_spay_app_need_to_update, // call gotoupdatepage // if extra_error_reason is error_spay_setup_not_completed, // call activatesamsungpay } else { // samsung pay on watch is not supported on this device log d tag, "device does not support samsung pay on watch" ; } } @override public void onfail int errorcode, bundle errordata { log e tag, "onfail callback is called, errorcode " + errorcode ; // to get more reason of the failure, // check some extra error codes in the errordata bundle such as watchmanager extra_error_reason if provided } } ; parameters listener - callback through which the result is provided on success, samsung pay on watch status code is provided via statuslistener onsuccess int status, bundle data if samsung pay on watch is ready to be used, #spay_ready will be returned otherwise, #spay_not_ready or #spay_not_supported can be returned with #extra_error_reason from bundle also, partner can get extra information from bundle data bundle keys if provided bundle values spaysdk extra_country_code device country code iso 3166-1 alpha-2 on any failure, the failure code is provided via statuslistener onfail int errorcode, bundle errordata note please refer spaysdk common_status_table in detail throws nullpointerexception - thrown if the callback passed is null since api level 2 5 gotoupdatepage public void gotoupdatepage api to go to samsung pay on watch update page partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_app_need_to_update, partner app can call this api to go to update samsung pay on watch app // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; watchmanager gotoupdatepage ; since api level 2 5 activatesamsungpay public void activatesamsungpay api to bring the samsung pay on watch app to a state in which cards can be added samsung pay on watch might be samsung account is not signed in state partner app checks the samsung pay on watch status with getsamsungpaystatus statuslistener api if the status is #spay_not_ready and #extra_error_reason is #error_spay_setup_not_completed, partner app can call this api to launch samsung pay on watch and user can sign in to the app // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; watchmanager activatesamsungpay ; since api level 2 5 getwalletinfo public void getwalletinfo list<string> keys, @nonnull statuslistener listener api to get the requested wallet information from samsung pay on watch partner app can use this information to uniquely identify the user and samsung pay on watch app on a particular device // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring watchmanager extra_issuer_name, "issuer name" ; bundle putstring watchmanager partner_service_type, watchmanager servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; watchmanager watchmanager = new watchmanager context, pinfo ; // bundle keys added to get wallet information from samsung pay on watch // this information can be delivered to the partner server for eligibility check arraylist<string> keys = new arraylist<> ; keys add watchmanager wallet_user_id ; keys add watchmanager device_id ; watchmanager getwalletinfo keys, new statuslistener { @override public void onsuccess int status, bundle walletdata { // log d tag, "dowalletinfo onsuccess callback is called" ; // for visa, deviceid can be set to "clientdeviceid" as defined by visa string deviceid = walletdata get watchmanager device_id ; // for visa, walletuserid can be set to "clientwalletaccountid" as defined by visa string walletuserid = walletdata get watchmanager wallet_user_id ; } @override public void onfail int errorcode, bundle errordata { log e tag, "onfail callback is called, errorcode " + errorcode ; // to get more reason of the failure, // check some extra error codes in the errordata bundle such as watchmanager extra_error_reason if provided } } parameters keys - key list to get wallet information if the list is empty, all possible key values are returned the possible keys are #wallet_dm_id #device_id #wallet_user_id device_serial_num listener - callback through which the result is provided on success, statuslistener onsuccess int status, bundle data is invoked with wallet information the success code can be one of the following codes with bundle data status bundle keys bundle values usage vts mdes #error_none #wallet_dm_id string device management id n/a paymentappinstanceid = device_serial_num + wallet_dm_id *if you need 'paymentappinstanceid', you can generate it as above #device_id string device id clientdeviceid #wallet_user_id string wallet user id clientwalletaccountid device_serial_num string device serial number n/a on any failure, the error code is provided via statuslistener onfail int errorcode, bundle errordata note please refer spaysdk common_status_table in detail throws nullpointerexception - thrown if parameters are null since api level 2 5 addcard public void addcard @nonnull addcardinfo addcardinfo, @nonnull addcardlistener listener api to add a card from partner app example issuer/bank app to samsung pay on watch partner app uses this api to add card to samsung pay on watch by providing the required card details this helps user to add their cards to samsung pay on watch directly from partner app watchmanager watchmanager = new watchmanager ct, pinfo ; string cardtype = card card_type_credit; string tokenizationprovider = addcardinfo provider_abcd; // get it from issuer app // samsung pay on watch does not provide detailed payload information // generate provisioning payload in accordance with your card network specifications string testpayload = "thisistestpayloadcardinfo1234567890"; bundle carddetail = new bundle ; carddetail putstring addcardinfo extra_provision_payload, testpayload ; addcardinfo addcardinfo = new addcardinfo cardtype, tokenizationprovider, carddetail ; watchmanager addcard addcardinfo, new addcardlistener { @override public void onsuccess int status, card card { log d tag, "onsuccess callback is called" ; } @override public void onfail int errorcode, bundle errordata { log e tag, "onfail callback is called, errorcode " + errorcode ; // to get more reason of the failure, // check some extra error codes in the errordata bundle // such as watchmanager extra_error_reason or watchmanager extra_request_id if provided } @override public void onprogress int currentcount, int totalcount, bundle bundledata { log d tag,"onprogress callback is called " + currentcount + " / " + totalcount ; } } ; parameters addcardinfo - detail card information to add listener - callback through which the result is provided on success, addcardlistener onsuccess int, card is invoked with #error_none status code with added card information on any failure, the error code is provided via addcardlistener onfail int errorcode, bundle errordata the failure code can be one of the following codes with bundle data status bundle keys bundle values #error_registration_fail -104 #extra_error_reason apptoappconstants error_card_already_registered -500 apptoappconstants error_framework_internal -501 apptoappconstants error_invalid_card -502 apptoappconstants error_invalid_cardinput -503 error_invalid_parameter -504 apptoappconstants error_server_reject -505 apptoappconstants error_max_card_num_reached -506 apptoappconstants error_card_not_supported -514 apptoappconstants error_max_pan_provision_num_reached -515 apptoappconstants error_wallet_id_mismatch -516 error_spay_watch_pin_lock_setup_canceled -701 spay_watch_update_is_ongoing -702 spay_watch_taking_log_for_report -703 error_spay_watch_pay_progress -704 error_spay_watch_connection -705 #extra_request_id string value returned from server note please refer spaysdk common_status_table for other error status throws nullpointerexception - thrown if parameters are null since api level 2 17 getallcards public void getallcards @nullable android os bundle cardfilter, @nonnull getcardlistener listener api to get all the cards from samsung pay on watch for the given filter since api level 2 5, partner must define issuer names as a card filter on samsung pay developers while on-boarding bundle cardfilter = new bundle ; watchmanager getallcards cardfilter, new getcardlistener { @override public void onsuccess list<card> cards { // getting card status is success if cards == null || cards isempty { log e tag,"no card is found" ; return; } else { // perform operation with card data for card s cards { log d tag, "cardid " + s getcardid + "cardstatus" + s getcardstatus ; // get extra card data if s getcardinfo != null { string last4fpan = s getcardinfo getstring watchmanager extra_last4_fpan ; string last4dpan = s getcardinfo getstring watchmanager extra_last4_dpan ; string cardtype = s getcardinfo getstring watchmanager extra_card_type ; string cardissuername = s getcardinfo getstring watchmanager extra_issuer_name ; log d tag, "last4fpan " + last4fpan + "last4dpan" + last4dpan + "app2apppayload " + app2apppayload ; } } } } @override public void onfail int errorcode, bundle errordata { log e tag, "onfail callback is called, errorcode " + errorcode ; // to get more reason of the failure, // check some extra error codes in the errordata bundle such as watchmanager extra_error_reason if provided } } ; parameters listener - callback through which the result is provided on success, getcardlistener onsuccess list is invoked with list of cards on any failure, the error code is provided via getcardlistener onfail int, bundle note please refer spaysdk common_status_table in detail throws nullpointerexception - thrown if listener is null since api level 2 13 samsung electronics samsung pay sdk 2 22 00 - nov 19 2024
Develop Samsung Wallet
docsecurity the following contents describe how to generate jwt json web token it follows rfc 7519 specification for more details, refer to https //jwt io json web token jwt card data token for secure data inter-communication, the token must be encrypted and signed using security factors see the chapter security factors factors for details jwe format [jwe header] jwe header requirement description alg required cryptographic algorithm used to encrypt the content encryption key cek , e g , rsa1_5 enc required content encryption algorithm used to perform authenticated encryption on the plaintext to produce the ciphertext [jwe payload] jwe payload requirement description encrypted_key required contains the base64url jwe encrypted key value the content encryption key is encrypted with the public key iv required contains the base64url jwe initialization vector value initialization vector used in the encryption algorithm ciphertext required ciphertext value resulting from authenticated encryption of the "cdata" object, which is encrypted using "encrypted_key" and "iv" authentication tag required contains the base64url jwe authentication tag value, used for verifying the integrity of the ciphertext [jwe example] base64url utf8 jwe header + ' ' + base64url jwe encrypted_key + ' ' + base64url jwe iv + ' ' + base64url jwe ciphertext + ' ' + base64url jwe authentication tag [jwe header] {"enc" "a128gcm","alg" "rsa1_5"} [jwe payload ciphertext] refer to the tables in "add to wallet" interfaces, and wallet cards [result] eyjrawqioijxtfquufvcs0vziiwizw5jijoiqteyoeddtsisimfszyi6iljtqtffnsj9 abo_ci81btj2d1a8tcgkfwbx9wpri4tkhhzwms8swct_2nnzhasi_nklmj3wnkm5gwaouny14zx_6eozhj6tdiicuq-rairs6woesu8xa2dt1sc5l17wu9wdsgok4anj0kiunii4pler3d-4fox1hx1fok9siwwqqfql4vnqg3he-i4j6cywoybphznybmkyynkiqfczl6lbttehc4tdaorpkwra3vmb0bbz5nyzf1axzfk-17tz0gfhs82a7gl9rej1k5b10_2qfgmhttffvcyytmkv3inmahq0b48l3sk1oppmfcuqigymvludbg_qwdnbl9eilinojjt8ar2nua zviyghusi5fb2rl2 gm5ivizrqqdr8npk1n2qreyai4md-fisfwtbbbgebhnhjmnu-c_o1yuyrvdhcm0ki_rvcdnzkdlcp_g7shskmroyin3bi92qgtkfh2v4y-kcug2dvgv9uiv3oxawvlikfcntmzizj3thv_fue7jrnrbwf2xmviwsqo5b0lmouskbhuhasqilre0rtc1fgn03qfe_e-b87vht5en2pnbydjv-6_8g3aessyodvhyzyayonlxw_kwqif-i5auwfiigk5lgvmuz9dsl6-qkgyiz5pl9nyydjjjpilibtualyvzb1ch-gskweuhiml62zr-chz2ado8vn0sroccjhcax6pbsp3x6fhyxhr65bjzan4lmdfsskn92bcfyclx8j_pgrlm4vui_-kx1lwparkwrtyxmebkmj-2w8numrnnpgt2erlo_hvtz8xh1kopvqjldjdg_qqfu_oewo3hvunkgqeu3qhi6eywvarb7ozsisz-f95o7k-kqtjhfbwz_yra2nxd2bcgc9ua966_9uq4ombwa-8fccawpxyyu4vzbz_ycv25j8grdqhhtw6n9tkzy4nu07jit4ccofvu5n_gsyn1qowd11-_lmk8amf-l5ddipvrun7dealjd8me4nsaakeslqfkz_sddsu0-05icfkm33quqp6fzn5ocy6dmn5kzbvqxzhghcg_a_k1xqqlx_kupl4jsaxcnciuyptdqbc0hxxwuiyrm3tcde6picymgcbpkc205niyld-6en43di4ykc029yqx8rsldoaa6rwvp-zehdkxynyilja-_8fw4ioqp6vk98ajz5t-ajqdk1h6n_opt-zcjkjzz-7r2x07bsa_5ng7iwambrsv1defxhiyv-esce1meif-na_411hgpja-gwczp_wsswlqra0rpdq208ly70xppu4h_3eh_6q8cy5yhhns93vfuo0nsqfniker25zwnid39zoiyj_de9gzjawxa3k0tprpn5mfdpxvtd0-ro4oqi34ab62-rubcdydsmtggihzy3shlgtyafrbzhmpmdkauoj9buirasqpnr4nahfq_s1m1uy5peeq3j0bozmcc4uasnqqnrrelqm8bkfqi41ggjrjm9uvkcr-pmfonsheoqjmce6zkua1qtoefxycdfoejbjqdbcycnoqgugodlqn2-3mkggrpvqvyaolomykc_sl8kpdvjxntkggzqb9vnlnlq9_fy3hmyor0zeexytajfua-4ilsfkg3crqkx3sccsp-w6rf7vfzx5vdhqbhfzbhbuxypfj1bdmis_w-xqdvr1kgblzmsw9grbwm2mk8rt9qpzinhcaqfv2dqagqth4vyuccq0mjcs5qgnbkwdiggvxfk7bhwhk2jrw3k4egjqna9lssnhcjhqz69m16ivbffktnz5ot0l-npkcqeifia-rjmwyy6beodzi8s7s4l4yvlmvjjidujxkb7zsqusvrvizpljmk1rsbvgww7rfojlci9ed-mhpsmxvepj2uxezxu95z_vx7i8xgszxmlwrmsi0eepa5tl7gqfxfimtv4v_o8rjiipqtdjmkenkflnvkn8wio7nosfyak1gplxkpr2scieltcirpweu_4y56yq3wxbvnwcax7yyjytubirk30znw84omyyljc67wntybeqi3ty1vz6wxraenn_dnwiku-ry_bvc9bjwzpgdnpzdtdqndhijleyk9zhzcwvjhvom7vms4cljs6ndqvm9yeilk55h-ejn22-1n1u6pmjeyfbvty0zfrf57sidtcitseejmhbm1uqdsk3rpfxv2hc0dyy9ok7uasdsifwhkczmue4qyurd3y4wvzhjjaprxqeqojfavz-vt-331jvajgkziifmpuyfck-kyrqbq193uya9sy6e-7ereid3cy7gylp9-tfsugobpulnydieamtqi1zaepwjkjqs9ljofdoojhxbqzy0-spitglnbmtuxpxqh6phh34vdb2fcgjttc8h1vp3_a0lvxxzumdu3jypc9ltqmxxg7xz4h4uqrvis2qm3xqwub1uto9syhfnpf16h0-u8bqdofg-yyba-qn_awn4ufs2ftfy-7yd1isp0g31lifmorplehz0pcgefo-mayacxsvgioptn67enmwe_grdwkzv27deocztmcn_fb7qvtdsle881rfz7lrhmitiuitdo4e0fkwuaz1cohrbpbhzmg30tljbxydb-lfq74rxfdc1eobj0vpcdaxomya9eoxcnt70tti16fr3lxjdysgqv_ihtfkdaummfyojjh_w9zagiwb2uxmhng0a3mpt8r80hzbppvh3hsb2uezww8aqtlmkalqf0g6nzqm181z46gnkz7w3h8a29-yci0ypz_m0pofihnwjrendjkew6azodehwyupsno7y93qdc8khhpzb84bkahbc2sye8wgvgmrhfiwsigfht_g3m8nlt3vfasqe98two0tzu3k72kmod8khdw6xq6oalxoba1m9wfi51wmjji8yr4ty-7pqdc51ombxsqurao0-6puja5dufuioq3yzm0iwr1yjciqaofp-xwn9crh287vjzhw2s4ges8s-wuda9yu61u3b1pwr0fyseouzquay_t3qkziaghvz0a2nefdy2wktmaonidqtsku8rhpknqalrc_ydnvyqooxnrdwjrxxilutvlaaqmygtl0zessrvpkh4inkiu0ikbdceqvnlcjqnuymc5u_dtic-pb7e9h4zwxm3talmlzoc-v1u0shzaqok3tvixa9uy9i3qvpz1realwg7w1yqquhpd-6pgolbddfqwxekb43jtry3wnxjizcgzoqwiuvpdhpzm0cyfzlx71cbcpyc3lkg_pduwkb2qjv2hjodusvstv8 bv9p-aoait1mfijswzevsg jws format [jws header] jws header requirement description alg required cryptographic algorithm used to generate signature e g , rs256 cty required payload content type set as "card" ver required token version set as 3 certificateid required certificate identifier based on a csr during onboarding 4 digits alphanumeric partnerid required partner identifier utc required creation time to prevent repeated use, the token expires after a certain period of time unix timestamp in milliseconds * time offset from utc of +00 00 [jws payload] jws payload requirement description jwe compact serialization required contains base64url jwe value [jws signature] jws signature requirement description jws signature required base64url signature of base64url utf8 jws header + ' ' + base64url jws payload [jws example] base64url utf8 jws header +' ' + base64url jws payload + ' ' + base64url jws signature [jws header] {"cty" "card","ver" 3,”certificateid” ”ymtt”,"partnerid" "1234567890","utc" 1631776245876,"alg" "rs256"} [jws payload] jwe result [result] eyjjdhkioijqqvntiiwidmvyijoxlcjwyxj0bmvyswqioiixmjm0nty3odkwiiwidxrjijoxnjm1odq1odu2mjq0lcjhbgcioijsuzi1niisimtpzci6ilbuti5qukllrvkifq zxlkcmfxuwlpaupyvezrdvvgvkntmfzaswl3avpxnwpjam9puvrfeu9fzeruu0lzsw1gc1p5stzjbepuuvrgzk5tsjkuqujpx0npodfcdeoyzdfhofrdz0tmv0j4ovdwukk0vgtosfp3bvm4c3djdf8ybk5asefzsv9us0xtajn3bktnnwd3yw9vbnkxnfpyxzzfb1posjzuzelpy1vrlxjhsvjznndvrvn1ofhbmmrumxndnwwxn3d1ovdkc2dpszrhbkows0lvtkljnfbmzvizzc00zm9ymuh4mwzvazlzsxdxcxfgcww0dm5xzznors1pneo2y3lxt1lccgh6tllctut5eu5rsxfgy3psnmxivfrfagm0verbt3jqs1dyytnwtuiwqkj6nu55ekyxyxh6rmstmtd0wjbhzmhtodjbn0dmovjfajflnuixmf8ycwzhbwhudgzgvmn5wvrns3yzsw5nyuhrmgi0oewzu0sxb1bqbuzddxfpz1lnvkxvrgjnx1fxzg5cbdllswxjbk9qanq4qxiytlvbllp2axlhsfvtatvgyjjsbdiuz201axzpenjruwrsoe5qszfomnfsrxlbstrnrc1gsvnmv1rcqkjnrwjotmhqtw51lwnfbzfzvvlsdmroq20ws2lfcnzjre5as0rmy1bfzzdzafnrtvjvwwlum2jjotjxz3rrrmgyvjrzlwtdducyrhzhvjlvsvyzb3hhv3zssutmy050bvppwmozvghwx0zvrtdkck5yyndmmlhnvkl3c1fvnwiwbg1vvxnlykh1sgfzculsukuwunrdmwznbjazcuzfx0utqjg3dmh0nuvumlbuqllesnytnl84zznhzxntew9kdkh5ellhww9uthhxx0txcwlglwk1qvv3rmljz0s1tgdwbvv6ourtbdytuutnwwl6nxbsow55ewrkampwswxpynr1yuxzdnpcmunilwdza3dfvwhptww2mlpslunoejjbzg84vm4wu1jvq2nksgnhwdzqqlnqm3g2rmh5wehynjvcslpbbjrsturmu3nltjkyymngewnmwdhkx3bnukxnnfzvsv8ts3gxbfdwqxjrd1j0wxhtrwjltuotmnc4tlvnuk5uced0mkvstg9fafz0wjhyadfrb3b2cwpmzgpkr19rcwzvx09fv08zshz1tkthuwv1m1fostzfevd2yxjin09ac0lzei1gotvpn0sts1f0smhmqld6x1lyqtjoeeqyqmnnyzl1qtk2nl85dve0b01cd0etoezjy0fxuhhzwvu0dlpcel95y1yynwo4r3jkcuhivhc2bjlus1p5ne51mddqsvq0y0nvrlz1nu5fr3n5bjfxb1demtetx2xnazhhtuyttdvkrglwdnj1bjderwfsskq4twu0tnnbqwtfu0xrzkt6x3nkzfn1mc0wnwljzkttmznxvvfqnmz6bjvpy1k2rg1unwtaqlzrwfpiz0hdr19bx0sxeffrbfhfa3vqtdrku0f4q05davvzufrecwjjmeh4whdvavlyttn0q0rlnnbpq3ltr0niuetdmja1tml5beqtnmvondnkstr5s0mwmjlzuxg4clnmre9bqtzsv3zwlvpfsgrlehloeulssketxzhgdzrpt3fwnnzlothbalo1vc1halfeszfonm5fb3b0lvpdsmtkwnotn3iyeda3qlnhxzvuzzdpd2ftqljtdjfkzuz4ael5vi1fc0nlmu1fawytbmffndexaedwsketr3ddenbfd3ntv2xxcmewulbectiwogxznzbyufb1nehfm0vixzzxogn5nvlosg5totnwzlvpme5tuwzoautluji1endosuqzoxpvaxlqx2rlowdaamfxwgezazbuuhjqbjvnzmrwwfzurdatcm80b3fjmzrhyjyylxjvqknkwwrzbvrhz0liwlkzc0hmr3r5qwzyqnpitvbnretbvu9koujvsvjhu3fwbni0tmfiznffuzftmvv5nxbfrvezajbit3pty2m0vufztlfrbnjyzuxxbthis0zrstqxr2dkukptovv2a0nslvbnrk9uu0hlt3fqbwnlnlpldwexcvrpruzywwnkrk9lakjqcurcy3ldtm9xr3vhb0rscw4yltnna0dhcnbwuvzzqw9st015s0nfu2w4a3bedmpytnrlz2d6uui5vm5sbmxrov9mwtnobxlvcjbaruv4evrhamz1ys00swxzrkthm2nyuwt4m3njq1nwlvc2cmy3dmz6wdv2rghxykhgwmjiynvywxbgajfirg1jc193lxhrrfzymutnymx6txnxowdsqndnmk1lohj0ovfqemlosgnhuwzwmmrryudrdgg0vnlvq2nxmg1kq1m1uwduqkt3zglhr1z4zms3qmh3sesyanjxm0s0zwdquu5houxtu05oq2pouvo2ou0xnmlwqmzma3ruejvvvdbmlw5qs2nrrulmauetcmptd1l5nkjfb2raathtn1m0bdrzdkxtdmpqaur1snhlqjdac1fvu1zyvml6ugxqtwsxunnidmd3vzdyzk9ktgnjowvklw1ichnnehzlcgoyvxhfwlhvotvax3zyn2k4eedtwnhtbfdybvnjmevfuee1vew3r1fmegzjtxrwnfzftzhsakljuff0repna0vos0zstlzrbjhxaw83bm9zzllbazfncgx4a1bsmlndsuvsvenjulb3zxvfnhk1nllxm3d4ylzud0nbwdd5ewp5vhvcsvjrmzb6tlc4ng9nwvlsskm2n3dudhlcrxfpm1rzmxz6nld4cmflbm5fze53swt1lvjzx2j2qzlcsldaugdetnbazfrkcw5eaglktev5szl6afpjd3zqsfzvbtdwtvm0q0xkczzozhfwbtl5zwlsazu1sc1fsm4ymi0xbjf1nnbnamv5rkj2dfkwekzyzju3c2lkvgnjdhnfrupnagjnmvvxzfnlm1jwrnh2mkhdmerzwtlpazd1qxnec0lgv2hlq1pndwu0uxlvcmqzwtrxdlpiampbufjycuvrb0pmyvzalvz0ltmzmwpwyupha3pjawznuhvzrmnrlwtzunfiute5m1vzytltwtzfltdfcmvjzdndetdhwwxqos1urlnvz29cufvmtnleauvbbxrrstf6ywvwd0planftouxkb0zkt09qafhicvp5mc1zcel0z0xuqk10dxhweffinnbosdm0dmrimmzdz2p0vem4adf2cdnfqtbmdnh4envnzfuzsllwyzlsdhfnwhhhn1hangg0vvfydkltmnftm1hrd1vcmxvutzltewhmtlbmmtzomc1voejrze9gry1zwwjblvfox0fxtjrvrlmyrlrgws03euqxaxnwmeczmuxjrm1punbmzuh6mhbjz0vmty1nyxlhy3hzvkdjt3b0bjy3rw5nd2vfr3jkd0t6vji3rgvvy3pubunux0zin1fwverzteu4odfsrno3thjotwlusvvjvgrvneuwrmtxvwfamunvshjccejowm1hmzb0tgpieflkqi1srne3nhjyzmrdmwvpqkowdlbjzef4b215qtlft1hdtnq3mhr0ste2rlizbhhqzfltr1f2x2lidgzrzgf1tu1gwu9kakhfvzlaywdjv2iydxhnae5hmeeztxbuofi4mehaqlbwdkgzsfnimnvleld3oefxvgxta0fscuywzzzuwnfnmtgxejq2z05lwjd3m2g4yti5lxldatb5uhpfbtbqt0zjag5xanjfbmrqs2v3nmfab0rfshd5vvbzbk83etkzuurjogtiafb6yjg0ymtbaejdmlnzzth3r3zntxjorkl3u2lnzmh0x0cztthobhqzdmzbc1floth0d28wvhp1m0s3mkttb0q4a2hkdzzyctzpywxyb2jbmu05d2zpntfxbwpqath5cjruws03chfeyzuxt21iefnrvxjbtzatnlb1ame1rfvgvulputn5wk0wavdsmvlky2lxqw9gcc1yv045q3jimjg3dkpaafcyczrhzxm4uy1xdwrhoxl1njf1m2ixchdsmgzzc0vpvxprdwfzx3qzcwtaawfhahzameeybkvgzfkyd2tubwfvbmlkcxrza3u4cmhqs25xyuxsq195zg52evfpt3huckr3sljyeelmdvrwbgfhuw1zz1rsmhplc1nsdnbrsdrjbmtjvtbpa0jeq2vrvm5mq0pxtnvztwm1dv9eveljlxbin0u5sdr6v3htm1rbbe1mem9dlxyxdtbzshphcw9rm3r2svhboxv5owkzcxzqejfyzufmv2c3dzf5cvfvafbkltzqr29symrkrnfxwevryjqzsnrsetn3bnhksvpdr1pvcxdpvxzqzehwem0wq3lmekx4nzfjqmnweumztgtnx3bevvdlqjjxslyysgpvzfvtdln0djguyny5cc1hb0fjddftzklkc1dazxztzw bwqnq5n8apkes9fbb4htdqbterdklaztmphx6r_h7k7og4lx3gmgds3fep6o4cs6jttutost6gdmudwzozztptwetj64p4of1wlzkf6tx8alrkaiqr2nptxh_ah87bkw69myzakb4d9obngp7qdk7izgkpq180olmbtpxiv-wkin92f6n2fpoi5bt1ws_hh8wxgla6nkm0s-roayl7gtvgbs6gohkhvgaxnhesqy7kzgqte9orcc_fliqyyrabhtpgybwb7wp0hpodzq0dpadumkkprs05vidfzjufxduyc7zbze-g_tixrjk3linf4rnzxyi0gohbw5grphu3wltg authorization token the restful api needs to include an authentication token jwt samsung and partners can use the token to authenticate api calls jwt format [jws header] jws header requirement description alg required cryptographic algorithm used to sign the payload e g , rs256 cty required payload content type, such as "auth" ver required token version set as 3 certificateid required certificate identifier based on a csr during onboarding 4 digits alphanumeric partnerid required partner id same as partnercode utc required creation time to prevent repeated use, the token expires after a certain period of time unix timestamp in milliseconds * time offset from utc of +00 00 [jws payload] jwe payload requirement description api required current api information api method required api method api path required api path refid optional a unique content identifier defined by the content provider authentication optional authentication value to be used in accordance with the pre-configured authentication method on wallet card * see the chapter authentication for more details updatedat optional data update timestamp epoch timestamp in milliseconds [jws header] {"cty" "auth","ver" 3,”certificateid” ”ymtt”,"partnerid" "1234567890","utc" 1631775948348,"alg" "rs256"} [jws payload] /** samsung server api > update notification **/ { "api" { "method" "post", "path" "/wltex/cards/12584806754/notification" }, "refid" " ref-20230304-0003" } /** partner server api > get card data **/ { "api" { "method" "get", "path" "/cards/12584806754/ref-20230304-0003" }, "refid" "ref-20230304-0003" } [jws result] eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjm0nty3odkwiiwidxrjijoxnjmxnzc1otq4mzq4lcjhbgcioijsuzi1niisimtpzci6ildmvc5qukllrvkifq ewogicagikfqssi6ihskicagicagicaibwv0ag9kijogikdfvcisciagicagicaginbhdggioiail2nhcmqvq1mxnjezodm1mzixmju4ndgwnjc1ncikicagih0sciagicaicmvmswqioiaiq1mxnjezodm1mzixmju4ndgwnjc1ncikfqo ascawii-ambjkoly_auzagxrwuumkfuhbznrlk0ykvbyog2dsljs-_xyq9tooh4cwsfpkej0vqkwbyrokabkhwmrdbkjrajeaq-87s-bqp1rcbelnzmfq66gcmbg9xpd6dmwwlnrazyszjrcyzkllu9si5qykrkyuoz34mcwzwdneos3z3gl1xft42m2-cduxkqwi0wfryanxiedwboiyu12sdnpsrbwlb7liw4omm6fg01dirtbk6ayumbf7zqjl_oygelv9jfdyoze0tqyklttshgdws7imyamha5nhagplhqivzaqoosa14gbcm1u0zdqw4jqa4-1vgjr_i5xea [authorization token] bearer eyjjdhkioijbvvriiiwidmvyijoxlcjwyxj0bmvyswqioiixmjm0nty3odkwiiwidxrjijoxnjmxnzc1otq4mzq4lcjhbgcioijsuzi1niisimtpzci6ildmvc5qukllrvkifq ewogicagikfqssi6ihskicagicagicaibwv0ag9kijogikdfvcisciagicagicaginbhdggioiail2nhcmqvq1mxnjezodm1mzixmju4ndgwnjc1ncikicagih0sciagicaicmvmswqioiaiq1mxnjezodm1mzixmju4ndgwnjc1ncikfqo ascawii-ambjkoly_auzagxrwuumkfuhbznrlk0ykvbyog2dsljs-_xyq9tooh4cwsfpkej0vqkwbyrokabkhwmrdbkjrajeaq-87s-bqp1rcbelnzmfq66gcmbg9xpd6dmwwlnrazyszjrcyzkllu9si5qykrkyuoz34mcwzwdneos3z3gl1xft42m2-cduxkqwi0wfryanxiedwboiyu12sdnpsrbwlb7liw4omm6fg01dirtbk6ayumbf7zqjl_oygelv9jfdyoze0tqyklttshgdws7imyamha5nhagplhqivzaqoosa14gbcm1u0zdqw4jqa4-1vgjr_i5xea secure add to samsung wallet authentication defines the data format to authenticate the user registering/updating the card if need a custom user verification process, please get in touch with us via tech support [authentication data set] case type value description connecting information ci user’s ci value identifier of identity verification agency samsung account sa user’s samsung account verifying that the signed-in samsung account on the user's galaxy device matches subscriber identity module sim sim card information on mobile telephone devices verify the sim information being used on the user's mobile phone one-time password otp dynamic password the temporary password provided by the partner to the user is verified by receiving user input during the add to samsung wallet process access token token token to verify data retrieval request token data included in card data is used as a key accessed when querying a partner server this tokenized key can be reissued when the partner delivers updated card data [example] type sample data ci {"ci" "hsd0iuf9bew8ugb7wqeu6i"} sa {"account" "samsungwallet@samsung com"} sim [{"uiccid" "abcderwyt","telno" "821012345678","isprimary" true},{"uiccid" "abcderwys","telno" "01012345679","isprimary" false}] otp {"otp" "947253"} token {"x-access-token" "7c8d38690d0e3b6aa077198abd2554a3a7940b52cf86bd690c1"}
Develop Samsung Wallet
docoverview samsung online relying party supports two modalities online same-device rpapp-to-walletapp and online same-device web-to-wallet app we currently do not support cross-device functionality the identity verification as part of samsung wallet is accomplished with the "verify with samsung wallet" button 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 the implementing vww button 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 the implementing vww button 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 pre-requisites – technical and system requirements samsung wallet currently supports same-device rp functionality only device and android os version limitations are given below driver's licenses or state ids can be added to the following galaxy devices galaxy s series - s20 or later galaxy z series - z flip 5g, z fold 5g, z flip 2, and fold 2 or later galaxy a series - a53, a54 mobile driver's license or state id is only available on devices running android 12 s or later app2app sdk rpsdk requirements minimum android sdk rpsdk requires a minimum api level of 26 kotlin 1 7 10 is required integration steps the following steps describe the integration process step1 samsung wallet portal on-boarding please refer wallet portal on-boarding information review the samsung wallet portal on-boarding guide register in the samsung wallet portal and proceed with on-boarding process create a wallet card as the 'relying party' type in wallet portal step2 select app2app or web2app select the integration model app2app or web2app follow steps listed in each subsection implement functions implement verify with samsung wallet follow steps listed in implementing vww button app2app implement partner app with rp sdk follow steps listed in the app2app sdk integration specs web2app implement server apis follow steps listed in the web2app api integration specs step3 test 'verify with samsung wallet' function and release the function to user test overall 'verify with samsung wallet' function remove test mode in wallet portal after test is done expose the 'verify with samsung wallet' function to the user in partner side
Develop Samsung Pay
docflutter plugin overview samsung pay sdk flutter plugin enables to use the samsung pay sdk the primary aim of the samsung pay sdk is to integrate selected samsung wallet features with flutter based android apps on samsung devices the following major operations are supported in the plugin in-app payment gives customers the option of paying for products and services with samsung wallet push provisioning allows customers add a bank card to samsung wallet from the issuer app by providing the required card details to integrate partner applications with the samsung pay sdk flutter plugin, the following components are included in the download samsung pay sdk flutter plugin contains classes, interfaces, and required libraries of samsung pay which is required to communicate with samsung pay services api reference provides descriptions of the apis included in the samsung pay sdk flutter plugin sample merchant app and sample issuer app showing how samsung pay apis can be coded in a finished flutter plugin project all major operations of the samsung pay sdk flutter plugin are implemented for demonstration purposes samsung pay sdk flutter plugin architecture the following diagram shows a high-level architecture revealing the general interactions between the samsung pay sdk flutter plugin and a partner app viewed at this level, the partner apps leverage the samsung pay sdk flutter plugin to perform the operations shown ― push provisioning and opening favorite cards for issuers; online payments for merchants ― with samsung pay the key components involved are partner app - merchant- or issuer-developed app for making online/offline payments and provisioning payment cards through samsung pay samsung pay sdk flutter plugin - sdk integrated into the partner app for direct communication with samsung pay samsung pay app - pay app that the samsung pay sdk communicates with financial network - comprises the payment gateways, acquirers, card associations, and issuers that participate in transaction processing under agreement with the merchant setting up flutter plugin environment the importance of maintaining a good development environment cannot be overstated for integrating the samsung pay sdk flutter plugin with your partner app, the following prerequisites and recommendations help ensure a successful plugin integration and implementation please check the requirements below for the samsung pay sdk flutter plugin for android and system requirements please check the samsung pay android sdk overview to develop a samsung pay sdk flutter plugin service, merchants and issuers need to create service please check this guide for service creation process service registration download the samsung pay sdk flutter plugin to use the plugin the plugin has the following directory structure folder contents docs api reference documentation libs samsungpaysdkflutter_v1 01 00 flutter plugin – contains the samsung pay apis to be used by your partner app samples sample apps integrate samsung pay sdk flutter plugin with your project be sure to do the following before attempting to use the plugin if not already part of your environment, download and install an ide android studio is recommended download the samsung pay sdk flutter plugin configure your ide to integrate the samsung pay sdk flutter plugin with your partner app go to pubspec yaml and enter the following dependency dependencies samsung_pay_sdk_flutter path plugin_directory_path\ [note] if your plugin path is c \users\username\downloads, the dependency will be like below dependencies samsung_pay_sdk_flutter path c \users\username\downloads\ for android proguard rules and dexguard, please check the android sdk overview
Develop Samsung Pay
docinitiate in-app payment merchant applications can use apis to fetch payment information details with custom payment sheet the following functionalities are ready to perform a variety of payment operations checking registered/enrolled card information creating a transaction request requesting payment with a custom payment sheet checking registered/enrolled card information before displaying the samsung pay button, a partner app can query card brand information for the user’s currently enrolled payment cards in samsung wallet to determine if payment is supported with the enrolled card to query the card brand, use the requestcardinfo api method of the samsungpaysdkflutter class the merchant app does not need to set a value for it now however, before calling this method, cardinfolistener must be registered so its listener can provide onresult and onfailure events the following snippet shows how to retrieve the list of supported card brands from samsung wallet samsungpaysdkflutterplugin requestcardinfo cardinfolistener {onresult paymentcardinfo showcardlist paymentcardinfo ; }, onfailure errorcode, bundle { showerror errorcode, bundle ; } ; creating a transaction request upon successful initialization of the samsungpaysdkflutter class, the merchant app needs to create a transaction request with payment information using the custom payment sheet to initiate a payment transaction with samsung wallet’s custom payment sheet, your merchant app must populate the following mandatory fields in customsheetpaymentinfo merchant name - as it will appear in samsung wallet’s payment sheet, as well as the user's card account statement customsheet - is called when the user changes card on the custom payment sheet in samsung wallet optionally, the following fields can be added to the payment information merchant id - can be used for the merchant’s own designated purpose at its discretion unless the merchant uses an indirect pg like stripe or braintree if an indirect pg is used, this field must be set to the merchant’s payment gateway id fetched from the samsung pay developers portal order number - usually created by the merchant app via interaction with a pg this number is required for refunds and chargebacks in the case of visa cards, the value is mandatory the allowed characters are [a-z][a-z][0-9,-] and the length of the value can be up to 36 characters address - the user’s billing and/or shipping address allowed card brands - specifies card brands accepted by the merchant if no brand is specified, all brands are accepted by default if at least one brand is specified, all other card brands not specified are set to "card not supported’ on the payment sheet here’s the 'customsheetpaymentinfo' structure string? merchantid; string merchantname; string? ordernumber; addressinpaymentsheet? addressinpaymentsheet; list<brand>? allowedcardbrand; paymentcardinfo? cardinfo; bool? iscardholdernamerequired; bool? isrecurring; string? merchantcountrycode; customsheet customsheet; map<string,dynamic>? extrapaymentinfo; your merchant app sends this customsheetpaymentinfo to samsung wallet via the applicable samsung pay sdk flutter plugin api methods upon successful user authentication in direct mode, samsung wallet returns the above "payment info" structure and a result string the result string is forwarded to the pg by your merchant app to complete the transaction it will vary based on the pg you’re using the following example demonstrates how to populate customsheet in the customsheetpaymentinfo class list<brand> brandlist = []; brandlist add brand visa ; brandlist add brand mastercard ; brandlist add brand americanexpress ; customsheetpaymentinfo customsheetpaymentinfo= customsheetpaymentinfo merchantname "merchantname", customsheet customsheet ; customsheetpaymentinfo setmerchantid "123456" ; customsheetpaymentinfo setmerchantname "sample merchant" ; customsheetpaymentinfo setaddressinpaymentsheet addressinpaymentsheet need_billing_send_shipping ; customsheetpaymentinfo setcardholdernameenabled true ; customsheetpaymentinfo setrecrringenabled false ; customsheetpaymentinfo setcustomsheet customsheet ; customsheetpaymentinfo allowedcardbrand = brandlist; return customsheetpaymentinfo; requesting payment with a custom payment sheet the startinapppaywithcustomsheet method of the samsungpaysdkflutter class is applied to request payment using a custom payment sheet in samsung wallet the two methods are defined as follows startinapppaywithcustomsheet - initiates the payment request with a custom payment sheet the payment sheet persist for 5 minutes after the api is called if the time limit expires, the transaction fails updatesheet - updates the custom payment sheet if any values on the sheet are changed as of api level 1 5, a merchant app can update the custom sheet with a custom error message refer to updating sheet with custom error message when you call the startinapppaywithcustomsheet method, a custom payment sheet is displayed on the merchant app screen from it, the user can select a registered card for payment and change the billing and shipping addresses, as necessary the result is delivered to customsheettransactioninfolistener, which provides the following events onsuccess - called when samsung wallet confirms payment it provides the customsheetpaymentinfo object and the paymentcredential json string customsheetpaymentinfo is used for the current transaction it contains amount, shippingaddress, merchantid, merchantname, ordernumber api methods exclusively available in the onsuccess callback comprise getpaymentcardlast4dpan – returns the last 4 digits of the user's digitized personal/primary identification number dpan getpaymentcardlast4fpan – returns the last 4 digits of the user's funding personal/primary identification number fpan getpaymentcardbrand – returns the brand of the card used for the transaction getpaymentcurrencycode – returns the iso currency code in which the transaction is valued getpaymentshippingaddress – returns the shipping/delivery address for the transaction getpaymentshippingmethod – returns the shipping method for the transaction for pgs using the direct model network tokens , the paymentcredential is a json object containing encrypted cryptogram which can be passed to the pg pgs using the indirect model gateway tokens like stripe, it is a json object containing reference card reference – a token id generated by the pg and status i e , authorized, pending, charged, or refunded refer to payment credential sample for details oncardinfoupdated - called when the user changes the payment card in this callback, updatesheet method must be called to update current payment sheet onfailure - called when the transaction fails, returns the error code and errordata bundle for the failure here’s how to call the startinapppaywithcustomsheet method of the samsungpaysdkflutter class class customsheettransactioninfolistener{ function paymentcardinfo paymentcardinfo, customsheet customsheet oncardinfoupdated; function customsheetpaymentinfo customsheetpaymentinfo, string paymentcredential, map<string, dynamic>? extrapaymentdata onsuccess; function string errorcode, map<string, dynamic> bundle onfail; customsheettransactioninfolistener {required this oncardinfoupdated, required this onsuccess, required this onfail} ; } void oncardinfoupdated cardinfo selectedcardinfo, customsheet customsheet { amountboxcontrol amountboxcontrol = customsheet getsheetcontrol amount_control_id as amountboxcontrol; amountboxcontrol updatevalue product_item_id, 1000 ; amountboxcontrol updatevalue product_tax_id, 50 ; amountboxcontrol updatevalue product_shipping_id, 10 ; amountboxcontrol updatevalue product_fuel_id, 0, "pending" ; amountboxcontrol setamounttotal 1060, amountconstants format_total_price_only ; customsheet updatecontrol amountboxcontrol ; } } void startinapppaywithcustomsheet customsheetpaymentinfo customsheetpaymentinfo,customsheettransactioninfolistener? customsheettransactioninfolistener { try{ methodchannelsamsungpaysdkflutter? startinapppaywithcustomsheet customsheetpaymentinfo, customsheettransactioninfolistener ; }on platformexception catch e { print e ; } } override fun onsuccess response customsheetpaymentinfo, paymentcredential string, extrapaymentdata bundle {} override fun onfailure errorcode int, errordata bundle? {}
news marketplace
newswant to see how your app, or content in general, appears in the galaxy store in another country? using an unlocked samsung mobile device and a sim card from the country you wish to observe, you can access regional galaxy stores.
Develop Samsung Pay
docoverview this guide describes the samsung pay web checkout service and how you can integrate it on your website the guide contains information about the service flow and instructions for implementing the samsung pay web checkout sdk and its api calls features the samsung pay web checkout sdk is a javascript-based web development kit that integrates the samsung pay payment system to your website through a web checkout the samsung pay web checkout solution enables your users to pay for purchases on your website with payment cards saved in the samsung wallet application on their mobile device the web checkout supports browser-based payments on both computers and mobile devices a mobile device with samsung wallet installed is required to make purchases through samsung pay web checkout when the user chooses to pay with samsung pay, they must provide their samsung account id email id or scan the code on the screen with their mobile device the user then authorizes the purchase within the samsung wallet application, which generates the payment credential on the device and transmits it to your website through the web checkout user scenario the following figures describe the user scenario for making a purchase through samsung pay web checkout part 1 payment initiation and device binding on your website, the user selects "samsung pay" at checkout the web checkout ui is launched, showing the device binding screen the user links the transaction to their device by entering their samsung account email or by scanning the qr code with the device the samsung server sends a push notification to the samsung wallet application on the user's device they must respond to the notification within the time limit shown on the screen part 2 user confirmation on mobile device the user taps the samsung wallet push notification on their device the payment sheet is opened, and shows the payment summary to be confirmed the user selects the payment card they want to use and verifies the payment the payment credential information is generated and sent to the samsung server part 3 payment completion in the user's web browser, the web checkout ui displays the "verified" screen the payment credential is transmitted securely to your website you must submit the transaction information and payment credential to your payment provider for processing the user's purchase is complete service flow the following figure illustrates the samsung pay web checkout flow
Develop Mobile Samsung eSE SDK
docsamsung ese sdk overview description of secure element a secure element is a tamper-resistant platform typically a one chip secure microcontroller capable of securely hosting applications and their confidential and cryptographic data such as cryptographic keys and sensitive data in accordance with the rules and security requirements set by well-identified trusted authorities there are various form factors of secure element subscriber identity module sim / universal integrated circuit card uicc embedded secure element microsd secure elements offers a separate hardware-backed security so that sensitive information or transaction can be performed independently from other processors ap, cp, cpu, and etc due to this, secure elements have been supporting immense needs of various industries that require additional protections, such as payment cards, e-id cards, health insurance cards, driver licenses, digital car keys, and door lock keys embedded secure element ese chips on samsung devices have been certified by authorities such as globalplatform, emvco and common criteria all of them have at least an eal5+ evaluation assurance level , which can provide equal or higher security level as an electronic passport can samsung is ready to open ese for service providers who wants to utilize our products our ese also supports industry standards such as javacard and globalplatform card specifications use cases the following are some use cases for ese on samsung devices transits payments digital key access door key, car key, and etc identification / authentication secure storage / certificate manager samsung devices with ese allow customers to use secure services in general, certain levels of security are required for services that deal with sensitive information with a highly secured samsung device, the service provider can provide their services securely to its customers samsung ese sdk samsung ese sdk provides the way for the service provider to deploy a service using ese on samsung devices it enables the service provider to manage their own service on each customer’s device it requires communication between, not only on the client application and ese, but also the server and device hence, there are a few requirements for the service provider to proceed with service development you can use samsung ese sdk to deploy a service on a customer’s device communicate with ese using a client application manage service provider’s own storage within ese requirements for the service provider applet development resides within ese tsm trusted service manager server service provider can choose one of the options below service provider tsm server samsung tsm tsm-less how to request partnership to use the samsung ese sdk, you must become a samsung partner to request partnership open the partnership request form if prompted, log in to your samsung account if you do not already have a samsung account, create one enter your company and developer information your name, email address, and country are filled in for you enter information about the application for which you are applying to use the samsung ese sdk provide the name and description for the application, and attach documents that detail the application features and use cases when you are ready to submit the request, click “submit ” your partnership request will be reviewed when it is approved, you will receive confirmation letter nda non-disclosure agreement shall be established between samsung and service provider after confirmation letter samsung ese sdk can be accessed under nda faq q 01 is there a device list for ese eligibility? a the device list will be provided after an nda non-disclosure agreement has been completed between the service provider and samsung q 02 do i need to have/develop an javacard applet for service? a yes, samsung will only provide certain storage within ese the service provider shall prepare an applet itself to be loaded / installed within ese q 03 who can apply for partnership? a samsung intends to provide service opportunities for 3rd parties who can manage secure service stable for a valuable customer however individual developer can't apply partnership for samsung ese sdk
Develop Samsung Wallet
docimplementing atw button for wallet integration, you need to insert ‘add to wallet’ script into your system we usually follow the procedures below to implement the ‘add to wallet’ button first, proceed with script composition with the sample script on the partners portal or see the integration sample code second, create tokenized card data cdata and insert the data token into the script above card data is the actual content data of wallet cards and has several formats based on card type please see generate_cdata sample code for detail importantcdata token should expire in 30 seconds after creation, so cdata token needs to be created right after users actually click “add to wallet” button to implement ‘add to wallet’ button, you may need some base data you can find the base data and other necessary information on partner portal’s wallet card page samsung wallet on the web this section explains how to implement an "add to wallet" button using javascript in a web view web button reference with importing api javascript if you implement the "add to wallet" button using this script, the button is shown only on the devices that support samsung wallet to automatically parse <samsung wallet> html tags when the page is loaded, include the following standard javascript <script src="https //us-cdn-gpp mcsvc samsung com/lib/wallet-card js" type="text/javascript"></script> you can use these tags or javascript functions for the web button if you're rendering html and you have proper partner permissions you can also use the script by referring to the various attributes samsung wallet html tag the ‘samsung wallet’ namespace tag defines the placement and various attributes of the "add to wallet" web button for samsung wallet <samsung wallet cardid="card_id" cdata="cdata" partnercode="partner_code" buttonid="button_id" rdclickurl="rd_click_url" rdimpressionurl="rd_impression_url" ></samsung wallet> button attributes attribute description cardid string required wallet card identifier * value granted from the partners portal cdata string required encrypted card object json * this field needs to be encrypted * see security partnercode string required partner code * value granted from the partners portal buttonid string required dom element id for the "add to wallet" web button for samsung wallet buttontype string optional “add to wallet” button type [“btnsw” / “btnatsw” / “qrcode”, default btnsw] * see image resources authtoken string optional token generated when “qrcode” is used * required only if the “buttontype” is set to “qrcode” model string optional device model to display button* by default, value from user-agent is used if no value from user-agent, the button is displayed * to display buttons only on devices supporting samsung wallet, explicitly include the model name * for example, you can retrieve the device model name e g , sm-s928f from the browser's user-agent inline string optional flag to display the "add to wallet" image button in one-line format default true one-line locale string optional locale of the "add to wallet" image button * see image resources rdclickurl string required url for logging a button click event * value granted from the partners portal rdimpressionurl string required url for logging a button impression event * value granted from the partners portal showforced string optional flag to force the "add to wallet" button to be displayed default false mediatheme string optional load the button’s resources from the media theme policy there are 4 themes default, inversion, lightonly, and darkonly default default *default load the button’s theme according to the prefers-color-scheme policy inversion load the inverse of the default button’s theme lightonly load the light theme of the default button *darkonly load the dark theme of the default button style string cssstyledeclaration optional load the button with custom style target string optional option to choose button’s target name * default “wallet” onshowbutton function optional callback handler function for the button’s on-show event onclickbutton function optional callback handler function for the button’s on-click event if you register the handler function, you must return a callback or promise value * see usage of onclickbutton handler samsungwallet addbutton function this function allows you to explicitly render the samsung wallet api for the "add to wallet" web button samsungwallet addbutton { cardid "card_id", cdata "cdata", partnercode "partner_code", targetid "target_id", buttonid "button_id", rdclickurl "rd_click_url", rdimpressionurl "rd_impression_url", } button attributes unlike the samsung wallet html tag, you must use camelcase in the button attributes in function case attributes description cardid string required wallet card identifier * value granted from the partners portal cdata string required encrypted card object json * this field needs to be encrypted * see security partnercode string required partner code * value granted from the partners portal targetid string required dom document object model element id to place the "add to wallet" web button for samsung wallet buttonid string required dom element id for the "add to wallet" web button for samsung wallet buttontype string optional “add to wallet” button type [“btnsw” / “btnatsw” / “qrcode”, default btnsw] * see image resources authtoken string optional token generated when “qrcode” is used * required only if the “buttontype” is set to “qrcode” model string optional device model to display button* by default, value from user-agent is used if no value from user-agent, the button is displayed * to display buttons only on devices supporting samsung wallet, explicitly include the model name * for example, you can retrieve the device model name e g , sm-s928f from the browser's user-agent inline string optional flag to display the "add to wallet" image button in one-line format default true one-line locale string optional locale of the "add to wallet" image button * see image resources rdclickurl string required url of logging a button click event * value granted from the partners portal rdimpressionurl string required url of logging a button impression event * value granted from the partners portal showforced string optional flag to force the "add to wallet" button to be displayed default false mediatheme string optional load the button’s resources from the media theme policy there are 4 themes default, inversion, lightonly, and darkonly default default *default load the button’s theme according to the prefers-color-scheme policy *inversion load the inverse of the default button’s theme *lightonly load the light theme of the default button *darkonly load the dark theme of the default button style object cssstyledeclaration optional load the button with a custom style target string optional option to choose button’s target name * default “wallet” onshowbutton function optional callback handler function for the button’s on-show event onclickbutton function optional callback handler function for the button’s on-click event if you register the handler function, you must return a callback or promise value * see usage of onclickbutton handler usage of onclickbutton handler you can choose whether to proceed with the next "add to wallet" step using a promise or a callback function, if you register a callback handler in onclickbutton we recommend that you add the process of generating jwt cdata add cdata to options cdata to this handler, because of the cdata expiration time the function parameters are defined as follows attributes description options button attributes optional attributes of the current button callback function optional callback function to pass the flag to proceed default false promise resolve function optional promise-resolved value to pass the flag to proceed default false callback to web button process from callback attributes for es5 by executing a callback function with a flag, you can proceed to the next 'add to wallet' process onclickbutton function options, callback { // todo partner's process callback flag } callback to web button process from returning promise for es6 by returning a promise with a resolving flag, you can proceed to the next ‘add to wallet’ process onclickbutton async options => { return new promise async resolve, reject => { // todo partner's process await resolve flag } } importantthe card data token expires in 30 seconds after creation, so it needs to be created right after the user clicks the “add to wallet” button samsung wallet on the app the following outline explains how to implement the "add to wallet" button on a native application get button graphic resources from a repository depending on your service environment for more information, see image resources check availability by calling the "check service available devices" apo, then determine whether to show up the "add to wallet" button on the user device a if "available" on response has "true" -> support b if has "false" -> not support implement a jwt web link on the button triggered action app button on android [sample code implementation] public class walletcodesample { protected final static string tag = "samsungwalletsample"; protected static final string host = "https //api-us3 mpay samsung com"; protected static final string path = "wallet/cmn/v2 0/device/available"; /** * sample entry point of the usage */ public static void main { executors newsinglethreadexecutor submit -> { final string modelname = build model; final string countrycode = null; // optional country code iso_3166-2 final string servicetype = "wallet"; // required, fixed for samsung wallet final string partnercode = null; // required try { walletcodesample sample = new walletcodesample ; boolean iswalletsupported = sample checkwalletsupported modelname, countrycode, servicetype, partnercode ; string msg = string format "query for model %s , countrycode %s , servicetype %s , partnercode %s / wallet supported? %s ", modelname, countrycode, servicetype, partnercode, iswalletsupported ; log d tag, msg ; } catch exception e { // failed to check due to some reasons log e tag, e getmessage , e ; } } ; } /** * please see the wallet api spec document > '6 6 check service available devices' for more details * * @return true if wallet supported, otherwise false * @throws exception throws exception when it's not possible to get status due to any reasons */ public boolean checkwalletsupported @nonnull string modelname, @nullable string countrycode, @nonnull string servicetype, @nonnull string partnercode throws exception { if modelname == null || modelname isempty { log e tag, "model name is required parameter" ; throw new exception "something went wrong failed to get device model name " ; } if servicetype == null || servicetype isempty { log e tag, "servicetype is required parameter" ; throw new exception "something went wrong failed to get device servicetype " ; } if partnercode == null || partnercode isempty { log e tag, "partnercode is required parameter" ; throw new exception "something went wrong failed to get device partnercode " ; } string urlstring = makeurl modelname, countrycode, servicetype ; log i tag, "urlstring " + urlstring ; try { url url = new url urlstring ; httpurlconnection connection = httpurlconnection url openconnection ; connection setrequestproperty "partnercode", partnercode ; connection setrequestmethod "get" ; int responsecode = connection getresponsecode ; log i tag, "responsecode " + responsecode ; bufferedreader bufferedreader; if responsecode == 200 { bufferedreader = new bufferedreader new inputstreamreader connection getinputstream ; } else { bufferedreader = new bufferedreader new inputstreamreader connection geterrorstream ; } stringbuilder sb = new stringbuilder ; string inputline; while inputline = bufferedreader readline != null { log i tag, inputline ; sb append inputline ; } connection disconnect ; bufferedreader close ; // parse result jsonobject jsonobject = new jsonobject sb tostring ; string resultcode = jsonobject getstring "resultcode" ; string resultmessage = jsonobject getstring "resultmessage" ; if "0" equals resultcode && "success" equals resultmessage { return jsonobject getboolean "available" ; } else { throw new exception "something went wrong, resultcode " + resultcode + " , resultmessage " + resultmessage + " " ; } } catch ioexception e { log e tag, e getmessage , e ; throw new exception "something went wrong ioexception , " + e getmessage ; } catch jsonexception e { log e tag, e getmessage , e ; throw new exception "something went wrong, receive wrong formatted response, " + e getmessage ; } } protected string makeurl @nonnull string modelname, @nullable string countrycode, @nonnull string servicetype { stringbuilder sb = new stringbuilder ; sb append host append '/' ; sb append path ; sb append '?' append "servicetype" append '=' append servicetype ; sb append '&' append "modelname" append '=' append modelname ; if countrycode != null && !countrycode isempty { sb append '&' append "countrycode" append '=' append countrycode ; } return sb tostring ; } } importantthe card data token expires in 30 seconds after creation, so it needs to be created right after the user clicks the “add to wallet” button samsung wallet on an mms/email the following guides how to configure wallet code on email and mms messages implement the data fetch link process, including server apis you need to create a unique "reference id" for security reasons, make sure the "reference id" is complex enough that no important information can be inferred deliver a message including the web link through the chosen message platform for mms, the designed link shows up as a "smart suggestion" on samsung devices you can find a sample web link on the wallet cards guide on the partners portal for card data, samsung wallet asks the partner system to provide card details through the server api duplicate requests are prohibited on the same device link to “add to wallet” on an mms/email you can add an “add to wallet” web button even in environments where the javascript api cannot be loaded, such as sms or email these methods do not support controlling “add to wallet” button visibility [mms link] url link url attributes description url string required “add to wallet” link url * see data transmit link * see data fetch link [email on web button link] <a href="url"> <img src="image_url"> <img src="rd_impression_url" style="width 1px; height 1px;"> </a> attributes description url string required “add to wallet” link url * see data transmit link * see data fetch link image_url string required button’s image resource url * see image resources rd_impression_url string required impressions logging url * value granted from the partners portal statistics service samsung wallet serves useful statistics data of the integrated service on the partners portal the data configured by making simple api calls for each event such as button impression and click these are necessary to provide better services as well notestatistics api sample code you can find actual code sample at wallet script guide section in ‘wallet cards’ menu on the partner portal [event notification api] https //us-rd mcsvc samsung com/statistics/{event}/addtowlt?{parameters}&utm_source=partner&utm_medium={channel} {event} for each event in the following situations - impression when the “add to wallet” button has been shown - click when the “add to wallet” button has been clicked {parameters} includes key factors to figure out the service {channel} - app "samsung wallet" button in a native application - web "samsung wallet" button on the web - email "samsung wallet" button in an email for details, please visit 'wallet cards' menu on the partner portal
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.