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 card class card java lang object com samsung android sdk samsungpay v2 card card all implemented interfaces android os parcelable public class card extends object implements android os parcelable this class provides card information related to the card management operations 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 modifier and type field description static final string active card is fully registered on samsung pay and current state is "active" static final string card_type indicates that the key for card type static final string card_type_credit indicates that the card type is credit card static final string card_type_credit_debit indicates that the card type is either credit or debit static final string card_type_debit indicates that the card type is debit card static final string card_type_gift indicates that the card type is gift card static final string card_type_loyalty indicates that the card type is loyalty card static final string card_type_transit indicates that the card type is transit card static final string card_type_vaccine_pass indicates that the card type is vaccine pass static final string disposed card is deleted from samsung pay static final string expired card is registered on samsung pay, but its current status is "expired" this might occur if the card or token expiration time has reached and samsung pay has not renewed it static final string pending_activation card is registered on samsung pay but not activated yet a notification of card activation is expected to be pushed to samsung pay in a moment static final string pending_provision card is not fully registered on samsung pay and current state is "pending provision" usually, this state returns when the user has not completed the secondary authentication idv static final string suspended card is registered on samsung pay and current state is "suspended" suspend can be triggered by issuer, card network, or the user fields inherited from interface android os parcelable contents_file_descriptor, parcelable_write_return_value method summary all methodsinstance methodsconcrete methods modifier and type method description spaysdk brand getcardbrand api to get card brand string getcardid api to get unique identification of a card in samsung pay android os bundle getcardinfo api to get extra card information if any related to the card string getcardstatus api to get current status of the card methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, wait, wait, wait field details active public static final string active card is fully registered on samsung pay and current state is "active" since api level 1 1 see also constant field values disposed public static final string disposed card is deleted from samsung pay since api level 1 1 see also constant field values expired public static final string expired card is registered on samsung pay, but its current status is "expired" this might occur if the card or token expiration time has reached and samsung pay has not renewed it since api level 1 1 see also constant field values pending_provision public static final string pending_provision card is not fully registered on samsung pay and current state is "pending provision" usually, this state returns when the user has not completed the secondary authentication idv since api level 1 1 see also constant field values suspended public static final string suspended card is registered on samsung pay and current state is "suspended" suspend can be triggered by issuer, card network, or the user since api level 1 1 see also constant field values pending_activation public static final string pending_activation card is registered on samsung pay but not activated yet a notification of card activation is expected to be pushed to samsung pay in a moment since api level 2 3 see also constant field values card_type public static final string card_type indicates that the key for card type since api level 1 8 see also constant field values card_type_credit_debit public static final string card_type_credit_debit indicates that the card type is either credit or debit this is a valid type for addcardinfo setcardtype string since api level 1 1 see also constant field values card_type_gift public static final string card_type_gift indicates that the card type is gift card since api level 1 1 see also constant field values card_type_loyalty public static final string card_type_loyalty indicates that the card type is loyalty card since api level 1 1 see also constant field values card_type_credit public static final string card_type_credit indicates that the card type is credit card this is a valid type for addcardinfo setcardtype string since api level 1 2 see also constant field values card_type_debit public static final string card_type_debit indicates that the card type is debit card this is a valid type for addcardinfo setcardtype string since api level 1 2 see also constant field values card_type_transit public static final string card_type_transit indicates that the card type is transit card since api level 1 8 see also constant field values card_type_vaccine_pass public static final string card_type_vaccine_pass indicates that the card type is vaccine pass since api level 2 16 see also constant field values method details getcardid public string getcardid api to get unique identification of a card in samsung pay returns unique id to refer a card in samsung pay since api level 1 1 getcardbrand public spaysdk brand getcardbrand api to get card brand returns brand name of the card since api level 1 9 see also spaysdk brand getcardinfo public android os bundle getcardinfo api to get extra card information if any related to the card returns extra cardinfo the following are list of extra card information provided on the bundle keys values apptoappconstants extra_app2app_intent string app2app intent name apptoappconstants extra_app2app_payload string app2app payload spaysdk extra_last4_dpan string last 4 digit of dpan spaysdk extra_last4_fpan string last 4 digit of fpan spaysdk extra_card_type card_type_credit_debit card_type_credit card_type_debit card_type_gift card_type_loyalty card_type_transit spaysdk extra_device_type samsungpay#device_type_phone samsungpay#device_type_gear spaysdk extra_issuer_name string issuername issuercode for korean issuers since api level 1 1 getcardstatus public string getcardstatus api to get current status of the card returns current card status the status can be one of the following pending_provision pending_activation active suspended disposed expired since api level 1 1 samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 payment class customsheetpaymentinfo builder java lang object com samsung android sdk samsungpay v2 payment customsheetpaymentinfo builder enclosing class customsheetpaymentinfo public static class customsheetpaymentinfo builder extends object this is builder class for constructing customsheetpaymentinfo object since api level 1 3 constructor summary constructors constructor description builder method summary all methodsinstance methodsconcrete methods modifier and type method description customsheetpaymentinfo build api to build customsheetpaymentinfo object customsheetpaymentinfo builder enableenforcepaymentsheet api to enforce the payment sheet if partner wants to show payment sheet even though fast checkout is enabled, they can show payment sheet using this api method customsheetpaymentinfo builder setaddressinpaymentsheet customsheetpaymentinfo addressinpaymentsheet addressinpaymentsheet api to set the address display option for payment sheet customsheetpaymentinfo builder setallowedcardbrands list<spaysdk brand> brands api to set the card brands list supported by merchant customsheetpaymentinfo builder setcardholdernameenabled boolean iscardholdernamerequired api to set the flag if merchant wants to display card holder's name customsheetpaymentinfo builder setcustomsheet customsheet customsheet api to set customsheet customsheetpaymentinfo builder setextrapaymentinfo android os bundle extrapaymentinfo api to set the extra payment information data customsheetpaymentinfo builder setmerchantcountrycode string merchantcountrycode api to set the merchant country code customsheetpaymentinfo builder setmerchantid string merchantid api to set the merchant reference id customsheetpaymentinfo builder setmerchantname string merchantname api to set the merchant name customsheetpaymentinfo builder setordernumber string ordernumber api to set the order number customsheetpaymentinfo builder setpaymentcardbrand spaysdk brand cardbrand api to set the card brand for payment transaction this api can be used with setpaymentcardlast4dpan string or setpaymentcardlast4fpan string api method to designate specific card for the transaction customsheetpaymentinfo builder setpaymentcardlast4dpan string last4digits api to set the last 4 digits of dpan for payment transaction this api can be used with setpaymentcardbrand spaysdk brand api method to designate specific card for the transaction customsheetpaymentinfo builder setpaymentcardlast4fpan string last4digits api to set the last 4 digits of fpan for payment transaction this api can be used with setpaymentcardbrand spaysdk brand api method to designate specific card for the transaction customsheetpaymentinfo builder setpaymentshippingmethod string shippingmethod api to set the shipping method for payment transaction customsheetpaymentinfo builder setrecurringenabled boolean isrecurring api to set if payment is recurring methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait constructor details builder public builder method details setmerchantid public customsheetpaymentinfo builder setmerchantid string merchantid api to set the merchant reference id parameters merchantid - merchant reference id which can be used for merchant's own purpose for example, if merchant uses a payment gateway which requires payment gateway user id, then merchantid field can be set with a payment gateway user id returns customsheetpaymentinfo builder since api level 1 3 setmerchantname public customsheetpaymentinfo builder setmerchantname string merchantname api to set the merchant name parameters merchantname - merchant name returns customsheetpaymentinfo builder since api level 1 3 setordernumber public customsheetpaymentinfo builder setordernumber string ordernumber api to set the order number parameters ordernumber - order number sent by merchant for records the allowed characters are [a-z][a-z][0-9,-] & up to 36 characters this field is mandatory for visa returns customsheetpaymentinfo builder since api level 1 3 setaddressinpaymentsheet public customsheetpaymentinfo builder setaddressinpaymentsheet customsheetpaymentinfo addressinpaymentsheet addressinpaymentsheet api to set the address display option for payment sheet parameters addressinpaymentsheet - address ui to display on the payment sheet returns customsheetpaymentinfo builder since api level 1 3 see also customsheetpaymentinfo addressinpaymentsheet setallowedcardbrands public customsheetpaymentinfo builder setallowedcardbrands list<spaysdk brand> brands api to set the card brands list supported by merchant parameters brands - card brands supported by merchant for payment returns customsheetpaymentinfo builder since api level 1 3 setcardholdernameenabled public customsheetpaymentinfo builder setcardholdernameenabled boolean iscardholdernamerequired api to set the flag if merchant wants to display card holder's name set to true if card holder's name should be displayed with card information on the payment sheet if issuer does not provide card holder's name, it will not be displayed parameters iscardholdernamerequired - true, if merchant wants to display card holder's name on the payment sheet returns customsheetpaymentinfo builder since api level 1 3 setrecurringenabled public customsheetpaymentinfo builder setrecurringenabled boolean isrecurring api to set if payment is recurring parameters isrecurring - true, if payment is recurring returns customsheetpaymentinfo builder since api level 1 3 setmerchantcountrycode public customsheetpaymentinfo builder setmerchantcountrycode string merchantcountrycode api to set the merchant country code this api internally verifies and sets two-letter merchant country code, if it is a valid country code parameters merchantcountrycode - country code, where merchant is operating returns customsheetpaymentinfo builder throws illegalargumentexception - if merchantcountrycode is invalid since api level 1 3 setcustomsheet public customsheetpaymentinfo builder setcustomsheet customsheet customsheet api to set customsheet parameters customsheet - customsheet configured by merchant returns customsheetpaymentinfo builder since api level 1 3 setextrapaymentinfo public customsheetpaymentinfo builder setextrapaymentinfo android os bundle extrapaymentinfo api to set the extra payment information data parameters extrapaymentinfo - extra paymentinfo data returns customsheetpaymentinfo builder since api level 1 3 enableenforcepaymentsheet public customsheetpaymentinfo builder enableenforcepaymentsheet api to enforce the payment sheet if partner wants to show payment sheet even though fast checkout is enabled, they can show payment sheet using this api method returns customsheetpaymentinfo builder since api level 1 7 setpaymentcardlast4dpan public customsheetpaymentinfo builder setpaymentcardlast4dpan string last4digits api to set the last 4 digits of dpan for payment transaction this api can be used with setpaymentcardbrand spaysdk brand api method to designate specific card for the transaction parameters last4digits - the last 4 digits of dpan for payment transaction returns customsheetpaymentinfo builder since api level 1 7 setpaymentcardlast4fpan public customsheetpaymentinfo builder setpaymentcardlast4fpan string last4digits api to set the last 4 digits of fpan for payment transaction this api can be used with setpaymentcardbrand spaysdk brand api method to designate specific card for the transaction parameters last4digits - the last 4 digits of fpan for payment transaction returns customsheetpaymentinfo builder since api level 1 7 setpaymentcardbrand public customsheetpaymentinfo builder setpaymentcardbrand spaysdk brand cardbrand api to set the card brand for payment transaction this api can be used with setpaymentcardlast4dpan string or setpaymentcardlast4fpan string api method to designate specific card for the transaction parameters cardbrand - card brand returns customsheetpaymentinfo builder since api level 1 7 see also spaysdk brand setpaymentshippingmethod public customsheetpaymentinfo builder setpaymentshippingmethod string shippingmethod api to set the shipping method for payment transaction parameters shippingmethod - shipping method returns customsheetpaymentinfo builder since api level 1 7 build public customsheetpaymentinfo build api to build customsheetpaymentinfo object returns customsheetpaymentinfo object since api level 1 3 samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 payment class customsheetpaymentinfo java lang object com samsung android sdk samsungpay v2 payment customsheetpaymentinfo all implemented interfaces android os parcelable public class customsheetpaymentinfo extends object implements android os parcelable this class provides apis to fetch payment information details with custom payment sheet information that is, transaction details set by the merchant app since api level 1 3 see also paymentmanager startinapppaywithcustomsheet customsheetpaymentinfo, paymentmanager customsheettransactioninfolistener nested class summary nested classes modifier and type class description static class customsheetpaymentinfo address this class provides apis to create address parcel object static enum customsheetpaymentinfo addressinpaymentsheet this enumeration provides types of address ui on the payment sheet, based on merchant requirement static class customsheetpaymentinfo builder this is builder class for constructing customsheetpaymentinfo object 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 method summary all methodsinstance methodsconcrete methods modifier and type method description customsheetpaymentinfo addressinpaymentsheet getaddressinpaymentsheet api to return the address display option on the payment sheet list<spaysdk brand> getallowedcardbrands api to return the brand of cards supported by merchant cardinfo getcardinfo api to return the selected card information in samsung pay customsheet getcustomsheet api to return customsheet android os bundle getextrapaymentinfo api to return the configured extra paymentinfo boolean getiscardholdernamerequired api to return whether card holder's name should be displayed on the card list on the payment sheet boolean getisrecurring api to return whether the payment is recurring or not string getmerchantcountrycode api to return the country code, where merchant is operating string getmerchantid api to return the merchant reference id string getmerchantname api to return the merchant name string getordernumber api to return the order number for transaction spaysdk brand getpaymentcardbrand api to return the card brand which was used in the current transaction partner can get this information if needed string getpaymentcardlast4dpan api to return the last 4 digits of dpan which was used in the current transaction partner can get this information if needed string getpaymentcardlast4fpan api to return the last 4 digits of fpan which was used in the current transaction partner can get this information if needed string getpaymentcurrencycode api to return the iso currency code which was used in the current transaction partner can get this information if needed customsheetpaymentinfo address getpaymentshippingaddress api to return the shipping/delivery address which was used in the current transaction partner can get this information if needed string getpaymentshippingmethod api to return the shipping method which was used in the current transaction partner can get this information if needed string getversion api to return the version name of the samsung pay package methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait method details getversion public string getversion api to return the version name of the samsung pay package returns sdk version name since api level 1 3 getmerchantid public string getmerchantid api to return the merchant reference id returns merchant reference id which can be used for merchant's own purpose for example, if merchant uses a payment gateway which requires payment gateway user id, then merchantid field can be set with a payment gateway user id since api level 1 3 getmerchantname public string getmerchantname api to return the merchant name returns merchant name since api level 1 3 getordernumber public string getordernumber api to return the order number for transaction returns order number which is sent by merchant for records since api level 1 3 getaddressinpaymentsheet public customsheetpaymentinfo addressinpaymentsheet getaddressinpaymentsheet api to return the address display option on the payment sheet returns one of the following values to indicate if the address needs to be displayed on the payment sheet or not customsheetpaymentinfo addressinpaymentsheet need_billing_and_shipping customsheetpaymentinfo addressinpaymentsheet need_billing_send_shipping customsheetpaymentinfo addressinpaymentsheet need_billing_spay customsheetpaymentinfo addressinpaymentsheet need_shipping_spay customsheetpaymentinfo addressinpaymentsheet send_shipping customsheetpaymentinfo addressinpaymentsheet do_not_show since api level 1 3 getallowedcardbrands public list<spaysdk brand> getallowedcardbrands api to return the brand of cards supported by merchant returns list of card brands supported since api level 1 3 getcardinfo public cardinfo getcardinfo api to return the selected card information in samsung pay returns cardinfo object since api level 1 3 getiscardholdernamerequired public boolean getiscardholdernamerequired api to return whether card holder's name should be displayed on the card list on the payment sheet returns true, if card holder's name is to be displayed on the payment sheet else, returns false since api level 1 3 getisrecurring public boolean getisrecurring api to return whether the payment is recurring or not returns true, if payment is recurring else, returns false since api level 1 3 getmerchantcountrycode public string getmerchantcountrycode api to return the country code, where merchant is operating returns country code for region where merchant is operating since api level 1 3 getextrapaymentinfo public android os bundle getextrapaymentinfo api to return the configured extra paymentinfo returns extra paymentinfo configured by merchant app since api level 1 3 getcustomsheet public customsheet getcustomsheet api to return customsheet returns customsheet configured by merchant app since api level 1 3 getpaymentcardlast4dpan public string getpaymentcardlast4dpan api to return the last 4 digits of dpan which was used in the current transaction partner can get this information if needed they can use this for their own purpose this api method can be used in paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle callback only this api is available only with us samsung pay app returns the last 4 digits of dpan which was used in the current transaction since api level 1 7 getpaymentcardlast4fpan public string getpaymentcardlast4fpan api to return the last 4 digits of fpan which was used in the current transaction partner can get this information if needed they can use this for their own purpose this api method can be used in paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle callback only this api is available only with us samsung pay app returns the last 4 digits of fpan which was used in the current transaction since api level 1 7 getpaymentcardbrand public spaysdk brand getpaymentcardbrand api to return the card brand which was used in the current transaction partner can get this information if needed they can use this for their own purpose this api method can be used in paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle callback only this api is available only with us samsung pay app returns card brand which was used in the current transaction since api level 1 7 see also spaysdk brand getpaymentcurrencycode public string getpaymentcurrencycode api to return the iso currency code which was used in the current transaction partner can get this information if needed they can use this for their own purpose this api method can be used in paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle callback only this api is available only with us samsung pay app returns currency code which was used in the current transaction since api level 1 7 getpaymentshippingaddress public customsheetpaymentinfo address getpaymentshippingaddress api to return the shipping/delivery address which was used in the current transaction partner can get this information if needed they can use this for their own purpose this api method can be used in paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle callback only this api is available only with us samsung pay app returns shipping address which was used in the current transaction since api level 1 7 see also customsheetpaymentinfo address getpaymentshippingmethod public string getpaymentshippingmethod api to return the shipping method which was used in the current transaction partner can get this information if needed they can use this for their own purpose this api method can be used in paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle callback only this api is available only with us samsung pay app returns shipping method which was used in the current transaction since api level 1 7 samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 payment class cardinfo builder java lang object com samsung android sdk samsungpay v2 payment cardinfo builder enclosing class cardinfo public static class cardinfo builder extends object this is builder class for constructing cardinfo object which is passed to samsung pay from merchant since api level 1 1 see also paymentmanager startsimplepay cardinfo, statuslistener constructor summary constructors constructor description builder method summary all methodsinstance methodsconcrete methods modifier and type method description cardinfo build builds the cardinfo object cardinfo builder setcardid string cardid api to set unique identification of a card in samsung pay cardinfo builder setcardmetadata android os bundle cardmetadata api to set extra card information if any related to the card methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait constructor details builder public builder method details setcardid public cardinfo builder setcardid string cardid api to set unique identification of a card in samsung pay parameters cardid - unique id to refer a card in samsung pay returns cardinfo details builder since api level 1 1 see also paymentmanager startsimplepay cardinfo, statuslistener setcardmetadata public cardinfo builder setcardmetadata android os bundle cardmetadata api to set extra card information if any related to the card returns extra card information since api level 1 1 see also paymentmanager startsimplepay cardinfo, statuslistener build public cardinfo build builds the cardinfo object returns cardinfo object since api level 1 1 samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 payment class cardinfo java lang object com samsung android sdk samsungpay v2 payment cardinfo all implemented interfaces android os parcelable public class cardinfo extends object implements android os parcelable this class provides card information related to payment operations since api level 1 1 see also paymentmanager requestcardinfo bundle, paymentmanager cardinfolistener nested class summary nested classes modifier and type class description static class cardinfo builder this is builder class for constructing cardinfo object which is passed to samsung pay from merchant 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 method summary all methodsinstance methodsconcrete methods modifier and type method description spaysdk brand getbrand api to get the card brand string getcardid api to get unique identification of a card in samsung pay android os bundle getcardmetadata api to get extra card information if any related to the card methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait method details getbrand public spaysdk brand getbrand api to get the card brand returns card brand types such as spaysdk brand americanexpress spaysdk brand mastercard spaysdk brand visa spaysdk brand discover spaysdk brand chinaunionpay spaysdk brand eci since api level 1 1 getcardid public string getcardid api to get unique identification of a card in samsung pay returns unique id to refer a card in samsung pay since api level 1 1 getcardmetadata public android os bundle getcardmetadata api to get extra card information if any related to the card returns extra cardinfo bundle since api level 1 5, spaysdk extra_last4_fpan and spaysdk extra_last4_dpan of the card which were used for the current transaction is included in customsheetpaymentinfo in case of onsuccess callback refer to paymentmanager customsheettransactioninfolistener onsuccess customsheetpaymentinfo, string, bundle since api level 1 1 samsung electronics samsung pay sdk 2 19 00 - jun 12 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 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 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_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 getallcards android os bundle cardfilter, getcardlistener listener api to get all the cards from samsung pay for the given filter 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 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 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 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 following codes with bundle data 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 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 getallcards public void getallcards android os bundle cardfilter, 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 samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
Develop Samsung Pay
apiid card information this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error static final int error_max_card_num_reached this error indicates that the maximum number of card limit has reached and user cannot add more card to samsung pay this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error static final int error_max_pan_provision_num_reached this error indicates that the limit number of enrollments of this pan has reached and user cannot add this pan this time static final int error_server_reject this error indicates that the server declined the request this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error static final int error_tsm_fail this error indicates that tsm error is reported during card downloading static final int error_verify_card this error indicates that server was unable to verify the card operation this may be due to invalid verification code static final int error_wallet_id_mismatch this error indicates that wallet id is mismatch this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error static final string extra_app2app_intent key to represent app2app intent name defined by issuer server static final string extra_app2app_payload key to represent app2app payload sent by issuer server static final string extra_card_balance key to represent card balance static final string extra_card_status_reason key to represent extra card status for issuer app static final string extra_issuer_app_card_linked key to represent extra card information for card link field details error_verify_card static final int error_verify_card this error indicates that server was unable to verify the card operation this may be due to invalid verification code since api level 1 2 see also constant field values error_card_already_registered static final int error_card_already_registered this error indicates that the requested operation is already done and this operation cannot be performed again this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error since api level 1 2 see also constant field values error_framework_internal static final int error_framework_internal this error indicates that an error occurred in payment framework while processing the request this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error for example, unable to load certificate from ta, unable to access payment framework db, and so on since api level 1 2 see also constant field values error_invalid_card static final int error_invalid_card this error indicates that the card 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 error_invalid_cardinput static final int error_invalid_cardinput this error indicates that the user entered invalid card information this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error since api level 1 2 see also constant field values error_server_reject static final int error_server_reject this error indicates that the server declined the request this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error since api level 1 2 see also constant field values error_max_card_num_reached static final int error_max_card_num_reached this error indicates that the maximum number of card limit has reached and user cannot add more card to samsung pay this is returned as spaysdk extra_error_reason for spaysdk error_registration_fail error since api level 1 2 see also constant field values error_tsm_fail static final int error_tsm_fail this error indicates that tsm error is reported during card downloading this is for tsm solution only since api level 1 4 see also constant field values error_authentication_not_ready static final int error_authentication_not_ready this error indicates that authentication is not ready state during update card service since api level 1 8 see also constant field values error_authentication_failed static final int error_authentication_failed this error indicates that authentication is failed during update card service since api level 1 8 see also constant field values error_authentication_closed static final int error_authentication_closed this error indicates that authentication is force closed during update card service since api level 1 8 see also constant field values error_authentication_timed_out static final int error_authentication_timed_out this error indicates that authentication is closed due to timeout during update card service since api level 1 8 see also constant field values error_card_not_supported static final int error_card_not_supported this error indicates that card is not supported 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_max_pan_provision_num_reached static final int error_max_pan_provision_num_reached this error indicates that the limit number of enrollments of this pan has reached and user cannot add this pan this time user needs to contact issuer to resolve this issue 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_wallet_id_mismatch static final int error_wallet_id_mismatch this error indicates that wallet id is mismatch 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_auth_code_invalid static final int error_auth_code_invalid this error indicates that auth code is invalid this is returned as spaysdk extra_error_reason for error_verify_card error since api level 2 7 see also constant field values error_auth_code_expired static final int error_auth_code_expired this error indicates that auth code is expired this is returned as spaysdk extra_error_reason for error_verify_card error since api level 2 7 see also constant field values error_auth_code_max_try_reached static final int error_auth_code_max_try_reached this error indicates that maximum idnv try reached this is returned as spaysdk extra_error_reason for error_verify_card error since api level 2 7 see also constant field values error_auth_code_type_invalid static final int error_auth_code_type_invalid this error indicates that auth code type is invalid this is returned as spaysdk extra_error_reason for error_verify_card error since api level 2 7 see also constant field values error_card_idv_not_supported static final int error_card_idv_not_supported this error indicates that the card does not support any idnv this is returned as spaysdk extra_error_reason for error_verify_card error since api level 2 7 see also constant field values extra_app2app_intent static final string extra_app2app_intent key to represent app2app intent name defined by issuer server since api level 1 1 see also constant field values extra_app2app_payload static final string extra_app2app_payload key to represent app2app payload sent by issuer server since api level 1 1 see also constant field values extra_card_balance static final string extra_card_balance key to represent card balance since api level 1 8 see also constant field values extra_card_status_reason static final string extra_card_status_reason key to represent extra card status for issuer app since api level 1 4 see also constant field values extra_issuer_app_card_linked static final string extra_issuer_app_card_linked key to represent extra card information for card link since api level 2 2 see also constant field values samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 class spaysdk java lang object com samsung android sdk samsungpay v2 spaysdk direct known subclasses cardmanager, paymentmanager public abstract class spaysdk extends object this class allows to define samsung pay sdk information, common error codes, and constants since api level 1 1 nested class summary nested classes modifier and type class description static enum spaysdk brand this enumeration provides sdk supported card brands such as american express, mastercard, visa, discover, china unionpay, octopus, eci and pagobancomat static enum spaysdk servicetype this enumeration provides service types partners must set their service type in the partnerinfo when they call any apis field summary fields modifier and type field description static final string common_status_table this table shows the status codes used commonly status bundle keys bundle values spay_not_supported 0 extra_error_reason error_device_not_samsung -350 error_spay_pkg_not_found -351 error_spay_sdk_service_not_available -352 error_device_integrity_check_fail -353 error_spay_app_integrity_check_fail -360 error_android_platform_check_fail -361 spay_not_ready 1 extra_error_reason error_spay_setup_not_completed -356 error_spay_app_need_to_update -357 error_spay_internal -1 extra_error_reason error_server_internal -311 n/a n/a error_not_allowed -6 extra_error_reason error_invalid_parameter -12 error_sdk_not_supported_for_this_region -300 error_service_id_invalid -301 error_service_unavailable_for_this_region -302 error_partner_app_signature_mismatch -303 error_partner_app_version_not_supported -304 error_partner_app_blocked -305 error_user_not_registered_for_debug -306 error_service_not_approved_for_release -307 error_partner_not_approved -308 error_unauthorized_request_type -309 error_expired_or_invalid_debug_key -310 error_missing_information -354 error_unable_to_verify_caller -359 error_invalid_parameter -12 n/a n/a error_no_network -21 n/a n/a error_server_no_response -22 n/a n/a error_partner_info_invalid -99 extra_error_reason error_partner_sdk_api_level -10 error_partner_service_type -11 error_partner_sdk_version_not_allowed -358 error_initiation_fail -103 n/a n/a spay_not_allowed_temporally 3 extra_error_reason error_spay_connected_with_external_display -605 error_spay_fmm_lock -604 n/a n/a paymentmanager error_making_sheet_failed -115 n/a n/a static final string cryptogram_type_icc key to represent the icc cryptogram type of mastercard static final string cryptogram_type_ucaf key to represent the ucaf cryptogram type of mastercard static final string device_id key to represent unique device id static final string device_type_gear device type is gear static final string device_type_phone device type is phone static final int error_android_platform_check_fail this error indicates that android platform version check has failed for in-app payment, the samsung pay sdk requires android 6 0 m android api level 23 or later versions of the android os this is returned as extra_error_reason for spay_not_supported error static final int error_device_integrity_check_fail this error indicates that device integrity check has failed this is returned as extra_error_reason for spay_not_supported error static final int error_device_not_samsung this error indicates that the device is not a samsung device this is returned as extra_error_reason for spay_not_supported error static final int error_duplicated_sdk_api_called this error indicates that duplicate api called by partner static final int error_expired_or_invalid_debug_key this error indicates that debug key is invalid or expired this is returned as extra_error_reason for error_not_allowed error for example, if the partner app uses expired debug-api-key, then the partner app verification will be failed static final int error_initiation_fail this error indicates that session initiation or service binding has failed for example, if the service connection with samsung pay was not successful static final int error_invalid_parameter this error indicates that requested operation contains invalid parameter or invalid bundle key/value static final int error_missing_information this error indicates that some information of partner is missing this error code is returned as an extra_error_reason of error_not_allowed error for example, if the partner app does not deliver a required information to samsung pay to get the wallet information, then samsung pay will send this error to partner app also if the partner does not define the issuer name in samsung pay developer portal, samsung pay will send this error to partner app static final int error_no_network this error indicates that samsung pay is unable to connect to the server since there is no network for example, partner app tries to verify with server while network is not connected static final int error_none this error indicates that requested operation is success with no error static final int error_not_allowed this error indicates that requested operation is not allowed for example, partner app verification has failed in samsung pay server static final int error_not_found this error indicates that given card id is not found in samsung pay static final int error_not_supported this error indicates that requested operation is not supported in samsung pay static final int error_partner_app_blocked this error indicates that partner app version is removed/blocked by the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is blocked, then the partner app verification will be failed static final int error_partner_app_signature_mismatch this error indicates that the app signature is different from the one registered from samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if different signature is used for signing apk, the partner app verification will be failed checking signature logic will be activated in case debug mode is "n" static final int error_partner_app_version_not_supported this error indicates that app version is not supported by samsung pay this is returned as extra_error_reason for error_not_allowed error for example, if the version registered from developer portal is higher than current version or no any version registered , then the partner app verification will be failed static final int error_partner_info_invalid this error indicates that partner information is invalid for example, partner app is using sdk version not allowed, invalid service type, wrong api level, and so on static final int error_partner_not_approved this error indicates that partner registration is not done on the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is submitted but not approved, then the partner app verification will be failed static final int error_partner_sdk_api_level this error indicates that sdk api level is missing or invalid partner must set valid api level in the androidmanifest file static final int error_partner_sdk_version_not_allowed this error indicates that the partner app is using samsung pay sdk not allowed this is returned as extra_error_reason for error_partner_info_invalid error static final int error_partner_service_type this error indicates that the service type is invalid partner must set valid service type in partnerinfo when calling apis this is returned as extra_error_reason for spay_not_ready error static final int error_registration_fail this error indicates that the card provisioning has failed static final int error_sdk_not_supported_for_this_region this error indicates that the samsung pay sdk is not supported in particular region this is returned as extra_error_reason for error_not_allowed error for example, if the device is from the country that samsung pay sdk is not supported, then the partner app verification will be failed static final int error_server_internal this error indicates that server fails to proceed request due to unknown internal error this is returned as extra_error_reason for error_spay_internal error for example, if the server error occurred while the partner verification is going on, then the partner app verification will be failed static final int error_server_no_response this error indicates that server did not respond to the samsung pay request static final int error_service_id_invalid this error indicates that service id is not registered with the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if invalid service id was used in partner app, then the partner app verification will be failed static final int error_service_not_approved_for_release this error indicates that service version is not approved for release by the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is not registered for release mode, then the partner app verification will be failed static final int error_service_unavailable_for_this_region this error indicates that sdk support is not available for partner's service in particular region static final int error_spay_app_integrity_check_fail this error indicates that samsung pay app integrity check has failed this is returned as extra_error_reason for spay_not_supported error static final int error_spay_app_need_to_update this error indicates that the samsung pay should be updated partner app need to ask user to update samsung pay app static final int error_spay_connected_with_external_display this error indicates that device is connected with an external display due to security reason, samsung pay cannot be launched at this moment in this case, partner can guide user to disconnect any external display if connected static final int error_spay_fmm_lock this error indicates that device is locked due to fmm find my mobile partner app needs to ask user to unlock the samsung pay app static final int error_spay_internal this error indicates that internal error has occurred while the requested operation is going on static final int error_spay_pkg_not_found this error indicates that the samsung pay application is not on the device this is returned as extra_error_reason for spay_not_supported error this could mean that the device does not support samsung pay static final int error_spay_sdk_service_not_available this error indicates that sdk service is not available on this device this is returned as extra_error_reason for spay_not_supported error static final int error_spay_setup_not_completed this error indicates that the samsung pay setup was not completed partner app need to ask user to set up samsung pay app static final int error_unable_to_verify_caller this error indicates that samsung pay is unable to verify partner app at this moment this is returned as extra_error_reason for error_not_allowed error for example, samsung pay tried to connect to the server and validate partner id, but the device does not have the network connectivity static final int error_unauthorized_request_type this error indicates that the partner is not authorized for this request type such as payment or enrollment this is returned as extra_error_reason for error_not_allowed error for example, if the merchant app calls enrollment api, then the partner app verification will be failed static final int error_user_canceled this error indicates that user has cancelled before completing the requested operation for example, user taps the cancel or back key on the payment sheet static final int error_user_not_registered_for_debug this error indicates that user account is not registered for using debug mode on the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is in debug mode but the samsung account is not registered for the debug-api-key, then the partner app verification will be failed static final string extra_accept_combo_card key to represent that a merchant accepts combo card partner can use this key to let customers to choose debit/credit in case of combo card static final string extra_card_type key to represent card type the possible values are card card_type_credit_debit card card_type_credit card card_type_debit card card_type_gift card card_type_loyalty card card_type_transit static final string extra_country_code key to represent country code device country code iso 3166-1 alpha-2 static final string extra_cpf_holder_name key to get cpf holder name in extra payment data when partner requests cpf by extra_require_cpf key, the samsung pay would bundle cpf information in the extrapaymentdata parameter of paymentmanager customsheettransactioninfolistener onsuccess com samsung android sdk samsungpay v2 payment customsheetpaymentinfo, java lang string, android os bundle callback static final string extra_cpf_number key to get cpf number in extra payment data when partner requests cpf by extra_require_cpf key, the samsung pay would bundle cpf information in the extrapaymentdata parameter of paymentmanager customsheettransactioninfolistener onsuccess com samsung android sdk samsungpay v2 payment customsheetpaymentinfo, java lang string, android os bundle callback static final string extra_cryptogram_type key to represent the dsrp digital secure remote payments cryptogram type of mastercard static final string extra_device_card_limit_reached key to represent the maximum registered card number has reached or not static final string extra_device_type key to represent type of the device mobile or gear static final string extra_error_reason key to represent extra error reasons static final string extra_error_reason_message key to represent extra error reason messages static final string extra_issuer_name key to represent name of the issuer this key can be used in the bundle for partnerinfo string, bundle static final string extra_issuer_pkgname key to represent package name of the issuer app on android static final string extra_last4_dpan key to represent the last four digits of digitalized personal identification number dpan static final string extra_last4_fpan key to represent the last four digits of funding personal identification number fpan static final string extra_member_id key to represent member id of the issuer this is for korean issuers only static final string extra_merchant_ref_id key to set/get merchant reference id beyond marketplace app or service i e static final string extra_partner_name key to represent name of the partner app this key can be used in the bundle for partnerinfo string, bundle static final string extra_request_id key to represent request id when a request is failed, tr will send this key to partner app static final string extra_require_cpf key to represent that a partner requires cpf partner can use this key to ask samsung pay to show cpf information in the payment sheet static final string extra_resolved_1 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_resolved_2 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_resolved_3 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_resolved_4 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_resolved_5 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_resolved_6 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_resolved_7 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 partner_service_type key to represent unique service type this key must be set in the bundle for partnerinfo string, bundle static final int spay_has_no_transit_card this code is returned if samsung pay doesn't have a registered transit card this is for korean issuers only static final int spay_has_transit_card this code is returned if samsung pay has a registered transit card this is for korean issuers only static final int spay_not_allowed_temporally samsung pay is not allowed temporally refer extra reason delivered with extra_error_reason static final int spay_not_ready samsung pay is not completely activated usually, this status code is returned if the user did not complete the mandatory update or if the user is not signed in with the samsung account yet in this case, partner app can call samsungpay activatesamsungpay api to launch samsung pay or can call samsungpay gotoupdatepage api to update samsung pay app static final int spay_not_supported samsung pay is not supported on this device usually, this status code is returned if the device is not compatible to run samsung pay or if the samsung pay app is not installed static final int spay_ready samsung pay is activated and ready to use usually, this status code is returned after user completes all the mandatory updates and is signed in static final string wallet_dm_id key to represent unique device management id static final string wallet_user_id key to represent user's wallet id method summary all methodsstatic methodsconcrete methods modifier and type method description static int getversioncode returns the version code of the samsung pay sdk static string getversionname returns the version name of the samsung pay sdk methods inherited from class java lang object equals, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait field details error_none public static final int error_none this error indicates that requested operation is success with no error see also constant field values error_spay_internal public static final int error_spay_internal this error indicates that internal error has occurred while the requested operation is going on see also constant field values error_not_supported public static final int error_not_supported this error indicates that requested operation is not supported in samsung pay see also constant field values error_not_found public static final int error_not_found this error indicates that given card id is not found in samsung pay see also constant field values error_not_allowed public static final int error_not_allowed this error indicates that requested operation is not allowed for example, partner app verification has failed in samsung pay server see also constant field values error_user_canceled public static final int error_user_canceled this error indicates that user has cancelled before completing the requested operation for example, user taps the cancel or back key on the payment sheet see also constant field values error_partner_sdk_api_level public static final int error_partner_sdk_api_level this error indicates that sdk api level is missing or invalid partner must set valid api level in the androidmanifest file minimum possible version is 1 4 also if the partner set the values defined in higher api level, samsung pay will send this error to partner app this is returned as extra_error_reason for error_partner_info_invalid error since api level 1 4 see also constant field values error_partner_service_type public static final int error_partner_service_type this error indicates that the service type is invalid partner must set valid service type in partnerinfo when calling apis this is returned as extra_error_reason for spay_not_ready error since api level 1 4 see also constant field values error_invalid_parameter public static final int error_invalid_parameter this error indicates that requested operation contains invalid parameter or invalid bundle key/value since api level 2 3 see also constant field values error_no_network public static final int error_no_network this error indicates that samsung pay is unable to connect to the server since there is no network for example, partner app tries to verify with server while network is not connected see also constant field values error_server_no_response public static final int error_server_no_response this error indicates that server did not respond to the samsung pay request see also constant field values error_partner_info_invalid public static final int error_partner_info_invalid this error indicates that partner information is invalid for example, partner app is using sdk version not allowed, invalid service type, wrong api level, and so on since api level 2 5 see also constant field values error_initiation_fail public static final int error_initiation_fail this error indicates that session initiation or service binding has failed for example, if the service connection with samsung pay was not successful see also constant field values error_registration_fail public static final int error_registration_fail this error indicates that the card provisioning has failed since api level 1 2 see also constant field values error_duplicated_sdk_api_called public static final int error_duplicated_sdk_api_called this error indicates that duplicate api called by partner since api level 2 1 see also constant field values error_sdk_not_supported_for_this_region public static final int error_sdk_not_supported_for_this_region this error indicates that the samsung pay sdk is not supported in particular region this is returned as extra_error_reason for error_not_allowed error for example, if the device is from the country that samsung pay sdk is not supported, then the partner app verification will be failed see also constant field values error_service_id_invalid public static final int error_service_id_invalid this error indicates that service id is not registered with the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if invalid service id was used in partner app, then the partner app verification will be failed since api level 2 5 see also constant field values error_service_unavailable_for_this_region public static final int error_service_unavailable_for_this_region this error indicates that sdk support is not available for partner's service in particular region since api level 2 5 see also constant field values error_partner_app_signature_mismatch public static final int error_partner_app_signature_mismatch this error indicates that the app signature is different from the one registered from samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if different signature is used for signing apk, the partner app verification will be failed checking signature logic will be activated in case debug mode is "n" since api level 2 9 see also constant field values error_partner_app_version_not_supported public static final int error_partner_app_version_not_supported this error indicates that app version is not supported by samsung pay this is returned as extra_error_reason for error_not_allowed error for example, if the version registered from developer portal is higher than current version or no any version registered , then the partner app verification will be failed since api level 2 9 see also constant field values error_partner_app_blocked public static final int error_partner_app_blocked this error indicates that partner app version is removed/blocked by the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is blocked, then the partner app verification will be failed since api level 2 9 see also constant field values error_user_not_registered_for_debug public static final int error_user_not_registered_for_debug this error indicates that user account is not registered for using debug mode on the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is in debug mode but the samsung account is not registered for the debug-api-key, then the partner app verification will be failed see also constant field values error_service_not_approved_for_release public static final int error_service_not_approved_for_release this error indicates that service version is not approved for release by the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is not registered for release mode, then the partner app verification will be failed since api level 2 5 see also constant field values error_partner_not_approved public static final int error_partner_not_approved this error indicates that partner registration is not done on the samsung pay developers this is returned as extra_error_reason for error_not_allowed error for example, if the partner app is submitted but not approved, then the partner app verification will be failed see also constant field values error_unauthorized_request_type public static final int error_unauthorized_request_type this error indicates that the partner is not authorized for this request type such as payment or enrollment this is returned as extra_error_reason for error_not_allowed error for example, if the merchant app calls enrollment api, then the partner app verification will be failed see also constant field values error_expired_or_invalid_debug_key public static final int error_expired_or_invalid_debug_key this error indicates that debug key is invalid or expired this is returned as extra_error_reason for error_not_allowed error for example, if the partner app uses expired debug-api-key, then the partner app verification will be failed see also constant field values error_server_internal public static final int error_server_internal this error indicates that server fails to proceed request due to unknown internal error this is returned as extra_error_reason for error_spay_internal error for example, if the server error occurred while the partner verification is going on, then the partner app verification will be failed since api level 2 5 see also constant field values error_device_not_samsung public static final int error_device_not_samsung this error indicates that the device is not a samsung device this is returned as extra_error_reason for spay_not_supported error see also constant field values error_spay_pkg_not_found public static final int error_spay_pkg_not_found this error indicates that the samsung pay application is not on the device this is returned as extra_error_reason for spay_not_supported error this could mean that the device does not support samsung pay see also constant field values error_spay_sdk_service_not_available public static final int error_spay_sdk_service_not_available this error indicates that sdk service is not available on this device this is returned as extra_error_reason for spay_not_supported error see also constant field values error_device_integrity_check_fail public static final int error_device_integrity_check_fail this error indicates that device integrity check has failed this is returned as extra_error_reason for spay_not_supported error see also constant field values error_spay_app_integrity_check_fail public static final int error_spay_app_integrity_check_fail this error indicates that samsung pay app integrity check has failed this is returned as extra_error_reason for spay_not_supported error see also constant field values error_android_platform_check_fail public static final int error_android_platform_check_fail this error indicates that android platform version check has failed for in-app payment, the samsung pay sdk requires android 6 0 m android api level 23 or later versions of the android os this is returned as extra_error_reason for spay_not_supported error since api level 1 5 see also constant field values error_missing_information public static final int error_missing_information this error indicates that some information of partner is missing this error code is returned as an extra_error_reason of error_not_allowed error for example, if the partner app does not deliver a required information to samsung pay to get the wallet information, then samsung pay will send this error to partner app also if the partner does not define the issuer name in samsung pay developer portal, samsung pay will send this error to partner app see also constant field values error_spay_setup_not_completed public static final int error_spay_setup_not_completed this error indicates that the samsung pay setup was not completed partner app need to ask user to set up samsung pay app if user agrees, call samsungpay activatesamsungpay api this is returned as extra_error_reason for spay_not_ready error see also constant field values error_spay_app_need_to_update public static final int error_spay_app_need_to_update this error indicates that the samsung pay should be updated partner app need to ask user to update samsung pay app if user agrees, call samsungpay gotoupdatepage api this is returned as extra_error_reason for spay_not_ready error since api level 1 1 see also constant field values error_partner_sdk_version_not_allowed public static final int error_partner_sdk_version_not_allowed this error indicates that the partner app is using samsung pay sdk not allowed this is returned as extra_error_reason for error_partner_info_invalid error since api level 2 5 see also constant field values error_unable_to_verify_caller public static final int error_unable_to_verify_caller this error indicates that samsung pay is unable to verify partner app at this moment this is returned as extra_error_reason for error_not_allowed error for example, samsung pay tried to connect to the server and validate partner id, but the device does not have the network connectivity see also constant field values error_spay_fmm_lock public static final int error_spay_fmm_lock this error indicates that device is locked due to fmm find my mobile partner app needs to ask user to unlock the samsung pay app if user agrees, call samsungpay activatesamsungpay to unlock the samsung pay app since api level 2 1 see also samsungpay activatesamsungpay constant field values error_spay_connected_with_external_display public static final int error_spay_connected_with_external_display this error indicates that device is connected with an external display due to security reason, samsung pay cannot be launched at this moment in this case, partner can guide user to disconnect any external display if connected since api level 2 7 see also constant field values spay_not_supported public static final int spay_not_supported samsung pay is not supported on this device usually, this status code is returned if the device is not compatible to run samsung pay or if the samsung pay app is not installed since api level 1 1 see also constant field values spay_not_ready public static final int spay_not_ready samsung pay is not completely activated usually, this status code is returned if the user did not complete the mandatory update or if the user is not signed in with the samsung account yet in this case, partner app can call samsungpay activatesamsungpay api to launch samsung pay or can call samsungpay gotoupdatepage api to update samsung pay app since api level 1 1 see also constant field values spay_ready public static final int spay_ready samsung pay is activated and ready to use usually, this status code is returned after user completes all the mandatory updates and is signed in since api level 1 1 see also constant field values spay_not_allowed_temporally public static final int spay_not_allowed_temporally samsung pay is not allowed temporally refer extra reason delivered with extra_error_reason since api level 2 7 see also constant field values spay_has_transit_card public static final int spay_has_transit_card this code is returned if samsung pay has a registered transit card this is for korean issuers only since api level 2 8 see also constant field values spay_has_no_transit_card public static final int spay_has_no_transit_card this code is returned if samsung pay doesn't have a registered transit card this is for korean issuers only since api level 2 8 see also constant field values device_type_phone public static final string device_type_phone device type is phone since api level 1 1 see also constant field values device_type_gear public static final string device_type_gear device type is gear since api level 1 1 see also constant field values extra_last4_dpan public static final string extra_last4_dpan key to represent the last four digits of digitalized personal identification number dpan since api level 1 1 see also constant field values extra_last4_fpan public static final string extra_last4_fpan key to represent the last four digits of funding personal identification number fpan since api level 1 1 see also constant field values extra_issuer_name public static final string extra_issuer_name key to represent name of the issuer this key can be used in the bundle for partnerinfo string, bundle since api level 1 1 see also constant field values extra_issuer_pkgname public static final string extra_issuer_pkgname key to represent package name of the issuer app on android since api level 1 1 see also constant field values extra_partner_name public static final string extra_partner_name key to represent name of the partner app this key can be used in the bundle for partnerinfo string, bundle since api level 2 6 see also constant field values extra_error_reason public static final string extra_error_reason key to represent extra error reasons since api level 1 1 see also constant field values extra_error_reason_message public static final string extra_error_reason_message key to represent extra error reason messages since api level 2 9 see also constant field values extra_card_type public static final string extra_card_type key to represent card type the possible values are card card_type_credit_debit card card_type_credit card card_type_debit card card_type_gift card card_type_loyalty card card_type_transit since api level 1 1 see also constant field values extra_device_type public static final string extra_device_type key to represent type of the device mobile or gear the possible values are device_type_phone device_type_gear since api level 1 1 see also constant field values extra_member_id public static final string extra_member_id key to represent member id of the issuer this is for korean issuers only since api level 1 1 see also constant field values extra_country_code public static final string extra_country_code key to represent country code device country code iso 3166-1 alpha-2 since api level 1 1 see also constant field values extra_device_card_limit_reached public static final string extra_device_card_limit_reached key to represent the maximum registered card number has reached or not since api level 1 1 see also constant field values extra_cryptogram_type public static final string extra_cryptogram_type key to represent the dsrp digital secure remote payments cryptogram type of mastercard cryptogram type is supported by mastercard only, can be put as an optional value in extrapaymentinfo of customsheetpaymentinfo since api level 2 4 see also constant field values extra_resolved_1 public static final string extra_resolved_1 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_resolved_2 public static final string extra_resolved_2 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_resolved_3 public static final string extra_resolved_3 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_resolved_4 public static final string extra_resolved_4 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_resolved_5 public static final string extra_resolved_5 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_resolved_6 public static final string extra_resolved_6 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_resolved_7 public static final string extra_resolved_7 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_request_id public static final string extra_request_id key to represent request id when a request is failed, tr will send this key to partner app request id would be helpful for debugging a failed request between partner and tr since api level 2 5 see also constant field values cryptogram_type_ucaf public static final string cryptogram_type_ucaf key to represent the ucaf cryptogram type of mastercard ucaf cryptogram type is supported by mastercard only, can be put as an optional value in extrapaymentinfo of customsheetpaymentinfo ucaf is a default cryptogram type if not specified in the extrapaymentinfo bundle since api level 2 4 see also constant field values cryptogram_type_icc public static final string cryptogram_type_icc key to represent the icc cryptogram type of mastercard icc cryptogram type is supported by mastercard only, can be put as an optional value in extrapaymentinfo of customsheetpaymentinfo since api level 2 4 see also constant field values extra_accept_combo_card public static final string extra_accept_combo_card key to represent that a merchant accepts combo card partner can use this key to let customers to choose debit/credit in case of combo card it can be put as an optional value in extrapaymentinfo of customsheetpaymentinfo the possible value is the boolean since api level 2 9 see also constant field values extra_require_cpf public static final string extra_require_cpf key to represent that a partner requires cpf partner can use this key to ask samsung pay to show cpf information in the payment sheet it can be put as an optional value in extrapaymentinfo of customsheetpaymentinfo the possible value is the boolean this is for brazil partners only since api level 2 11 see also constant field values extra_cpf_holder_name public static final string extra_cpf_holder_name key to get cpf holder name in extra payment data when partner requests cpf by extra_require_cpf key, the samsung pay would bundle cpf information in the extrapaymentdata parameter of paymentmanager customsheettransactioninfolistener onsuccess com samsung android sdk samsungpay v2 payment customsheetpaymentinfo, java lang string, android os bundle callback since api level 2 11 see also constant field values extra_cpf_number public static final string extra_cpf_number key to get cpf number in extra payment data when partner requests cpf by extra_require_cpf key, the samsung pay would bundle cpf information in the extrapaymentdata parameter of paymentmanager customsheettransactioninfolistener onsuccess com samsung android sdk samsungpay v2 payment customsheetpaymentinfo, java lang string, android os bundle callback since api level 2 11 see also constant field values extra_merchant_ref_id public static final string extra_merchant_ref_id key to set/get merchant reference id beyond marketplace app or service i e bixby when marketplace apps request in-app payment, they can set merchant reference id so that samsung pay app can get detail information about the merchant using the id since api level 2 11 see also constant field values wallet_user_id public static final string wallet_user_id key to represent user's wallet id since api level 1 2 see also constant field values device_id public static final string device_id key to represent unique device id since api level 1 2 see also constant field values wallet_dm_id public static final string wallet_dm_id key to represent unique device management id since api level 1 2 see also constant field values partner_service_type public static final string partner_service_type key to represent unique service type this key must be set in the bundle for partnerinfo string, bundle since api level 1 4 see also constant field values common_status_table public static final string common_status_table this table shows the status codes used commonly status bundle keys bundle values spay_not_supported 0 extra_error_reason error_device_not_samsung -350 error_spay_pkg_not_found -351 error_spay_sdk_service_not_available -352 error_device_integrity_check_fail -353 error_spay_app_integrity_check_fail -360 error_android_platform_check_fail -361 spay_not_ready 1 extra_error_reason error_spay_setup_not_completed -356 error_spay_app_need_to_update -357 error_spay_internal -1 extra_error_reason error_server_internal -311 n/a n/a error_not_allowed -6 extra_error_reason error_invalid_parameter -12 error_sdk_not_supported_for_this_region -300 error_service_id_invalid -301 error_service_unavailable_for_this_region -302 error_partner_app_signature_mismatch -303 error_partner_app_version_not_supported -304 error_partner_app_blocked -305 error_user_not_registered_for_debug -306 error_service_not_approved_for_release -307 error_partner_not_approved -308 error_unauthorized_request_type -309 error_expired_or_invalid_debug_key -310 error_missing_information -354 error_unable_to_verify_caller -359 error_invalid_parameter -12 n/a n/a error_no_network -21 n/a n/a error_server_no_response -22 n/a n/a error_partner_info_invalid -99 extra_error_reason error_partner_sdk_api_level -10 error_partner_service_type -11 error_partner_sdk_version_not_allowed -358 error_initiation_fail -103 n/a n/a spay_not_allowed_temporally 3 extra_error_reason error_spay_connected_with_external_display -605 error_spay_fmm_lock -604 n/a n/a paymentmanager error_making_sheet_failed -115 n/a n/a see also constant field values method details getversioncode public static int getversioncode returns the version code of the samsung pay sdk returns sdk version code since api level 1 1 getversionname public static string getversionname returns the version name of the samsung pay sdk returns sdk version name since api level 1 1 samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
Develop Samsung Pay
apioverview package class tree index help package com samsung android sdk samsungpay v2 payment interface paymentmanager customsheettransactioninfolistener enclosing class paymentmanager public 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 paymentmanager startinapppaywithcustomsheet customsheetpaymentinfo, customsheettransactioninfolistener api is called caution amountboxcontrol must be returned in oncardinfoupdated on sheetupdatedlistener to remove progress bar on custom payment sheet private final paymentmanager customsheettransactioninfolistener mtransactionlistener2 = new paymentmanager customsheettransactioninfolistener { @override public void oncardinfoupdated cardinfo selectedcardinfo, customsheet sheet { // update amount if needs double upateditem = 3000; // update amountboxcontrol amountboxcontrol amountboxcontrol = amountboxcontrol sheet getsheetcontrol "id_amount" ; double item = upateditem; double tax = amountboxcontrol getvalue "id_tax" ; double shipping = amountboxcontrol getvalue "id_shipping" ; double total = item + tax + shipping; amountboxcontrol updatevalue "id_item", item ; amountboxcontrol updatevalue "id_tax", tax ; amountboxcontrol setamounttotal total, amountconstants format_total_price_only ; sheet updatecontrol amountboxcontrol ; // call updatesheet api method with amountboxcontrol this is mandatory paymentmanager updatesheet sheet ; } @override public void onsuccess customsheetpaymentinfo response, string paymentcredential, bundle extrapaymentdata { log d tag, "transaction succeeded" ; } @override public void onfailure int errorcode, bundle errordata { log d tag, "transaction failed" + errorcode + "/" + errordata ; } } since api level 1 3 see also paymentmanager startinapppaywithcustomsheet customsheetpaymentinfo, customsheettransactioninfolistener method summary all methodsinstance methodsabstract methods modifier and type method description void oncardinfoupdated cardinfo selectedcardinfo, customsheet sheet this callback is received when the user changes card on the custom payment sheet in samsung pay in this callback, updatesheet method must be called to update current payment sheet void onfailure int errcode, android os bundle errordata this callback is received when the online payment transaction has failed void onsuccess customsheetpaymentinfo customsheetpaymentinfo, string paymentcredential, android os bundle extrapaymentdata this callback is received when the online in-app payment transaction is approved by user and able to successfully generate in-app payload method details oncardinfoupdated void oncardinfoupdated cardinfo selectedcardinfo, customsheet sheet this callback is received when the user changes card on the custom payment sheet in samsung pay in this callback, updatesheet method must be called to update current payment sheet parameters selectedcardinfo - currently selected card's information since api level 1 3 see also paymentmanager updatesheet customsheet paymentmanager updatesheet customsheet, int, string onsuccess void onsuccess customsheetpaymentinfo customsheetpaymentinfo, string paymentcredential, android os bundle extrapaymentdata this callback is received when the online in-app payment transaction is approved by user and able to successfully generate in-app payload the payload could be an encrypted cryptogram direct in-app payment or payment gateway's token reference id indirect in-app payment parameters customsheetpaymentinfo - online payment information from samsung pay since api level 1 5, spaysdk extra_last4_fpan and spaysdk extra_last4_dpan of the card which was used for the current transaction is included in cardinfo paymentcredential - payment credentials example cryptogram, aid direct in-app payment , or tokenrefid indirect in-app payment extrapaymentdata - additional payment credentials if any since api level 1 3 onfailure void onfailure int errcode, android os bundle errordata this callback is received when the online payment transaction has failed parameters errcode - the result code of error cause errordata - extra error message data, if any, provided by samsung pay note please refer spaysdk common_status_table in detail since api level 1 3 samsung electronics samsung pay sdk 2 19 00 - jun 12 2024
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 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, 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 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 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 android os bundle cardfilter, 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 19 00 - jun 12 2024
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.