Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 class partnerinfo java lang object com samsung android sdk samsungpay v2 partnerinfo all implemented interfaces android os parcelable public class partnerinfo extends object implements android os parcelable this class holds the partner information any third party application using the samsung pay sdk is considered as partner app the third party application can be an issuer app bank app , merchant app, and so on since api level 1 1 nested class summary nested classes/interfaces inherited from interface android os parcelable android os parcelable classloadercreator<t extends object>, android os parcelable creator<t extends object> field summary fields inherited from interface android os parcelable contents_file_descriptor, parcelable_write_return_value constructor summary constructors constructor description partnerinfo string serviceid constructor to create partner information partnerinfo string serviceid, android os bundle data constructor to create partner information method summary all methodsinstance methodsconcrete methods modifier and type method description android os bundle getdata api to get partner information extra extra data differs from partners string getserviceid api to get service id void setdata android os bundle data api to set partner information extra methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, wait, wait, wait constructor details partnerinfo public partnerinfo string serviceid constructor to create partner information parameters serviceid - unique id to represent the service partner should on-board with samsung pay developers to receive this id // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; partnerinfo pinfo = new partnerinfo serviceid ; // partner must set proper service type - since api level 1 4 bundle bundle = new bundle ; bundle putstring samsungpay partner_service_type, samsungpay servicetype app2app tostring ; pinfo setdata bundle ; since api level 1 1 partnerinfo public partnerinfo string serviceid, android os bundle data constructor to create partner information parameters serviceid - unique id to represent the service partner should on-board with samsung pay developers to receive this id data - extra data which partner wants to pass to samsung pay if partner app integrates sdk v1 4 00 or higher, service type must be set in data bundle refer to the usage sample below extra data bundle key-value pairs are defined as follows keys values samsungpay#extra_issuer_name string issuername issuercode for korean issuers issuer mandatory merchant not required samsungpay#partner_service_type string samsungpay servicetype abc tostring since api level 1 4 this value is mandatory because it will be used to verify if the service type is allowed or not // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; string issuername = "mybank"; bundle bundle = new bundle ; // set issuername in case of issuers bundle putstring samsungpay extra_issuer_name, issuername ; // set service type - since api level 1 4 bundle putstring samsungpay partner_service_type, samsungpay servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; since api level 1 1 method details getserviceid public string getserviceid api to get service id since api level 1 4, productid is replaced by serviceid returns service id since api level 1 4 getdata public android os bundle getdata api to get partner information extra extra data differs from partners for example, issuer app can set the samsungpay#extra_issuer_name with bundle returns extra data bundle passed to samsung pay since api level 1 1 setdata public void setdata android os bundle data api to set partner information extra extra data differs from partners for example, issuer app can set the samsungpay#extra_issuer_name with bundle if partner app integrates sdk v1 4 00 or higher, samsungpay#partner_service_type must be set in data bundle parameters data - extra data bundle passed to samsung pay since api level 1 1 samsung electronics samsung pay sdk 2 22 00 - nov 19 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 class samsungpay java lang object samsungpaybase com samsung android sdk samsungpay v2 samsungpay public final class samsungpay extends samsungpaybase this class provides apis to get the samsung pay status on the device also, this class provides apis to activate samsung pay on the device partner apps must check the samsung pay status on the device before performing any card management or payment operation since api level 1 1 constructor summary constructors constructor description samsungpay android content context context, partnerinfo partnerinfo constructor to get the samsungpay instance the caller should set the valid serviceid in partnerinfo method summary all methodsinstance methodsconcrete methods modifier and type method description void activatesamsungpay api to bring the samsung pay app to a state in which cards can be added samsung pay might be either in stub only state or samsung account is not signed in state partner app checks the samsung pay 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 and user can sign in to the app void getsamsungpaystatus statuslistener listener api to get the samsung pay status on the device partner issuers, merchants, and so on applications must call this api to check the current state of samsung pay before doing any operation void getwalletinfo list<string> keys, statuslistener listener api to get the requested wallet information from samsung pay partner app can use this information to uniquely identify the user and samsung pay app on a particular device void gotoupdatepage api to go to samsung pay update page partner app checks the samsung pay 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 app if samsung pay app version is same or bigger than 2 1 00, it goes to "about samsungpay" menu if samsung pay app version is lower than 2 1 00 or kr device, it launches samsung pay app main screen methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait constructor details samsungpay public samsungpay android content context context, partnerinfo partnerinfo constructor to get the samsungpay instance the caller should set the valid serviceid in partnerinfo partnerinfo is passed to samsung pay for partner verification context ct = activity; // or context ct = service; // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring samsungpay partner_service_type, samsungpay servicetype inapp_payment tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; samsungpay samsungpay = new samsungpay ct, pinfo ; parameters context - activity context or service context partnerinfo - partner information throws nullpointerexception - thrown if parameters are null since api level 1 1 method details getsamsungpaystatus public void getsamsungpaystatus statuslistener listener api to get the samsung pay status on the device partner issuers, merchants, and so on applications must call this api to check the current state of samsung pay 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 samsungpay partner_service_type, samsungpay servicetype inapp_payment tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; samsungpay samsungpay = new samsungpay context, pinfo ; samsungpay getsamsungpaystatus new statuslistener { @override public void onsuccess int status, bundle data { // success case if status == spay_ready { log d tag, "samsung pay is ready on the device" ; // perform your operation } else if status == spay_not_ready { // samsung pay 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 if status == spay_not_allowed_temporally { log d tag, "samsung pay is not allowed temporally" ; // if extra_error_reason is error_spay_connected_with_external_display, // guide user to disconnect it } else { // samsung pay is not supported on this device log d tag, "device does not support samsung pay" ; } } @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 samsungpay extra_error_reason if provided } } ; parameters listener - callback through which the result is provided on success, samsung pay status code is provided via statuslistener onsuccess int status, bundle data if samsung pay is ready to be used, samsungpay#spay_ready will be returned otherwise, samsungpay#spay_not_ready or samsungpay#spay_not_supported or samsungpay#spay_not_allowed_temporally can be returned with samsungpay#extra_error_reason from bundle also, partner can get extra information from bundle data bundle keys if provided bundle values #extra_country_code device country code iso 3166-1 alpha-2 #extra_member_id string memberid for korean issuers only 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 1 1 gotoupdatepage public void gotoupdatepage api to go to samsung pay update page partner app checks the samsung pay 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 app if samsung pay app version is same or bigger than 2 1 00, it goes to "about samsungpay" menu if samsung pay app version is lower than 2 1 00 or kr device, it launches samsung pay app main screen // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring samsungpay partner_service_type, samsungpay servicetype inapp_payment tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; samsungpay samsungpay = new samsungpay context, pinfo ; samsungpay gotoupdatepage ; since api level 1 2 activatesamsungpay public void activatesamsungpay api to bring the samsung pay app to a state in which cards can be added samsung pay might be either in stub only state or samsung account is not signed in state partner app checks the samsung pay 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 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 samsungpay partner_service_type, samsungpay servicetype inapp_payment tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; samsungpay samsungpay = new samsungpay context, pinfo ; samsungpay activatesamsungpay ; since api level 1 1 getwalletinfo public void getwalletinfo list<string> keys, statuslistener listener api to get the requested wallet information from samsung pay partner app can use this information to uniquely identify the user and samsung pay 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 samsungpay extra_issuer_name, "issuer name" ; bundle putstring samsungpay partner_service_type, samsungpay servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; samsungpay samsungpay = new samsungpay context, pinfo ; // bundle keys added to get wallet information from samsung pay // this information can be delivered to the partner server for eligibility check arraylist<string> keys = new arraylist<> ; keys add samsungpay wallet_user_id ; keys add samsungpay device_id ; samsungpay 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 samsungpay device_id ; // for visa, walletuserid can be set to "clientwalletaccountid" as defined by visa string walletuserid = walletdata get samsungpay 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 samsungpay 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 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 samsungpay#wallet_dm_id string device management id n/a paymentappinstanceid = device_id + padding "00" + wallet_dm_id *if you need 'paymentappinstanceid', you can generate it as above samsungpay#device_id string device id clientdeviceid samsungpay#wallet_user_id string wallet user id clientwalletaccountid 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 1 2 samsung electronics samsung pay sdk 2 22 00 - nov 19 2024
Develop TV Seller Office
docsamsung apps tv seller office the samsung apps tv seller office is the official system for smart tv applications certification and management it provides all the features needed to submit your application for verification testing, get feedback from the samsung team, as well as manage application versions, usage statistics, and metadata it also contains automatic pre-test tools for immediate feedback about your application and a dedicated 1 1 q&a board for direct assistance from samsung engineers application distribution workflow step 1 partnership step 2 application registration step 3 certification step 4 management sign up request partnership group management application info registration application upload & pre-test submit application version testing defect resolution statistics application service change 1 1 q&a essentials partnership you can request a partnership online if a prior agreement has been made with your samsung content manager after registering the basic company information and getting it approved by the content manager, your company becomes a partner group partner groups can provide services in all countries, including the united states learn more auto pre-test tool you can perform a pre-test while uploading application package before the actual certification step this helps in detecting critical defects before submitting the application all test cases for this tool are provided in the launch checklist the guide contains an essential checklist of basic functionality and service policies it will help increase the validation pass rate of your application and ensure the application quality before submission learn more tech support once you’ve become a samsung smart tv partner, you can have a dedicated technical support from samsung engineering team in developing applications learn more alpha & beta testing before you publish an application to samsung apps tv, you can first distribute the beta to users to receive usability assessments for new features and conduct beta tests to identify problems especially for samsung smart tv partners, you can distribute the alpha version in the application development process to the developer's tvs, downloading/installing it in real environments, and testing it to work as for intended learn more samsung checkout samsung checkout provides a seamless purchase experience on smart tv where consumers can register their payment methods safely and make payments with minimal number of clicks in a tv environment samsung checkout also provides a comprehensive global monetization platform empowering developers and content providers to integrate various business models and promotional campaigns into their services learn more
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 Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 card class cardmanager java lang object com samsung android sdk samsungpay v2 spaysdk com samsung android sdk samsungpay v2 card cardmanager all implemented interfaces apptoappconstants public final class cardmanager extends spaysdk implements apptoappconstants this class provides apis for card management the apis include getting card status, adding new card to samsung pay, and so on note whenever a new instance of cardmanager is created, all pending requests which were sent by another instances will be discarded it would be helpful when partner application attempt to send a request again however, in a single session of partner application, you should maintain only one instance of this class and use it to send requests to samsung pay application since api level 1 1 nested class summary nested classes/interfaces inherited from class com samsung android sdk samsungpay v2 spaysdk spaysdk brand, spaysdk servicetype, spaysdk transactiontype field summary fields modifier and type field description 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 string push_provision_error this table shows the status codes used commonly status bundle keys bundle values spaysdk error_registration_fail -104 spaysdk 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 spaysdk extra_request_id string value returned from server apptoappconstants error_tsm_fail -507 spaysdk extra_error_reason string error message for tsm solution fields inherited from class com samsung android sdk samsungpay v2 spaysdk common_status_table, cryptogram_type_icc, cryptogram_type_ucaf, device_id, device_type_gear, device_type_phone, error_android_platform_check_fail, error_device_integrity_check_fail, error_device_not_samsung, error_duplicated_sdk_api_called, error_expired_or_invalid_debug_key, error_initiation_fail, error_missing_information, error_no_network, error_none, error_not_allowed, error_not_found, error_not_supported, error_partner_app_blocked, error_partner_app_signature_mismatch, error_partner_app_version_not_supported, error_partner_info_invalid, error_partner_not_approved, error_partner_sdk_api_level, error_partner_sdk_version_not_allowed, error_partner_service_type, error_registration_fail, error_sdk_not_supported_for_this_region, error_server_internal, error_server_no_response, error_service_id_invalid, error_service_not_approved_for_release, error_service_unavailable_for_this_region, error_spay_app_integrity_check_fail, error_spay_app_need_to_update, error_spay_connected_with_external_display, error_spay_fmm_lock, error_spay_internal, error_spay_pkg_not_found, error_spay_sdk_service_not_available, error_spay_setup_not_completed, error_unable_to_verify_caller, error_unauthorized_request_type, error_user_canceled, error_user_not_registered_for_debug, extra_accept_combo_card, extra_card_type, extra_country_code, extra_cpf_holder_name, extra_cpf_number, extra_cryptogram_type, extra_device_card_limit_reached, extra_device_type, extra_error_reason, extra_error_reason_message, extra_issuer_name, extra_issuer_pkgname, extra_last4_dpan, extra_last4_fpan, extra_member_id, extra_merchant_ref_id, extra_online_transaction_type, extra_partner_name, extra_request_id, extra_require_cpf, extra_resolved_1, extra_resolved_2, extra_resolved_3, extra_resolved_4, extra_resolved_5, extra_resolved_6, extra_resolved_7, partner_service_type, spay_has_no_transit_card, spay_has_transit_card, spay_not_allowed_temporally, spay_not_ready, spay_not_supported, spay_ready, wallet_dm_id, wallet_user_id 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 cardmanager android content context context, partnerinfo partnerinfo api to get the cardmanager instance the caller should set valid serviceid method summary all methodsinstance methodsconcrete methods modifier and type method description void addcard addcardinfo addcardinfo, addcardlistener listener api to add a card from partner app example issuer/bank app to samsung pay partner app uses this api to add card to samsung pay by providing the required card details void addcobadgecard addcardinfo primaryaddcardinfo, addcardinfo secondaryaddcardinfo, addcardlistener listener api to add a co-badge card from partner app example issuer/bank app to samsung pay partner app uses this api to add co-badge card to samsung pay by providing the required card details void getallcards android os bundle cardfilter, getcardlistener listener api to get all the cards from samsung pay for the given filter void verifycardidv idvverifyinfo idvverifyinfo, statuslistener listener api to verify and activate a card in samsung pay issuer app uses this api to send verification code back to token network to activate a card on samsung pay when adding a card to samsung pay, the issuer/card network may request secondary authentication idv the user can verify idv via issuer app and after user verification by logging to issuer app , issuer app sends some information back to issuer/card network via samsung pay to activate the card methods inherited from class com samsung android sdk samsungpay v2 spaysdk getversioncode, getversionname methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait field details 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 1 2 see also constant field values push_provision_error public static final string push_provision_error this table shows the status codes used commonly status bundle keys bundle values spaysdk error_registration_fail -104 spaysdk 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 spaysdk extra_request_id string value returned from server apptoappconstants error_tsm_fail -507 spaysdk extra_error_reason string error message for tsm solution see also constant field values constructor details cardmanager public cardmanager android content context context, partnerinfo partnerinfo api to get the cardmanager instance the caller should set valid serviceid partnerinfo is passed to samsung pay 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 samsungpay extra_issuer_name, issuername ; bundle putstring samsungpay partner_service_type, samsungpay servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; cardmanager cardmanager = new cardmanager ct, pinfo ; parameters context - activity context or service context partnerinfo - partner information throws nullpointerexception - thrown if parameters are null since api level 1 1 method details 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 partner app uses this api to add card to samsung pay by providing the required card details this helps user to add their cards to samsung pay directly from partner app cardmanager cardmanager = new cardmanager ct, pinfo ; string cardtype = card card_type_credit; string tokenizationprovider = addcardinfo provider_abcd; // get it from issuer app // samsung pay 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 ; cardmanager 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 samsungpay extra_error_reason or samsungpay 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 spaysdk 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 codes from the push_provision_error with bundle data note please refer spaysdk common_status_table for other error status in case of tsm, please refer addcardlistener onprogress int, int, bundle throws nullpointerexception - thrown if parameters are null since api level 1 2 addcobadgecard public void addcobadgecard @nonnull addcardinfo primaryaddcardinfo, @nonnull addcardinfo secondaryaddcardinfo, @nonnull addcardlistener listener api to add a co-badge card from partner app example issuer/bank app to samsung pay partner app uses this api to add co-badge card to samsung pay by providing the required card details this helps user to add their cards to samsung pay directly from partner app parameters primaryaddcardinfo - detail primary card information to add secondaryaddcardinfo - detail secondary card information to add listener - callback through which the result is provided on success, addcardlistener onsuccess int, card is invoked with spaysdk 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 codes from the push_provision_error with bundle data note please refer spaysdk common_status_table for other error status in case of tsm, please refer addcardlistener onprogress int, int, bundle throws nullpointerexception - thrown if parameters are null since api level 2 22 getallcards public void getallcards @nullable android os bundle cardfilter, @nonnull getcardlistener listener api to get all the cards from samsung pay for the given filter since api level 2 13, getallcards bundle, getcardlistener would return a card list in which a card of spaysdk brand visa brand would hold a token reference id as its card getcardid instead of a provisioned token id in earlier api level since api level 1 4, partner must define issuer names as a card filter on samsung pay developers while on-boarding bundle cardfilter = new bundle ; // since api level 1 4, card filter is retrieved from samsung pay developers // no need to set from partner app cardfilter putstring cardmanager extra_issuer_name, issuername ; cardmanager 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 cardmanager extra_last4_fpan ; string last4dpan = s getcardinfo getstring cardmanager extra_last4_dpan ; string app2apppayload = s getcardinfo getstring cardmanager extra_app2app_payload ; string cardtype = s getcardinfo getstring cardmanager extra_card_type ; string cardissuername = s getcardinfo getstring cardmanager 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 samsungpay extra_error_reason if provided } } ; parameters cardfilter - filter to limit the card list since api level 1 4, issuer name filter is retrieved from samsung pay developers cardfilter bundle key-value pairs are defined as follows keys values spaysdk extra_issuer_name string issuername issuercode for korean issuers 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 15 verifycardidv public void verifycardidv @nonnull idvverifyinfo idvverifyinfo, @nonnull statuslistener listener api to verify and activate a card in samsung pay issuer app uses this api to send verification code back to token network to activate a card on samsung pay when adding a card to samsung pay, the issuer/card network may request secondary authentication idv the user can verify idv via issuer app and after user verification by logging to issuer app , issuer app sends some information back to issuer/card network via samsung pay to activate the card cardmanager cardmanager = new cardmanager ct, pinfo ; // issuer can get cardid from getallcards api result string cardid = "card_id_example_dummy" ; // issuer app gets card status from samsung pay and talks to issuer server // and gets authentication code string authcode = "auth_code_example_dummy"; // if any extra information issuer wants to pass to card network/issuer server bundle cardinfodata = new bundle ; idvverifyinfo idvverifyinfo = new idvverifyinfo cardid, authcode, cardinfodata ; // in case auth code is generated for sms or email, // set authcodetype as idvverifyinfo idv_type_sms or idvverifyinfo idv_type_email // if you don't specify any value for authcodetype, idv_type_app2app will be used by default idvverifyinfo setidnvtype idvverifyinfo idv_type_app2app ; cardmanager verifycardidv idvverifyinfo, new statuslistener { @override public void onsuccess int status, bundle data { // log d tag, "verification code successfully send to server" ; } @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 samsungpay extra_error_reason if provided } } ; parameters idvverifyinfo - card verification information from issuer listener - verification status callback through which the result is provided on success, statuslistener onsuccess int status, bundle data is invoked when request operation is success on any failure, the failure code is provided via statuslistener onfail int errorcode, bundle errordata the failure code can be one of the following codes with bundle data status bundle keys bundle values apptoappconstants error_verify_card -8 spaysdk extra_error_reason apptoappconstants error_auth_code_invalid -517 apptoappconstants error_auth_code_expired -518 apptoappconstants error_auth_code_max_try_reached -519 apptoappconstants error_auth_code_type_invalid -520 apptoappconstants error_card_idv_not_supported -521 note please refer spaysdk common_status_table in detail throws nullpointerexception - thrown if parameters are null since api level 1 1 samsung electronics samsung pay sdk 2 22 00 - nov 19 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 payment class paymentmanager java lang object com samsung android sdk samsungpay v2 spaysdk com samsung android sdk samsungpay v2 payment paymentmanager public final class paymentmanager extends spaysdk this class provides apis for payment related operations example in-app payment partner merchants and other third party applications can use these apis to perform variety of payment operations for instance, partner apps can - request in-app payment - start simple pay on samsung pay - fetch available cards on samsung pay for payment since api level 1 1 nested class summary nested classes modifier and type class description static interface paymentmanager cardinfolistener this interface is for listening requestcardinfo callback events static interface paymentmanager customsheettransactioninfolistener this interface is for listening callback events of online in-app custom sheet payment this is invoked when card is changed by the user on the custom payment sheet, and also with the success or failure of online in-app payment this listener is registered when startinapppaywithcustomsheet customsheetpaymentinfo, customsheettransactioninfolistener api is called caution amountboxcontrol must be returned in oncardinfoupdated on sheetupdatedlistener to remove progress bar on custom payment sheet class paymentmanager inapppaymentcallback class paymentmanager inappuserinfocallback nested classes/interfaces inherited from class com samsung android sdk samsungpay v2 spaysdk spaysdk brand, spaysdk servicetype, spaysdk transactiontype field summary fields modifier and type field description static final int custom_message the merchant can call the updatesheet customsheet, int, string api with this error when it wants to display a custom error message on customsheet static final int error_address_updated_time_out indicates that online payment address updating is timed out static final int error_billing_address_invalid the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the billing address shared by samsung pay to the merchant is invalid static final int error_billing_address_not_exist the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the billing address shared by samsung pay does not exist static final int error_card_not_supported_online_pay indicates that this card does not support online pay static final int error_internal_address_updated indicates address update internal error static final int error_making_sheet_failed indicates that making sheet has failed static final int error_not_ready_payment indicates that online payment is not ready to complete because of various types of errors for example, internal error, unexpected error from samsung pay app, and so on static final int error_shipping_address_invalid the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the shipping address shared by samsung pay to the merchant is invalid static final int error_shipping_address_not_exist the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the shipping address shared by samsung pay does not exist static final int error_shipping_address_unable_to_ship the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the shipping address shared by samsung pay is not available for delivery by the merchant static final int error_spay_reset indicates that spay will be reset static final int error_transaction_closed indicates that transaction ui has closed static final int error_transaction_timed_out indicates that online payment processing has timed out static final string extra_key_additional_data key to represent additional data partner can use this key to put tagged data to a bundle before sending to samsung pay static final string extra_key_card_brand_filter key to represent request card filter list partner can use this key to put filter into bundle for requestcardinfo bundle, cardinfolistener static final string extra_key_test_mode key to represent pg test mode to prevent payment transaction being processed if the value is true, samsung-pg interface server redirects payment info to test pg server this is only for pg-indirect model static final string extra_logo_image_url key to represent the url of partner logo image on simple pay image width max static final string extra_pay_operation_type key to represent start simple pay operation type the possible values are pay_operation_type_payment pay_operation_type_refund static final string extra_transaction_date key to represent transaction date value when start simple pay to refund this is for korean issuers only example value mapped with this key 201906211428 yyyymmddhhmm static final string extra_transaction_number key to represent transaction number value when start simple pay to refund this is for korean issuers only maximum length is 14 static final string extra_transaction_type key to represent transaction type the possible values are transaction_type_mst transaction_type_nfc static final string pay_operation_type_payment indicates start simple pay option to make payment static final string pay_operation_type_refund indicates start simple pay option to make refund this is for korean issuers only static final int transaction_type_mst indicates that transaction type is mst static final int transaction_type_nfc indicates that transaction type is nfc fields inherited from class com samsung android sdk samsungpay v2 spaysdk common_status_table, cryptogram_type_icc, cryptogram_type_ucaf, device_id, device_type_gear, device_type_phone, error_android_platform_check_fail, error_device_integrity_check_fail, error_device_not_samsung, error_duplicated_sdk_api_called, error_expired_or_invalid_debug_key, error_initiation_fail, error_invalid_parameter, error_missing_information, error_no_network, error_none, error_not_allowed, error_not_found, error_not_supported, error_partner_app_blocked, error_partner_app_signature_mismatch, error_partner_app_version_not_supported, error_partner_info_invalid, error_partner_not_approved, error_partner_sdk_api_level, error_partner_sdk_version_not_allowed, error_partner_service_type, error_registration_fail, error_sdk_not_supported_for_this_region, error_server_internal, error_server_no_response, error_service_id_invalid, error_service_not_approved_for_release, error_service_unavailable_for_this_region, error_spay_app_integrity_check_fail, error_spay_app_need_to_update, error_spay_connected_with_external_display, error_spay_fmm_lock, error_spay_internal, error_spay_pkg_not_found, error_spay_sdk_service_not_available, error_spay_setup_not_completed, error_unable_to_verify_caller, error_unauthorized_request_type, error_user_canceled, error_user_not_registered_for_debug, extra_accept_combo_card, extra_card_type, extra_country_code, extra_cpf_holder_name, extra_cpf_number, extra_cryptogram_type, extra_device_card_limit_reached, extra_device_type, extra_error_reason, extra_error_reason_message, extra_issuer_name, extra_issuer_pkgname, extra_last4_dpan, extra_last4_fpan, extra_member_id, extra_merchant_ref_id, extra_online_transaction_type, extra_partner_name, extra_request_id, extra_require_cpf, extra_resolved_1, extra_resolved_2, extra_resolved_3, extra_resolved_4, extra_resolved_5, extra_resolved_6, extra_resolved_7, partner_service_type, spay_has_no_transit_card, spay_has_transit_card, spay_not_allowed_temporally, spay_not_ready, spay_not_supported, spay_ready, wallet_dm_id, wallet_user_id constructor summary constructors constructor description paymentmanager android content context context, partnerinfo partnerinfo constructor of paymentmanager class the caller should set a valid serviceid in partnerinfo method summary all methodsinstance methodsconcrete methods modifier and type method description void requestcardinfo android os bundle requestfilter, paymentmanager cardinfolistener listener api to request card information of the available cards for payment using samsung pay the partner app can use this api to query available cards user already has registered in samsung pay and decide whether to display samsung pay button or not on their application for example, if merchant app supports only one specific card brand, but the user has not registered any card with the brand, then merchant app decides not to display the samsung pay button with this query void startinapppaywithcustomsheet customsheetpaymentinfo customsheetpaymentinfo, paymentmanager customsheettransactioninfolistener listener api to request online in-app payment with samsung pay void startsimplepay cardinfo cardinfo, statuslistener listener api to request payment with simple pay using this api, partner app can start the samsung pay payment screen for a specific card for example, user can login to partner app example bank app , view the list of cards, and select a card which is already registered in samsung pay to make in-store payment void updatesheet customsheet sheet api to update sheet on the custom payment sheet void updatesheet customsheet sheet, int errorcode, string customerrormessage api to update sheet on the custom payment sheet and display a custom error message methods inherited from class com samsung android sdk samsungpay v2 spaysdk getversioncode, getversionname methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait field details extra_pay_operation_type public static final string extra_pay_operation_type key to represent start simple pay operation type the possible values are pay_operation_type_payment pay_operation_type_refund see also constant field values pay_operation_type_payment public static final string pay_operation_type_payment indicates start simple pay option to make payment see also constant field values pay_operation_type_refund public static final string pay_operation_type_refund indicates start simple pay option to make refund this is for korean issuers only see also constant field values extra_transaction_date public static final string extra_transaction_date key to represent transaction date value when start simple pay to refund this is for korean issuers only example value mapped with this key 201906211428 yyyymmddhhmm see also constant field values extra_transaction_number public static final string extra_transaction_number key to represent transaction number value when start simple pay to refund this is for korean issuers only maximum length is 14 see also constant field values extra_transaction_type public static final string extra_transaction_type key to represent transaction type the possible values are transaction_type_mst transaction_type_nfc see also constant field values transaction_type_mst public static final int transaction_type_mst indicates that transaction type is mst see also constant field values transaction_type_nfc public static final int transaction_type_nfc indicates that transaction type is nfc see also constant field values error_not_ready_payment public static final int error_not_ready_payment indicates that online payment is not ready to complete because of various types of errors for example, internal error, unexpected error from samsung pay app, and so on see also constant field values extra_logo_image_url public static final string extra_logo_image_url key to represent the url of partner logo image on simple pay image width max 330 pixels image height 72 pixels see also constant field values extra_key_test_mode public static final string extra_key_test_mode key to represent pg test mode to prevent payment transaction being processed if the value is true, samsung-pg interface server redirects payment info to test pg server this is only for pg-indirect model since api level 2 3 see also constant field values extra_key_additional_data public static final string extra_key_additional_data key to represent additional data partner can use this key to put tagged data to a bundle before sending to samsung pay since api level 2 4 see also constant field values extra_key_card_brand_filter public static final string extra_key_card_brand_filter key to represent request card filter list partner can use this key to put filter into bundle for requestcardinfo bundle, cardinfolistener since api level 2 7 see also constant field values error_transaction_timed_out public static final int error_transaction_timed_out indicates that online payment processing has timed out see also constant field values error_transaction_closed public static final int error_transaction_closed indicates that transaction ui has closed see also constant field values error_address_updated_time_out public static final int error_address_updated_time_out indicates that online payment address updating is timed out see also constant field values error_internal_address_updated public static final int error_internal_address_updated indicates address update internal error see also constant field values error_making_sheet_failed public static final int error_making_sheet_failed indicates that making sheet has failed see also constant field values error_spay_reset public static final int error_spay_reset indicates that spay will be reset see also constant field values error_shipping_address_invalid public static final int error_shipping_address_invalid the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the shipping address shared by samsung pay to the merchant is invalid see also constant field values error_shipping_address_unable_to_ship public static final int error_shipping_address_unable_to_ship the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the shipping address shared by samsung pay is not available for delivery by the merchant see also constant field values error_shipping_address_not_exist public static final int error_shipping_address_not_exist the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the shipping address shared by samsung pay does not exist see also constant field values error_billing_address_invalid public static final int error_billing_address_invalid the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the billing address shared by samsung pay to the merchant is invalid see also constant field values error_billing_address_not_exist public static final int error_billing_address_not_exist the merchant can call the updateamountfailed int or updatesheet customsheet, int, string api with this error when the billing address shared by samsung pay does not exist see also constant field values custom_message public static final int custom_message the merchant can call the updatesheet customsheet, int, string api with this error when it wants to display a custom error message on customsheet see also constant field values error_card_not_supported_online_pay public static final int error_card_not_supported_online_pay indicates that this card does not support online pay since api level 2 5 see also constant field values constructor details paymentmanager public paymentmanager android content context context, partnerinfo partnerinfo constructor of paymentmanager class the caller should set a valid serviceid in partnerinfo partnerinfo is passed to samsung pay for caller verification context ct = activity; // or context ct = service; // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid" ; bundle bundle = new bundle ; bundle putstring samsungpay partner_service_type, samsungpay servicetype inapp_payment tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; paymentmanager paymentmanager = new paymentmanager ct, pinfo ; parameters context - activity context or service context partnerinfo - partner information throws nullpointerexception - if the context or partnerinfo is null since api level 1 1 method details requestcardinfo public void requestcardinfo android os bundle requestfilter, @nonnull paymentmanager cardinfolistener listener api to request card information of the available cards for payment using samsung pay the partner app can use this api to query available cards user already has registered in samsung pay and decide whether to display samsung pay button or not on their application for example, if merchant app supports only one specific card brand, but the user has not registered any card with the brand, then merchant app decides not to display the samsung pay button with this query // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring samsungpay partner_service_type, samsungpay servicetype inapp_payment tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; paymentmanager paymentmanager = new paymentmanager context, pinfo ; boolean enablepaybutton = false; paymentmanager cardinfolistener cardinfolistener = new paymentmanager cardinfolistener { @override public void onresult list<cardinfo> cardlist { // cardinfo list for available cards if cardlist != null && cardlist size > 0 { // this means registered card s found in samsung pay for cardinfo cardinfo cardlist { if cardinfo getbrand == spaysdk brand abcd { enablepaybutton = true; break; } } } } @override public void onfailure 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 samsungpay extra_error_reason if provided } }; bundle filter = new bundle ; arraylist<paymentmanager brand> list = new arraylist<> ; list add paymentmanager brand visa ; list add paymentmanager brand mastercard ; filter putparcelablearraylist paymentmanager extra_key_card_brand_filter, list ; paymentmanager requestcardinfo filter, cardinfolistener ; parameters requestfilter - filter to limit return cardinfo list this is optional parameter if the caller does not set any value, all the cards which are available for online in-app payment on samsung pay are returned listener - callback through which the result is provided on success, paymentmanager cardinfolistener onresult list is invoked with cardinfo list on any failure, the failure code is provided via paymentmanager cardinfolistener onfailure int, bundle note please refer spaysdk common_status_table in detail throws nullpointerexception - if the cardinfolistener is null since api level 1 1 updatesheet public void updatesheet customsheet sheet api to update sheet on the custom payment sheet @override public void oncardinfoupdated cardinfo selectedcardinfo, customsheet customsheet { amountboxcontrol amountboxcontrol = amountboxcontrol customsheet getsheetcontrol amount_control_id ; if amountboxcontrol == null { log d tag, "transaction failed / amountboxcontrol is null " ; return; } // you can set updated amount 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 ; // call updatesheet api method with amountboxcontrol this is mandatory paymentmanager updatesheet customsheet ; } parameters sheet - customsheet is to be updated throws illegalstateexception - thrown if service is disconnected nullpointerexception - thrown if the sheetcontrol is null since api level 1 3 updatesheet public void updatesheet customsheet sheet, int errorcode, string customerrormessage api to update sheet on the custom payment sheet and display a custom error message @override public void oncardinfoupdated cardinfo selectedcardinfo, customsheet customsheet { amountboxcontrol amountboxcontrol = amountboxcontrol customsheet getsheetcontrol amount_control_id ; if amountboxcontrol == null { log d tag, "transaction failed / amountboxcontrol is null " ; return; } // you can set updated amount 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 ; // if merchant want to display error message, call updatesheet api method with custom_message error code and text message paymentmanager updatesheet customsheet, paymentmanager custom_message, "phone number is not valid please change your phone number!" ; } parameters sheet - customsheet is to be updated errorcode - this code should be custom_message if merchant wants to use its own message customerrormessage - if errorcode is set to custom_message then this parameter will be used to display the message on the payment sheet, else it will be ignored throws illegalstateexception - thrown if service is disconnected nullpointerexception - thrown if the sheetcontrol is null since api level 1 5 startsimplepay public void startsimplepay @nonnull cardinfo cardinfo, @nonnull statuslistener listener api to request payment with simple pay using this api, partner app can start the samsung pay payment screen for a specific card for example, user can login to partner app example bank app , view the list of cards, and select a card which is already registered in samsung pay to make in-store payment samsung pay is launched with the selected card for payment the user can authenticate and start the payment partner app needs to obtain an usage permission of startsimplepay api in server-side without the permission, calling of startsimplepay api would be failed // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring samsungpay partner_service_type, samsungpay servicetype app2app tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; paymentmanager paymentmanager = new paymentmanager context, pinfo ; string cardid = "cardid_test"; bundle metadata = new bundle ; // // set values in metadata bundle // cardinfo cardinfo = new cardinfo builder setcardid cardid setcardmetadata metadata build ; paymentmanager startsimplepay cardinfo, new statuslistener { @override public void onsuccess int status, bundle data { // called when start samsung pay simple pay is showed to user with specified card log d tag, "simple pay is shown" ; } @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 samsungpay extra_error_reason if provided } } ; how to set metadata in cardinfo - case 1 requesting in-store payment metadata putstring paymentmanager extra_pay_operation_type, paymentmanager pay_operation_type_payment ; metadata putstring paymentmanager extra_issuer_name, "issuername_test" ; metadata putint paymentmanager extra_transaction_type, paymentmanager transaction_type_mst | paymentmanager transaction_type_nfc ; // set logo image and background color for simple pay screen metadata putstring paymentmanager extra_logo_image_url, "http //testbank com/logo png" ; - case 2 requesting refund for in-store payment for korean issuers only metadata putstring paymentmanager extra_pay_operation_type, paymentmanager pay_operation_type_refund ; metadata putstring paymentmanager extra_issuer_name, "issuername" ; metadata putstring paymentmanager extra_transaction_date, "yyyymmddhhmm" ; metadata putstring paymentmanager extra_transaction_number, "1234567890" ; metadata putint paymentmanager extra_transaction_type, paymentmanager transaction_type_mst | paymentmanager transaction_type_nfc ; parameters cardinfo - card information to pay cardmetadata bundle key-value pairs can be defined as follows keys values samsungpay#extra_issuer_name string issuername issuercode for korean issuers extra_pay_operation_type pay_operation_type_payment pay_operation_type_refund for korean issuers only extra_transaction_type - for korean issuers effective as requested - for other country issuers effective depends on device configuration i e in uk, only nfc supported or card meta-data token profile from card network transaction_type_mst transaction_type_nfc transaction_type_mst | transaction_type_nfc extra_transaction_date string transaction date for refund for korean issuers only extra_transaction_number string transaction number for refund for korean issuers only extra_logo_image_url string issuer logo image url listener - statuslistener instance callback through which the result is provided on success, statuslistener onsuccess int status, bundle data is invoked with spaysdk error_none status code 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 cardinfo or statuslistener is null illegalargumentexception - thrown if cardinfo getcardmetadata does not have extra_pay_operation_type and extra_transaction_type since api level 1 1 startinapppaywithcustomsheet public void startinapppaywithcustomsheet @nonnull customsheetpaymentinfo customsheetpaymentinfo, @nonnull paymentmanager customsheettransactioninfolistener listener api to request online in-app payment with samsung pay partner app can use this api to make in-app purchase using samsung pay from their application with custom payment sheet you can refer to startinapppay paymentinfo, transactioninfolistener in case of normal payment sheet // create {@link customsheet} to contain sheetcontrols customsheet sheet = new customsheet ; // make sheetcontrols you want and add to custom sheet // each sheetcontrol is located in sequence // there must be a amountboxcontrol and it must be located on last // add {@link addresscontrol} on custom payment sheet sheet addcontrol new addresscontrol ; // add {@link plaintextcontrol} on custom payment sheet sheet addcontrol new plaintextcontrol ; // add {@link spinnercontrol} on custom payment sheet sheet addcontrol new spinnercontrol ; // add {@link amountboxcontrol} on custom payment sheet sheet addcontrol new amountboxcontrol ; // create {@link customsheetpaymentinfo} with in-app details customsheetpaymentinfo custompaymentreq = new customsheetpaymentinfo builder setmerchantid merchantid setmerchantname merchantname setordernumber ordernumber // the allowed characters are [a-z][a-z][0-9,-] & up to 36 characters setpaymentprotocol protocol setaddressinpaymentsheet addressinpaymentsheet setallowedcardbrands brandlist setcardholdernameenabled iscardholdernameenabled setcustomsheet sheet // set the serviceid which is assigned by the samsung pay developer during on boarding string serviceid = "sampleserviceid"; bundle bundle = new bundle ; bundle putstring samsungpay partner_service_type, samsungpay servicetype inapp_payment tostring ; partnerinfo pinfo = new partnerinfo serviceid, bundle ; // create {@link paymentmanager#paymentmanager context, partnerinfo } paymentmanager paymentmanger = new paymentmanager this, pinfo ; // set {@link customsheettransactioninfolistener} paymentmanager customsheettransactioninfolistener transactionlistener = new paymentmanager customsheettransactioninfolistener { @override public void oncardinfoupdated cardinfo selectedcardinfo, customsheet customsheet { log d tag, "oncardinfoupdated" ; // called when the user changes the card in samsung pay // newly selected cardinfo is passed and partner app // can update transaction amount based on new card if needed } @override public void onsuccess customsheetpaymentinfo customsheetpaymentinfo, string paymentcredential, bundle extrapaymentdata { log d tag, "transaction successfully received paymentcredential from samsung pay" ; // called when samsung pay able to create in-app cryptogram successfully // partner app will send this cryptogram to partner server/payment gateway and complete // in-app payment } @override public void onfailure 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 samsungpay extra_error_reason if provided } } // execute startinapppaywithcustomsheet to show custom payment sheet try { paymentmanger startinapppaywithcustomsheet custompaymentreq, transactionlistener ; } catch nullpointerexception e | illegalstateexception e | illegalargumentexception e { e printstacktrace ; } parameters customsheetpaymentinfo - custom sheet and payment information from partner app merchant app listener - callback through which the result is provided on success, paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle is invoked with payment credential paymentmanager customsheettransactioninfolistener oncardinfoupdated cardinfo, customsheet is invoked when user changes the card on the payment sheet in samsung pay on any failure, the failure error code and error data are provided via paymentmanager customsheettransactioninfolistener onfailure int, bundle the failure code can be one of the following codes with bundle data status spaysdk error_user_canceled -7 spaysdk error_duplicated_sdk_api_called -105 error_not_ready_payment -108 error_transaction_timed_out -111 error_transaction_closed -112 error_card_not_supported_online_pay -402 error_address_updated_time_out -113 error_making_sheet_failed -115 note please refer spaysdk common_status_table for other status throws nullpointerexception - thrown if parameters are null illegalstateexception - thrown if samsung pay sdk service is not available illegalargumentexception - thrown if mandatory custom sheet information and payment information values are not set since api level 1 3 samsung electronics samsung pay sdk 2 22 00 - nov 19 2024
Distribute Samsung IAP for Galaxy Watch (Tizen)
docweb iap for galaxy watch samsung in-app purchase iap for galaxy watch is a galaxy store service that allows third-party watch applications to sell in-app items iap for galaxy watch only works if your galaxy watch is paired with your phone the iap client for watch communicates with the iap client for phone which internally manages communication with supporting iap services and the samsung ecosystem such as samsung account, samsung checkout, and samsung rewards in other words, it acts as an intermediary between watch app and samsung iap system of the phone you can concentrate on integrating iap api calls and iap server api calls into your watch app to integrate iap for galaxy watch using tizen extension sdk, iap web apis enable you to easily integrate iap functionality into your watch app, such as configuring iap, getting item details, offering and selling items, and managing purchased items using galaxy watch studio formerly galaxy watch designer , you can make your own watch face that prompts for payment after a free trial period, without the complexity of coding for more details, see the galaxy watch studio online tutorial by integrating iap features, your watch apps can sell these types of in-app items item type description consumable app users can use items only one time for example, coins, special powers, or gems non-consumable app users can use items any number of times for example, e-books or game boards items cannot be repurchased note during iap integration testing, if your application sets to test mode, the purchase record is initialized every 60 minutes to allow repurchase auto-recurring subscription these items are purchased automatically at specific intervals app users can access items such as magazines, e-zines, or newspapers any number of times during a free trial or while their paid subscriptions are active app users can cancel at any time after purchase during subscription period app users can repurchase items after cancellation note during iap integration testing, if your application is set to test mode, the subscription cycle is automatically renewed every 10 minutes and the subscription is automatically canceled after 12 renewals integrate iap into your watch app this section explains how to prepare your app to sell in-app items using tizen extension sdk you can use galaxy watch studio to make a watch face that prompts for payment after a free trial period, without the complexity of coding to prepare for integrating iap features and testing the integration, do the following 1 create a project create a project in tizen studio the required_version must be at least 2 3 2 in the config xml file <?xml version="1 0" encoding="utf-8"?> <widget xmlns tizen="http //tizen org/ns/widgets" xmlns="http //www w3 org/ns/widgets" id="http //yourdomain/webiap" version="1 0 6" viewmodes="maximized"> <tizen application id="wxwmxrcelo webiap" package="wxwmxrcelo" required_version="4 0 0"/> </widget> 2 add permissions to config xml <tizen privilege name="http //tizen org/privilege/billing"/> 3 register an app and in-app items in seller portal during iap integration, you may need to test iap features samsung iap needs information about your app and in-app items registered in seller portal note your app does not need to have iap features integrated in order to register the app and its in-app items as iap integration proceeds, you can upload new versions of your app and new in-app items as needed to register an app and its in-app items sign in to seller portal https //seller samsungapps com using your samsung account click add new application click galaxy watch, select the default language, and click next in the binary tab, upload your app tpk in the app information tab, enter fundamental app details in the country / region & price tab, specify a free or paid app, a paid app price, and countries to sell your items in the in app purchase tab, register one or more in-app items caution don't click *submit beta test * or *submit * in this step for more app registration details, see the app registration guide for more in-app item registration details, see the item registration guide 4 integrate iap features get in-app items available for purhcase purchase an in-app item get a list of purchased items operation mode iap supports three operational modes one is for enabling billing for item purchases and the other two are for testing iap functions without billing app users for item purchases mode description iap_commercial_mode financial transactions do occur for successful requests, and actual results are returned successful or failed the app gets in-app item information of the app whose status in seller portal is for sale iap_success_test_mode financial transactions do not occur app users are not billed for item purchases , and successful results are always returned the app gets in-app item information of the app whose status in seller portal is registering or updating iap_failure_test_mode all iap requests fail negative testing to ensure that your app can handle errors such as improper input and user actions note the tizen emulator only supports these two modes iap_success_test_mode iap_failure_test_mode if you set the mode to iap_commercial_mode, it is automatically changed to iap_success_test_mode get in-app items available for purchase to get all registered in-app items from galaxy store, use the getitemlist method pass in the index of the first and last item, the item type, service mode, callback function, and user data as parameters when the reply is delivered, the getitemsuccesscallback or errorcallback callback is invoked with the jsonobject that stores the query results request for details, see the getitemlist void getitemlist long startnumber, long endnumber, itemtype type, iapmode mode, getitemsuccesscallback successcallback, optional errorcallback? errorcallback ; response [callback=functiononly, nointerfaceobject] interface getitemsuccesscallback { void onsuccess jsonobject result ; }; [callback=functiononly, nointerfaceobject] interface errorcallback { void onerror webapierror error ; }; common result key value type description merrorcode int error code number merrorstring string error message _items array item list item details key value type description mitemid string item id numberthis is the same as the item id used in the request mitemname string name provided during the item registration in the seller portal mitemprice string item price in a local currency mitempricestring string currency code + pricefor example €7 99 mcurrencyunit string device user currency unit for example $, won, or pound mcurrencycode string currency codefor example eur or gbp mitemdesc string item description provided during the item registration mitemimageurl string item image url provided during the item registration mitemdownloadurl string item download url provided during the item registration mtype string item type 00 consumable01 non-consumable02 non-recurring subscription03 auto-recurring subscription 10 all msubscriptiondurationunit string subscription duration unit, defined as an upper case string month msubscriptiondurationmultiplier string if the item type mtype is 02 or 03, this is the item duration combined with msubscriptiondurationunit, it expresses the subscription duration, for example, 1month code snippet request the available items, and retrieve the item details in the reply callback webapis inapppurchase getitemlist 1, 15, "consumable", "iap_commercial_mode",successcallback, errorcallback ; /* success callback */ function successcallback result { if result _items length == 0 { console log "no item" ; } else { for var i = 0; i < result _items length; i++ { console log "item id " + result _items[i] mitemid ; console log "item name " + result _items[i] mitemname ; console log "item price " + result _items[i] mitemprice ; } } } /* error callback */ function errorcallback error { /* error handling */ } purchase an in-app item to purchase items from galaxy store, use the startpayment method pass in the index of the item id, service mode, callback function, and user data as parameters when the reply is delivered, the paymentsuccesscallback or errorcallback callback is invoked with the jsonobject that stores the query results request for details, see the startpayment void startpayment domstring itemid, iapmode mode, paymentsuccesscallback successcallback, optional errorcallback? errorcallback ; response [callback=functiononly, nointerfaceobject] interface paymentsuccesscallback { void onsuccess jsonobject item ; }; [callback=functiononly, nointerfaceobject] interface errorcallback { void onerror webapierror error ; }; common result key value type description merrorcode int error code number merrorstring string error message purchased item details key value type description mitemid string item id numberthis is the same as the item id used in the request mitemname string name provided during the item registration in the seller office mitemprice double item price in a local currency mitempricestring string currency code + pricefor example €7 99 mcurrencyunit string device user currency unitfor example $, won, or pound mcurrencycode string currency codefor example eur or gbp mitemdesc string item description provided during the item registration mitemimageurl string item image url provided during the item registration mitemdownloadurl string item download url provided during the item registration mpaymentid string id of the payment mpurchaseid string purchase ticket id used to verify the purchase with the store iap server mpurchasedate string date of purchasefor example "2013-11-15 10 31 23" mverifyurl string server's url, which can be used in combination with other parameters to verify the purchase with the iap server code snippet webapis inapppurchase startpayment "item_id", "iap_commercial_mode", successcallback, errorcallback ; /* success callback */ function successcallback item { console log "item id " + item mitemid ; console log "item name " + item mitemname ; console log "item price " + item mitemprice ; } /* error callback */ function errorcallback error { /* error handling */ } get a list of purchased items to get all purchased items from galaxy stroe, use the getpurchaseditemlist or getpurchaseditemlistbyids method for getpurchaseditemlist , pass in the index of the first and last item, the item type, the start and end date, the callback function, and user data as parameters for getpurchaseditemlistbyids , pass in the item ids separated by comma , , the callback function, and user data as parameters when the reply is delivered, the getitemsuccesscallback or errorcallback callback is invoked with the jsonobject that stores the query results request for details, see the getpurchaseditemlist and getpurchaseditemlistbyids void getpurchaseditemlist long startnumber, long endnumber, tzdate startdate, tzdate enddate, getitemsuccesscallback successcallback, optional errorcallback? errorcallback void getpurchaseditemlistbyids domstring[] itemids, getitemsuccesscallback successcallback, optional errorcallback? errorcallback response [callback=functiononly, nointerfaceobject] interface getitemsuccesscallback { void onsuccess jsonobject result ; }; [callback=functiononly, nointerfaceobject] interface errorcallback { void onerror webapierror error ; }; common result key value type description merrorcode int error code number merrorstring string error message _items array item list purchased item details key value type description mitemid string item id numberthis is the same as the item id used in the request mitemname string name provided during the item registration in the seller portal mitemprice string item price in a local currency mitempricestring string currency code + price mcurrencyunit string device user currency unit mcurrencycode string currency code mitemdesc string item description provided during the item registration mitemimageurl string item image url provided during the item registration mitemdownloadurl string item download url provided during item registration mtype string item type 00 consumable01 non-consumable02 non-recurring subscription03 auto-recurring subscription10 all mpaymentid string id of the payment mpurchaseid string id of the purchase mpurchasedate string date of purchasefor example "2013-11-15 10 31 23" msubscriptionenddate string if the item type mtype is 02 or 03, this is the due date mjsonstring string original json string code snippet webapis inapppurchase getpurchaseditemlist 1, 10, new tizen tzdate 2020, 01, 01 , new tizen tzdate 2022, 12,31 , successcallback, errorcallback ; // item ids can be obtained by seperating the values returned by the getitemlist with comma , webapis inapppurchase getpurchaseditemlistbyids "item1,item2,item3", successcallback, errorcallback ; /* success callback */ function successcallback result { if result _items length == 0 { console log "no item" ; } else { for var i = 0; i < result _items length; i++ { console log "item id " + result _items[i] mitemid ; console log "item name " + result _items[i] mitemname ; console log "item price " + result _items[i] mitemprice ; } } } /* error callback */ function errorcallback error { /* error handling */ } handling errors during the iap process, various errors can occur, for example, due to an unstable network, connection error, invalid account, or invalid product if an error occurs, your application receives the webapierror error type in the errorcallback callback handle all errors appropriately error code error name description paymentiscancelederror payment canceled networkerror network is not available ioerror ioexception timeouterror timeout exception initializationerror failure during iap initialization needappupgradeerror samsung iap upgrade is required alreadypurchasederror error when a non-consumable product is repurchased or a subscription product is repurchased before the product expiration date whilerunningerror error when payment is requested without bundle information productdoesnotexisterror error when the requested item list is not available confirminboxerror the payment result is not received after requesting payment from the server, and the purchased item list is not confirmed notexistlocalpriceerror the item is not for sale in the country notavailableshoperror iap is not supported in the country invalidvalueserror invalid parameter notsupportederror the device does not support iap securityerror this functionality is not allowed unknownerror any other error case verify a purchase this server api enables your server and client app to verify that a specified in-app item purchase and payment transaction were successfully completed the api returns a json object with a successful status and details about a successful transaction and the item or with a failure status this api can help to prevent malicious purchases and ensure that purchase and payment transactions were successful when the client app experiences network interruptions after an item purchase and payment transaction request https //iap samsungapps com/iap/appsitemverifyiapreceipt as?protocolversion=2 0&purchaseid={purchaseid} the purchaseid is assigned by samsung iap your app receives it in the jsonobject of paymentsuccesscallback and the variable name is mpurchaseid response note response parameters may be added, changed, and deleted success { "itemid" "item01", "paymentid" "zpmtid20131122gbi0015292", "orderid" "s20200106kra1908790", "itemname" "test pack", "itemdesc" "iap test item best value!", "purchasedate" "2020-11-22 04 22 36", "paymentamount" "9 000", "status" "true", "paymentmethod" "credit card", "mode" "real", } fail { "status" "false" } note besides verifying a purchase, samsung iap server api also obtains service token information and gets detailed information of auto recurring subscription ars item purchase submit the app to galaxy store 1 check the operation mode after iap integration, you must check the operation mode before submitting the app if you submit the app with iap_success_test_mode, the users will get all the items for free so, before beta release or normal publication, confirm if the operation mode is iap_commercial_mode 2 submit the app when you have created an app version that is ready for review testing and normal publication, register the app and its in-app item, and then click submit for more details, see the app registration guide
Distribute Samsung IAP for Galaxy Watch (Tizen)
docnative iap for galaxy watch samsung in-app purchase iap for galaxy watch is a galaxy store service that allows third-party watch applications to sell in-app items iap for galaxy watch only works if your galaxy watch is paired with your phone the iap client for watch communicates with the iap client for phone, which internally manages communication with supporting iap services and the samsung ecosystem such as samsung account, samsung checkout, and samsung rewards in other words, it acts as an intermediary between the watch app and samsung iap phone system you can concentrate on integrating iap api calls and iap server api calls into your watch app to integrate iap for galaxy watch using tizen extension sdk, iap native apis enables you to easily integrate iap functionality into your watch app, such as configuring iaps, getting item details, offering and selling items, and managing purchased items using galaxy watch studio formerly galaxy watch designer , you can make your own watch face that prompts for payment after a free trial period, without the complexity of coding for more details, see the galaxy watch studio online tutorial by integrating iap features, your watch apps can sell these types of in-app items item type description consumable app users can use items only one time for example, coins, special powers, or gems nonconsumable app users can use items any number of times for example, e-books or game boards items cannot be repurchased noteduring iap integration testing, if your application is set to test mode, the purchase record is initialized every 60 minutes to allow repurchase autorecurring subscription these items are purchased automatically at specific intervals app users can access items such as magazines, e-zines, or newspapers any number of times during a free trial or while their paid subscriptions are active app users can cancel at any time after purchase during subscription period app users can repurchase items after cancellation noteduring iap integration testing, if your application is set to test mode, the subscription cycle is automatically renewed every 10 minutes, and the subscription is automatically canceled after 12 renewals integrate iap into your watch app this section explains how to prepare your app to sell in-app items using tizen extension sdk you can use galaxy watch studio to make a watch face that prompts for payment after a free trial period, without the complexity of coding see the galaxy watch studio online tutorial for more information to prepare for integrating iap features and testing the integration, perform the following steps 1 create a project create a project in tizen studio the application api version must be at least 2 3 2 in the tizen-manifest xml file <?xml version="1 0" encoding="utf-8" standalone="no"?> <manifest xmlns="http //tizen org/ns/packages" api-version="4 0 0" package="org tizen nativeiap" version="1 0 0"> </manifest> 2 add permissions to tizen-manifest xml <privileges> <privilege>http //tizen org/privilege/billing</privilege> </privileges> 3 register app and in-app items in seller portal during iap integration, you may need to test iap features samsung iap needs information about your app and in-app items registered in seller portal noteyour app does not need to have iap features integrated in order to register the app and its in-app items as iap integration proceeds, you can upload new versions of your app and new in-app items as needed to register an app and its in-app items sign in to seller portal https //seller samsungapps com using your samsung account click add new application click galaxy watch, select the default language, and click next in the binary tab, upload your app tpk in the app information tab, enter fundamental app details in the country / region & price tab, specify a free or paid app, a paid app price, and countries to sell your items in the in app purchase tab, register one or more in-app items cautiondon't click *submit beta test * or *submit * in this step 4 integrate iap features #include <iap-galaxyapps h> get in-app items available for purchase purchase an in-app item get a list of purchased items operation mode iap supports three operational modes one is for enabling billing for item purchases, and the other two are for testing iap functions without billing app users for item purchases mode description iap_galaxyapps_commercial_mode financial transactions do occur for successful requests, and actual results are returned successful or failed the app gets in-app item information of the app whose status in seller portal is for sale iap_galaxyapps_success_test_mode financial transactions do not occur app users are not billed for item purchases , and successful results are always returned the app gets in-app item information of the app whose status in seller portal is registering or updating iap_galaxyapps_failure_test_mode all iap requests fail negative testing to ensure that your app can handle errors such as improper input and user actions notethe tizen emulator only supports these two modes iap_galaxyapps_success_test_mode iap_galaxyapps_failure_test_mode if you set the mode to iap_galaxyapps_commercial_mode, it is automatically changed to iap_galaxyapps_success_test_mode get in-app items available for purchase to get all registered in-app items from galaxy store, use the iap_galaxyapps_get_item_list method pass in the index of the first and last item, the item type, service mode, callback function, and user data as parameters when the reply is delivered, the iap_galaxyapps_reply_cb callback is invoked with the iap_galaxyapps_h object that stores the query results to get the request result from the iap_galaxyapps_h object, use the iap_galaxyapps_get_value method if the request was successful, you can get all the item details from the iap_galaxyapps_h object using the iap_galaxyapps_foreach_item_info method request for details, see the iap_galaxyapps_get_item_list int iap_galaxyapps_get_item_list int start_number, int end_number, const char *item_type, iap_galaxyapps_mode_e mode, iap_galaxyapps_reply_cb reply_cb, void *user_data response typedef void * iap_galaxyapps_reply_cb iap_galaxyapps_h reply, iap_galaxyapps_error_e result, void *user_data common result key value type description merrorcode int error code number merrorstring string error message mextrastring string extra result mstartnumber int index of the first item on the list mendnumber int index of the last item on the list mtotalcount int total number of items based on the first and last item index item details key value type description mitemid string item id numberthis is the same as the item id used in the request mitemname string name provided during the item registration in the seller portal mitemprice string item price in a local currency mitempricestring string currency code + pricefor example €7 99 mcurrencyunit string device user currency unit for example $, won, or pound mcurrencycode string currency codefor example eur or gbp mitemdesc string item description provided during the item registration mitemimageurl string item image url provided during the item registration mitemdownloadurl string item download url provided during the item registration mtype string item type 00 consumable01 non-consumable02 non-recurring subscription03 auto-recurring subscription 10 all msubscriptiondurationunit string subscription duration unit, defined as an upper case string month msubscriptiondurationmultiplier string if the item type mtype is 02 or 03, this is the item duration combined with msubscriptiondurationunit, it expresses the subscription duration, for example, 1month mjsonstring string original json string code snippet to handle the request output data, define a structure for it struct output_data { char* merrorcode; char* merrorstring; char* mextrastring; char* mstartnumber; char* mendnumber; char* mtotalcount; char* mitemid; char* mitemname; char* mitemprice; char* mitempricestring; char* mcurrencyunit; char* mcurrencycode; char* mitemdesc; char* mitemimageurl; char* mitemdownloadurl; char* mpaymentid; char* mpurchaseid; char* mpurchasedate; char* mverifyurl; char* mtype; char* msubscriptiondurationunit; char* msubscriptiondurationmultiplier; char* msubscriptionenddate; char* mjsonstring; }; typedef struct output_data_s; request the available items, and retrieve the item details in the reply callback /* request the available item list */ int ret = iap_galaxyapps_get_item_list 1, 10, "10", iap_galaxyapps_commercial_mode, __get_item_list_cb, null ; if ret != iap_galaxyapps_error_none { /* error handling */ return; } static bool __foreach_item iap_galaxyapps_h handle, void *user_data { output_data value = {0,}; /* get item properties */ iap_galaxyapps_get_value handle, "mitemid", &value mitemid ; iap_galaxyapps_get_value handle, "mitemname", &value mitemname ; iap_galaxyapps_get_value handle, "mitempricestring", &value mitempricestring ; iap_galaxyapps_get_value handle, "mitemdesc", &value mitemdesc ; /* handle properties */ return true; } /* callback */ static void __get_item_list_cb iap_galaxyapps_h reply, iap_galaxyapps_error_e result, void *user_data { if result != iap_galaxyapps_error_none { char *merrorstring = null; iap_galaxyapps_get_value reply, "merrorstring", &merrorstring ; /* error handling */ return; } /* retrieve all items contained in the handle */ int ret = iap_galaxyapps_foreach_item_info reply, __foreach_item, null ; if ret != iap_galaxyapps_error_none { /* error handling */ return; } return; } purchase an in-app item to purchase items from galaxy store, use the iap_galaxyapps_start_payment method pass in the index of the item id, service mode, callback function, and user data as parameters when the reply is delivered, the iap_galaxyapps_reply_cb callback is invoked with the iap_galaxyapps_h object that stores the query results to get both the request result and the purchased item details from the iap_galaxyapps_h object, use the iap_galaxyapps_get_value method request for details, see the iap_galaxyapps_start_payment int iap_galaxyapps_start_payment const char *item_id, iap_galaxyapps_mode_e mode, iap_galaxyapps_reply_cb reply_cb, void *user_data response typedef void * iap_galaxyapps_reply_cb iap_galaxyapps_h reply, iap_galaxyapps_error_e result, void *user_data common result key value type description merrorcode int error code number merrorstring string error message mextrastring string extra result purchased item details key value type description mitemid string item id numberthis is the same as the item id used in the request mitemname string name provided during the item registration in the seller office mitemprice double item price in a local currency mitempricestring string currency code + pricefor example €7 99 mcurrencyunit string device user currency unitfor example $, won, or pound mcurrencycode string currency codefor example eur or gbp mitemdesc string item description provided during the item registration mitemimageurl string item image url provided during the item registration mitemdownloadurl string item download url provided during the item registration mpaymentid string id of the payment mpurchaseid string purchase ticket id used to verify the purchase with the store iap server mpurchasedate string date of purchasefor example "2020-11-15 10 31 23" mverifyurl string server's url, which can be used in combination with other parameters to verify the purchase with the iap server mjsonstring string original json string code snippet /* purchase an item */ int ret = iap_galaxyapps_start_payment "item_id", iap_galaxyapps_commercial_mode, __purchase_cb, null ; if ret != iap_galaxyapps_error_none { /* error handling */ return; } /* callback */ static void __purchase_cb iap_galaxyapps_h reply, iap_galaxyapps_error_e result, void *user_data { output_data value = {0,}; if result != iap_galaxyapps_error_none { iap_galaxyapps_get_value reply, "merrorstring", &value merrorstring ; /* error handling */ return; } /* get properties of the purchased item */ iap_galaxyapps_get_value reply, "mitemid", &value mitemid ; iap_galaxyapps_get_value reply, "mitemname", &value mitemname ; iap_galaxyapps_get_value reply, "mitempricestring", &value mitempricestring ; iap_galaxyapps_get_value reply, "mitemdesc", &value mitemdesc ; /* handle properties */ return; } get a list of purchased items to get a list of all items purchased from galaxy store, use the iap_galaxyapps_get_purchased_item_list or iap_galaxyapps_get_purchased_item_list_by_item_ids method for iap_galaxyapps_get_purchased_item_list , pass in the index of the first and last item, the item type, the start and end date, the callback function, and user data as parameters for iap_galaxyapps_get_purchased_item_list_by_item_ids , pass in the item ids separated by comma , , the callback function, and user data as parameters when the reply is delivered, the iap_galaxyapps_reply_cb callback is invoked with the iap_galaxyapps_h object that stores the query results to get the request result from the iap_galaxyapps_h object, use the iap_galaxyapps_get_value method if the request was successful, you can get all the item details from the iap_galaxyapps_h object using the iap_galaxyapps_foreach_item_info method request for details, see the iap_galaxyapps_get_purchased_item_list and iap_galaxyapps_get_purchased_item_list_by_item_ids int iap_galaxyapps_get_purchased_item_list int start_number, int end_number, const char *start_date, const char *end_date, iap_galaxyapps_reply_cb reply_cb, void *user_data int iap_galaxyapps_get_purchased_item_list_by_item_ids const char *item_ids, iap_galaxyapps_reply_cb reply_cb, void *user_data response typedef void * iap_galaxyapps_reply_cb iap_galaxyapps_h reply, iap_galaxyapps_error_e result, void *user_data common result key value type description merrorcode int error code number merrorstring string error message mextrastring string extra result mstartnumber int index of the first item on the list mendnumber int index of the last item on the list mtotalcount int total number of items based on the first and last item index purchased item details key value type description mitemid string item id numberthis is the same as the item id used in the request mitemname string name provided during the item registration in the seller portal mitemprice string item price in a local currency mitempricestring string currency code + price mcurrencyunit string device user currency unit mcurrencycode string currency code mitemdesc string item description provided during the item registration mitemimageurl string item image url provided during the item registration mitemdownloadurl string item download url provided during item registration mtype string item type 00 consumable01 nonconsumable02 nonrecurring subscription03 autorecurring subscription10 all mpaymentid string id of the payment mpurchaseid string id of the purchase mpurchasedate string date of purchasefor example "2020-11-15 10 31 23" msubscriptionenddate string if the item type mtype is 02 or 03, this is the due date mjsonstring string original json string code snippet int ret = iap_galaxyapps_get_purchased_item_list 1, 10, "20200101", "20221231", __get_purchased_item_list_cb, null ; if ret != iap_galaxyapps_error_none { /* error handling */ return; } // item ids can be obtained by seperating the values returned by the iap_galaxyapps_get_item_list with comma , int ret = iap_galaxyapps_get_purchased_item_list_by_item_ids "item1,item2,item3", __get_purchased_item_list_cb, null ; if ret != iap_galaxyapps_error_none { /* error handling */ return; } static bool __foreach_purchased_item iap_galaxyapps_h handle, void *user_data { output_data value = {0,}; /* get properties of the item */ iap_galaxyapps_get_value handle, "mitemid", &value mitemid ; iap_galaxyapps_get_value handle, "mitemname", &value mitemname ; iap_galaxyapps_get_value handle, "mitempricestring", &value mitempricestring ; iap_galaxyapps_get_value handle, "mitemdesc", &value mitemdesc ; /* handle properties */ return true; } /* callback */ static void __get_purchased_item_list_cb iap_galaxyapps_h reply, iap_galaxyapps_error_e result, void *user_data { if result != iap_galaxyapps_error_none { char *merrorstring = null; iap_galaxyapps_get_value reply, "merrorstring", &merrorstring ; /* error handling */ return; } /* retrieve all items contained in the handle */ int ret = iap_galaxyapps_foreach_item_info reply, __foreach_purchased_item, null ; if ret != iap_galaxyapps_error_none { /* error handling */ return; } return; } handling errors during the iap process, various errors can occur, for example, due to an unstable network, connection error, invalid account, or invalid product if an error occurs, your application receives the iap_galaxyapps_error_e error type in the iap_galaxyapps_reply_cb callback handle all errors appropriately error code error code description iap_galaxyapps_error_none successful iap_galaxyapps_error_payment_is_canceled payment canceled iap_galaxyapps_error_network_not_available network is not available iap_galaxyapps_error_io_error ioexception iap_galaxyapps_error_timed_out timeout exception iap_galaxyapps_error_initialization failure during iap initialization iap_galaxyapps_error_need_app_upgrade samsung iap upgrade is required iap_galaxyapps_error_common error while running iap iap_galaxyapps_error_already_purchased error when a non-consumable product is repurchased or a subscription product is repurchased before the product expiration date iap_galaxyapps_error_request_payment_without_info error when payment is requested without bundle information iap_galaxyapps_error_product_does_not_exist error when the requested item list is not available iap_galaxyapps_error_confirm_inbox the payment result is not received after requesting payment from the server, and the purchased item list is not confirmed iap_galaxyapps_error_not_exist_local_price the item is not for sale in the country iap_galaxyapps_error_not_available_shop iap is not supported in the country iap_galaxyapps_error_invalid_parameter invalid parameter iap_galaxyapps_error_key_not_found specified key is not found iap_galaxyapps_error_not_supported_device the device does not support iap iap_galaxyapps_error_out_of_memory out of memory iap_galaxyapps_error_permission_denied permission denied verify a purchase this server api enables your server and client app to verify that a specified in-app item purchase and payment transaction were successfully completed the api returns a json object with a successful status and details about a successful transaction and the item or with a failure status this api can help to prevent malicious purchases and ensure that purchase and payment transactions were successful when the client app experiences network interruptions after an item purchase and payment transaction request https //iap samsungapps com/iap/appsitemverifyiapreceipt as?protocolversion=2 0&purchaseid={purchaseid} the purchaseid is assigned by samsung iap your app receives it in the iap_galaxyapps_h object as response of iap_galaxyapps_start_payment and the key is mpurchaseid response noteresponse parameters may be added, changed, and deleted success { "itemid" "item01", "paymentid" "zpmtid20131122gbi0015292", "orderid" "s20200106kra1908790", "itemname" "test pack", "itemdesc" "iap test item best value!", "purchasedate" "2020-11-22 04 22 36", "paymentamount" "9 000", "status" "true", "paymentmethod" "credit card", "mode" "real", } fail { "status" "false" } notebesides verifying a purchase, samsung iap server api also obtains service token information and gets detailed information of an autorecurring subscription item purchase submit the app to galaxy store 1 check the operation mode after iap integration, you must check the operation mode before submitting the app if you submit the app with iap_galaxyapps_success_test_mode, the users will get all the items for free so, before beta release or normal publication, confirm if the operation mode is iap_galaxyapps_commercial_mode 2 submit the app when you have created an app version that is ready for review testing and normal publication, register the app and its in-app item, and then click submit for more details, see the app registration guide
Develop Smart TV
docsamsung checkout dpi portal overview the samsung checkout dpi digital product inventory portal https //dpi samsungcheckout com/ is a web service portal designed for the samsung smart tv partners, which samsung helps them sell products and items through smart tv apps from the dpi, partners can register and manage products for sale and access the transaction history logs and sales reports for the applications they own dpi main services product management standard in-app products, subscriptions, paid apps order management purchase history for each user sales reports and financial reports coupon management creation and issuance service initiation process an account for the samsung apps tv seller office is required to use the dpi service once registered, partners can use the dpi service ※ dpi mini guide helps to grasp the overall workflow of samsung checkout service and dpi site - mini guide download step 1 accessing samsung checkout - login create a samsung account register your app in seller office and login to the dpi ① create a samsung account ② register your app in seller office ③ login to the checkout dpi portal noticeat first, only 'manager' in seller office can access dpi portal manager can manage entire menu in dpi portal manager can give permission to 'members' through membership management ※ members cannot access main screen before being given permission by a manager step 2 create group and give permissions only managers can access the member menu and manage groups ① member menu managers can manage and give menu permissions to members this can be done through the membership management and the group management menus ② group management > click create group go to create group menu and configure a group you can click operation, finance, cs or developer buttons to show preset menu permissions these preset menu permissions are for guidance only and can be edited ③ view group management list now you can manage members go to ‘membership management > edit permissions’ menu ④ membership management > edit permissions managers can manage and give menu permissions to members this can be done through the membership management and the group management menus ⑤ select member and group go to create group menu and configure a group you can click operation, finance, cs or developer buttons to show preset menu permissions these preset menu permissions are for guidance only and can be edited ⑥ confirm permissions now you can manage members go to ‘membership management > edit permissions’ menu step 3 issuance of dpi security key the dpi security key must be issued to safely use the service the issued key can be viewed under 'settings > app details setting' the key is a security key to use api calls, and this is a protection mechanism for invalid access from/to the app and dpi the related process is described in the section generating check values importantthe issued security key is a key to be used for open api calls made by a smart tv app please be careful not to reveal this key to others test buyers you can enroll test buyer in settings > test buyer menu checkout does not provide dummy pay anymore therefore, if you’d like to do payment test, please enroll test buyer ① input the test buyer’s samsung account id click [check samsung account registration] and please check the samsung account is available ② input the test buyer’s name ③ contact is not required information after filling in all the required information, click [register] button noticebefore launching your app on tv, only test buyers are allowed to proceed with the payment test importantafter releasing your app on tv, everyone is free to proceed with the payment test ※ after the test, you must manually process the refund it does not provide an automatic refund function product products can be registered for different countries through the add a new product menu configure product ① go to ‘product > add a new product’ menu ② this is where a new product is registered ③ enter product information product id, description, product type, visibility, expiration ④ please note that when you check visibility, the product will become visible from the app product type the following table explains the details of "product type" product type description consumable consumers can purchase this type of product anytime purchase history can be retrieved for 90 days non-consumable consumers can purchase this type of product only once purchase history can be retrieved with no time restriction limited period once this type of product is purchased, repurchase cannot be made during the time when the product effect set by cp lasts purchase history can be retrieved for 90 days if “limited period” product type is chosen, the duration of time for the product effect to last can be entered in the units above minute the duration time for the product effect to last is allowed for the maximum of 90 days subscription dpi system processes automatic payment on a certain designated cycle paid app for paid apps, when you register your app on dpi system you need to select it as paid app dynamic product in case that pater and samsung agree on that products and prices will be managed by cms of partner not samsung’s dpi, partner should select “dynamic product” as a product type even though all the information of actual products are on cms, partner need to register a representative item on dpi once so that our system can display information on samsung smart tv app/game store which is legally required and verify which server we need to call for certain products cms or dpi if dynamic product is chosen, partner does not register each products on dpi that partner sells in their app actuallypartner builds and operates its own cms to manage products information including prices and to verify purchase requestsadditional requirementsverification/no verification ‘verification’ is a recommended option otherwise partner has to handle the verification process by themselves and take all the responsibility for all the error cases related to verification process if ‘verification’ is selected, ‘verify uri’ is also required this uri should serve the function of checking product information such as product itself, price and currencyprice settingprice range information of products that you actually sells in your app is required by country/location it is not used for actual payment for providing the app information on samsung smart tv app/game store which is legally required thus, it has to be updated when the price range of your products is changed subscription it is necessary to make a subscription group before creating subscription item add new subscription group ① go to ‘product > subscription group > add a new group’ menu ② this is where a new subscription group is registered ③ enter subscription group name setting free trial offering ① free trial is able to set per “product group” id ② partner defines whether a free days offer whether it should be offered once per account/device or both notice [free trial offering option] per account only once if a user use a free trial offer with the "a" account once, free experience will be expired, and additional free experience is not possible with the "a" account however, if a cp does not check “ per device only once ”, a user can experience it free of charge when creating a new account with no subscription history per device only once if a user use one free trial offer on "a" device, a user cannot use free experience even if you change your account and create a new "b" account on a device both- per account only once provide free trial offer both based on “ a ” account and “ a ” device case 1 with the “ b ” account that does not have a subscription history, free experience is not available when you first sign up for the “ a ” device case 2 with “ a ” account, which has a history of cancellation after subscription, “ b ” device subscription is not allowed for free configure subscription ① go to ‘product > add a new product’ menu ② select subscription in the product type ③ enter product information product id, description ④ choose billing period, produce level, subscription group ⑤ if you’d like to make free trial subscription, please input the free trial period ⑥ check the duplicate benefit, visibility, expiration subscription plan checkout supports upgrade, downgrade, cross-downgrade subscription plan create a subscription group to set the subscription level in the same group, consumers can upgrade and downgrade freely cross-downgrade api is currently possible, checkout does not provide cross-upgrade api importantif you’d like to use the cross-upgrade function, please use a combination of upgrade api and cross grade api please refer to the details on the sdf site in the near future, we will provide the guide on the sdf site field description the following table explains the details of input fields input field description product name representative product name the name of the product used in the representative country/location must be entered in the country/location product name field this field cannot be left empty product id alphanumeric and two special characters '-', '_' are allowed maximum 20 bytes product description describe the product type following product types are allowed;consumable, non-consumable, limited period, paid app, subscription, dynamic product period if the product type is ‘limited period’, a number fewer than 129,600 in minutes is allowed maximum 90 days billing period if the product type is "subscription" , "weekly","monthly","annualy" is allowed subscription group it is necessary to make a subscription group before creating subscription item free trial period if the product type is "subscription", a number in days is allowed visibility a field indicating whether the product can be shown "show" , "hide" and "optional" is allowed duplication benefit the condition defines whether a free days offer whether it should be offered once per account/device or both expiration if the product type is "subscription" , "not applicable" ,"1 month", "6 month", "1 year" is allowed country/location product name the country/location and product name are separated by ' ' and a maximum of 50 bytes of product name is allowed if more than one country/location is entered, use ' country/location product price the country/location and price information are separated by ' ', and if more than one country/location is input, the use of the ' transaction policy the dpi provides information on the status for the products purchased by users through request purchases list api in case the purchased product is not applied on the real game, the status can be checked on the “product applied status” in case the purchased product was refunded to the user, the status can be checked on the “sales cancellation status” the period of time the above status information is provided through api to the application can be classified by the product type as shown below product type applied purchases purchase history not applied purchases refund/cancellation consumable application date + 90days all products can be viewed with no restrictions in time period refund date+ 90 days subscription subscription expiry date subsendtime + 90days subscription expiry date subsendtime + 90 days subscription expiry date subsendtime + 90 days glossaries term description billing / payment service a service created in order to help monetary transactions between service providers and users partner / app developer be in charge of creating products suitable for consumers of the smart tv paid app a service or app that can be only downloaded after making a payment in-app purchase a method to pay for additional products and features within both free apps and paid apps paypal paypal the global payments company headquartered in the united states that provide the payment service via pre-registered payment method digital product inventory dpi a system provided to developers to enter and manage extra products and items in their own apps it is directly connected to the app store samsung checkout billing client a payment ui module for consumers to add their choice of payment methods and pay for premium apps or special items operating zone/ staging zone operating zone is a live environment where the real users get access to verification system is a test environment where 3rd party development and qa are conducted sandbox zone is regarded as staging zone operating tv / development tv - operating tv tv purchased from on/off-line, tv with the same setting environment as the one in general users - development tv tv that is made in use of a board separately provided by samsung electronics, tv that allows a setting environment for development different from the one for general users cms content management system product catalogue management server or system including price information in this document, this word refers to the server for the type “dynamic product” that has all the information of products and handles verification with its own product catalogue for reference, product information of other product types should be managed in dpi not 3rd party cms dpi will be looking at cms to pull necessary product information as needed cms will be the source of truth regarding content metadata, purchase history which user bought which title at which resolution of purchase/rental, etc whereas dpi will be the source of truth of transactional data i e transaction amount, tax amount both systems will be linked by "invoice id" that is generated by dpi and passed over to cms for every successful transaction ※ dpi user guide full version provides detailed desciptions and examples of new dpi site functions/usages - full guide download
Develop Smart TV
docsamsung checkout dpi portal overview the samsung checkout dpi digital product inventory portal https //dpi samsungcheckout com/ is a web service portal designed for the samsung smart tv partners, which samsung helps them sell products and items through smart tv apps from the dpi, partners can register and manage products for sale and access the transaction history logs and sales reports for the applications they own dpi main services product management standard in-app products, subscriptions, paid apps order management purchase history for each user sales reports and financial reports coupon management creation and issuance service initiation process an account for the samsung apps tv seller office is required to use the dpi service once registered, partners can use the dpi service ※ dpi mini guide helps to grasp the overall workflow of samsung checkout service and dpi site - mini guide download step 1 accessing samsung checkout - login create a samsung account register your app in seller office and login to the dpi ① create a samsung account ② register your app in seller office ③ login to the checkout dpi portal noticeat first, only 'manager' in seller office can access dpi portal manager can manage entire menu in dpi portal manager can give permission to 'members' through membership management ※ members cannot access main screen before being given permission by a manager step 2 create group and give permissions only managers can access the member menu and manage groups ① member menu managers can manage and give menu permissions to members this can be done through the membership management and the group management menus ② group management > click create group go to create group menu and configure a group you can click operation, finance, cs or developer buttons to show preset menu permissions these preset menu permissions are for guidance only and can be edited ③ view group management list now you can manage members go to ‘membership management > edit permissions’ menu ④ membership management > edit permissions managers can manage and give menu permissions to members this can be done through the membership management and the group management menus ⑤ select member and group go to create group menu and configure a group you can click operation, finance, cs or developer buttons to show preset menu permissions these preset menu permissions are for guidance only and can be edited ⑥ confirm permissions now you can manage members go to ‘membership management > edit permissions’ menu step 3 issuance of dpi security key the dpi security key must be issued to safely use the service the issued key can be viewed under 'settings > app details setting' the key is a security key to use api calls, and this is a protection mechanism for invalid access from/to the app and dpi the related process is described in the section generating check values importantthe issued security key is a key to be used for open api calls made by a smart tv app please be careful not to reveal this key to others test buyers you can enroll test buyer in settings > test buyer menu checkout does not provide dummy pay anymore therefore, if you’d like to do payment test, please enroll test buyer ① input the test buyer’s samsung account id click [check samsung account registration] and please check the samsung account is available ② input the test buyer’s name ③ contact is not required information after filling in all the required information, click [register] button noticebefore launching your app on tv, only test buyers are allowed to proceed with the payment test importantafter releasing your app on tv, everyone is free to proceed with the payment test ※ after the test, you must manually process the refund it does not provide an automatic refund function product products can be registered for different countries through the add a new product menu configure product ① go to ‘product > add a new product’ menu ② this is where a new product is registered ③ enter product information product id, description, product type, visibility, expiration ④ please note that when you check visibility, the product will become visible from the app product type the following table explains the details of "product type" product type description consumable consumers can purchase this type of product anytime purchase history can be retrieved for 90 days non-consumable consumers can purchase this type of product only once purchase history can be retrieved with no time restriction limited period once this type of product is purchased, repurchase cannot be made during the time when the product effect set by cp lasts purchase history can be retrieved for 90 days if “limited period” product type is chosen, the duration of time for the product effect to last can be entered in the units above minute the duration time for the product effect to last is allowed for the maximum of 90 days subscription dpi system processes automatic payment on a certain designated cycle paid app for paid apps, when you register your app on dpi system you need to select it as paid app dynamic product in case that pater and samsung agree on that products and prices will be managed by cms of partner not samsung’s dpi, partner should select “dynamic product” as a product type even though all the information of actual products are on cms, partner need to register a representative item on dpi once so that our system can display information on samsung smart tv app/game store which is legally required and verify which server we need to call for certain products cms or dpi if dynamic product is chosen, partner does not register each products on dpi that partner sells in their app actuallypartner builds and operates its own cms to manage products information including prices and to verify purchase requestsadditional requirementsverification/no verification ‘verification’ is a recommended option otherwise partner has to handle the verification process by themselves and take all the responsibility for all the error cases related to verification process if ‘verification’ is selected, ‘verify uri’ is also required this uri should serve the function of checking product information such as product itself, price and currencyprice settingprice range information of products that you actually sells in your app is required by country/location it is not used for actual payment for providing the app information on samsung smart tv app/game store which is legally required thus, it has to be updated when the price range of your products is changed subscription it is necessary to make a subscription group before creating subscription item add new subscription group ① go to ‘product > subscription group > add a new group’ menu ② this is where a new subscription group is registered ③ enter subscription group name setting free trial offering ① free trial is able to set per “product group” id ② partner defines whether a free days offer whether it should be offered once per account/device or both notice [free trial offering option] per account only once if a user use a free trial offer with the "a" account once, free experience will be expired, and additional free experience is not possible with the "a" account however, if a cp does not check “ per device only once ”, a user can experience it free of charge when creating a new account with no subscription history per device only once if a user use one free trial offer on "a" device, a user cannot use free experience even if you change your account and create a new "b" account on a device both- per account only once provide free trial offer both based on “ a ” account and “ a ” device case 1 with the “ b ” account that does not have a subscription history, free experience is not available when you first sign up for the “ a ” device case 2 with “ a ” account, which has a history of cancellation after subscription, “ b ” device subscription is not allowed for free configure subscription ① go to ‘product > add a new product’ menu ② select subscription in the product type ③ enter product information product id, description ④ choose billing period, produce level, subscription group ⑤ if you’d like to make free trial subscription, please input the free trial period ⑥ check the duplicate benefit, visibility, expiration subscription plan checkout supports upgrade, downgrade, cross-downgrade subscription plan create a subscription group to set the subscription level in the same group, consumers can upgrade and downgrade freely cross-downgrade api is currently possible, checkout does not provide cross-upgrade api importantif you’d like to use the cross-upgrade function, please use a combination of upgrade api and cross grade api please refer to the details on the sdf site in the near future, we will provide the guide on the sdf site field description the following table explains the details of input fields input field description product name representative product name the name of the product used in the representative country/location must be entered in the country/location product name field this field cannot be left empty product id alphanumeric and two special characters '-', '_' are allowed maximum 20 bytes product description describe the product type following product types are allowed;consumable, non-consumable, limited period, paid app, subscription, dynamic product period if the product type is ‘limited period’, a number fewer than 129,600 in minutes is allowed maximum 90 days billing period if the product type is "subscription" , "weekly","monthly","annualy" is allowed subscription group it is necessary to make a subscription group before creating subscription item free trial period if the product type is "subscription", a number in days is allowed visibility a field indicating whether the product can be shown "show" , "hide" and "optional" is allowed duplication benefit the condition defines whether a free days offer whether it should be offered once per account/device or both expiration if the product type is "subscription" , "not applicable" ,"1 month", "6 month", "1 year" is allowed country/location product name the country/location and product name are separated by ' ' and a maximum of 50 bytes of product name is allowed if more than one country/location is entered, use ' country/location product price the country/location and price information are separated by ' ', and if more than one country/location is input, the use of the ' transaction policy the dpi provides information on the status for the products purchased by users through request purchases list api in case the purchased product is not applied on the real game, the status can be checked on the “product applied status” in case the purchased product was refunded to the user, the status can be checked on the “sales cancellation status” the period of time the above status information is provided through api to the application can be classified by the product type as shown below product type applied purchases purchase history not applied purchases refund/cancellation consumable application date + 90days all products can be viewed with no restrictions in time period refund date+ 90 days subscription subscription expiry date subsendtime + 90days subscription expiry date subsendtime + 90 days subscription expiry date subsendtime + 90 days glossaries term description billing / payment service a service created in order to help monetary transactions between service providers and users partner / app developer be in charge of creating products suitable for consumers of the smart tv paid app a service or app that can be only downloaded after making a payment in-app purchase a method to pay for additional products and features within both free apps and paid apps paypal paypal the global payments company headquartered in the united states that provide the payment service via pre-registered payment method digital product inventory dpi a system provided to developers to enter and manage extra products and items in their own apps it is directly connected to the app store samsung checkout billing client a payment ui module for consumers to add their choice of payment methods and pay for premium apps or special items operating zone/ staging zone operating zone is a live environment where the real users get access to verification system is a test environment where 3rd party development and qa are conducted sandbox zone is regarded as staging zone operating tv / development tv - operating tv tv purchased from on/off-line, tv with the same setting environment as the one in general users - development tv tv that is made in use of a board separately provided by samsung electronics, tv that allows a setting environment for development different from the one for general users cms content management system product catalogue management server or system including price information in this document, this word refers to the server for the type “dynamic product” that has all the information of products and handles verification with its own product catalogue for reference, product information of other product types should be managed in dpi not 3rd party cms dpi will be looking at cms to pull necessary product information as needed cms will be the source of truth regarding content metadata, purchase history which user bought which title at which resolution of purchase/rental, etc whereas dpi will be the source of truth of transactional data i e transaction amount, tax amount both systems will be linked by "invoice id" that is generated by dpi and passed over to cms for every successful transaction ※ dpi user guide full version provides detailed desciptions and examples of new dpi site functions/usages - full guide download
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.