Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
tutorials mobile
blogare you a company looking to enhance your users' experience by allowing them to add digital content such as tickets, coupons, or boarding passes to samsung wallet? or perhaps you're an online merchant interested in integrating samsung pay as a secure payment option for your customers? look no further! the samsung wallet partner portal is the perfect solution for your needs. the samsung wallet partner portal is a dedicated platform designed for companies who wish to collaborate with samsung wallet. by becoming a partner, you'll gain access to a wide range of services and resources that will enable you to seamlessly integrate your digital content or payment systems with samsung wallet. how to become a partner to become a partner and start collaborating with samsung wallet, simply visit the samsung wallet partner portal and follow the onboarding process. once registered, you'll gain access to the portal's features and resources, allowing you to start integrating your digital content. to help you better understand the partner portal onboarding process and usage, we've prepared a tutorial video for you: notethe tutorial video also has a helpful guide for online merchants interested in integrating secure samsung pay functionalities into their mobile app or website. don't miss out on new business opportunities by joining the samsung wallet partner portal now! if you have any further questions, submit a support request or join the forum. for more information, please refer to the following resources: samsung wallet for partner samsung pay for partner
tutorials
blogintroduction smartphones have become an essential part of our everyday lives. users are continually searching for more convenient ways to perform their tasks on their smartphones, driving them toward services with greater usability. as smartphones advance, our lives become simpler. galaxy users have completely embraced the convenience of paying with samsung pay, and no longer carry physical payment cards. this led to the evolution of samsung pay into samsung wallet, incorporating biometric-authentication-based security solutions and adding various features to replace conventional wallets. since june 2022, samsung wallet has been expanding its service area based on the existing samsung pay launching countries. this article aims to introduce samsung wallet and guide you through the integration process of the "add to samsung wallet" feature, which allows you to digitize various content and offer them as wallet cards. notice this article introduces non-payment service cards. if you want to learn more about the payment service of samsung wallet, visit the samsung pay page. you can get information on online payment services such as in-app payments, web checkout, and w3c payments. add to samsung wallet service let's delve deeper into the "add to samsung wallet" feature. digitized content registered in samsung wallet comes in the form of cards called wallet cards. registering a wallet card is effortless: simply click the "add to samsung wallet" button, and the card is stored securely on users’ galaxy smartphones. "add to samsung wallet" button and wallet card notice the benefits of using wallet cards can be found in the commercial video forgetting can be awesome. wallet cards the "add to samsung wallet" service is an open platform that supports offering various types of content such as wallet cards. we are streamlining service integration with content providers across different regions and adding useful features. boarding pass event ticket loyalty gift card coupon id card generic card pay as you go (in progress) reservation (in progress) digital key (in progress) notice generic card supports unstructured forms of cards. be a samsung wallet partner partner onboarding to begin offering content through samsung wallet, you must first register as a partner on the samsung wallet partner portal. the integration process is detailed on the samsung developer portal. to join the samsung wallet partner portal, create a samsung account that is used as the service administrator. wallet card management once enrolled, you can create service cards on the wallet cards menu. each card is assigned a card id representing the service, and you can set the card type and linking information. you can manage cards according to their status – test or live. configuring wallet card notice after completing all required forms for the wallet card, click the launch button to request card activation. before providing the service to actual users, remember to turn off the 'test mode.' how to safely secure user data key generation and certificate request the registration process includes certificate exchange to securely transmit service data. refer to the diagram and developer guide, security key & certificate creation guide, to complete the certificate registration and partner enrollment smoothly. certificates exchange process ensuring data security to prevent forgery and leakage of user card data, secure tokenization processing is required. json web token (jwt), which includes encryption and signature, has a validity time basis for verification, thus providing enhanced security. in particular, when generating this token, the key and certificate previously obtained through the certificate exchange process are used. process of generating and verifying security tokens notice depending on how partners provide content services to users, you can choose how to deliver data to the samsung wallet service. two ways to transfer wallet card data add to samsung wallet interface provides two methods for partners to deliver users digital content as wallet cards. data transmit link the general way to transfer wallet card data is to organize tokenized data in the link attached to the button, and the card data is transmitted to the samsung wallet service when the user clicks the button. as long as samsung wallet support is confirmed, you can generate a link containing the user's card data and configure the "add to samsung wallet" button to run the link when pressed, either on an application or web page. data transmit process data fetch link another method to transfer wallet card data is to include only the refid, which represents the user's content, in the "add to samsung wallet" link and transmit it to the samsung wallet service. when a user clicks the "add to samsung wallet" button, samsung servers refer to the get card data api information set on the wallet card and retrieve user content using the received refid to complete registration. data fetch process this method is suitable for providing user's data through email or mms messages where static links cannot be avoided. there is an option to secure these static links. data fetch process for static links setting up data synchronization on the partner portal, you can set up the wallet card information and configure the server interaction api that the content provider needs to prepare. this api is an interface for managing card registrations, deletions, information, and state changes to sync with those registered on samsung wallet. register wallet cards when a user card is added to samsung wallet, samsung wallet servers use the send card state api to communicate card registration and deletion status to the content provider, allowing them to manage content that needs to be synchronized with samsung wallet. when a wallet card is registered, added event is sent to the partner's server update wallet cards changes to the synchronization target content can be notified to the samsung wallet service through the update notification api. here, the value that distinguishes each piece of content is the refid that the partner must provide when registering the users’ wallet card. through the get card data api, samsung wallet servers can check the latest content information any time. if updates occur on the partner's side, updated event notifications should be sent to the samsung server in case users withdraw content from the partner's side in case users delete cards from samsung wallet notice both servers should verify requests using the authorization header of the api request. this authorization token is in jwt format, familiar from card data security. effortless wallet card registration with just one click this feature is primarily composed of a link-connected button and can be provided through the content provider's application, web page, email, or mms message. various service channels javascript library for web developers we provide a javascript library and a user guide, implement the button, to help integrate your web pages. creating buttons and links in your app for configuring buttons in applications, utilize the button image resources. providing services via mms, email, or qr codes to provide services through fixed links, check out the details of the data fetch link. these static links can also be used by scanning qr codes. experience the service and practice you can experience service integration development using the codelab and use the testing tool to preregister the wallet cards created on the partner portal, which could be helpful. conclusion we've looked at how to provide digital content through the "add to samsung wallet" feature. we continuously update the guides on the developer portal, so please refer to them when preparing for integration. summary the "add to samsung wallet" service welcomes participation from content service partners and developers. for inquiries or technical support, please contact us through the form provided on the developer portal. i hope this post has been helpful, and now i'll conclude my writing here. thank you. this post was written based on the sdc23 korea session.
Choi, Jonghwa
Develop Samsung Pay
webdo more with your money. join samsung pay partners and integrate secure samsung pay functionalities into your mobile app or website. get started together with new partner you can now create and publish content such as coupons, boarding pass or tickets to the users of samsung pay. this is enabled by a two-step process where you onboarding on our partner portal. where can pay be used in-app payments the samsung pay sdk with its api library offers a quick and easy way to enable secure, one-touch payments in your app using your existing payment infrastructure. once you integrate the sdk within your app's payment. web checkout samsung pay web checkout is an online payment method accessed from a web browser, pc-based or mobile, with authentication performed by samsung pay on the user's samsung device. initiated from a merchant web page, web checkout leverages samsung pay's in- app solution. w3c payment merchant websites can now use samsung pay by adhering to the w3c payment request standard. this reduces merchant checkout friction and card abandonment; enables a more advanced and secure mobile pay method. discover available gateways/platforms supporting samsung pay worldpay view more adyen view more fiserv view more cybersource view more gateway view more how to design samsung pay we encourage you to learn and follow the rules and guidelinessuggested to ensure message consistency and drive brand awareness. learn more news and blogs learn more tutorials mobile may 29, 2024 navigating pitfalls in samsung pay sdk integration practical insights and best practices for integrating the samsung pay sdk ummey habiba bristy may 29, 2024 tutorials mobile oct 24, 2023 payment card push provisioning using samsung pay sdk partner with samsung to start integrating push provisioning and samsung pay in your app. yasin hosain oct 24, 2023 how can we help you? faq search frequently asked questions by keywords. join the forum visit the forum to ask questions and exchange ideas with other developers. get support submit a 1:1 support request and receive a response within 2 business days.
Develop Samsung Pay
docbecome a member to become a samsung pay partner, firstly you need to sign up to the samsung pay portal and then register your membership sign up/sign in to sign up as a samsung pay partner and request access to the samsung pay developers site, do the following in your browser, go to samsung pay developers if you already have a samsung account, click log in otherwise, click sign up and create an account a company business email address that won't change over time is recommended as the primary samsung account user id for managing your portal projects agree to the site's terms and conditions and acknowledge that you understand the samsung pay partners privacy policy, then click create a samsung account fill out the onscreen account creation form, making sure to correctly type the security code, then click continue click sign up, enter your samsung account id email address and password, then click sign in look in your email inbox for a welcome message with an account activation link and click the link this opens the developers site registration page complete the company and user profile described in the next step to become a registered samsung pay developer partner register your membership while becoming a member of the samsung pay developer community, you need to provide some information about your company - contact information, type of business, size, etc this information is entered into a company and user profile, which you can subsequently update as changes occur if you are the first one in your company to join samsung pay developers, you will be the principal contact as such, you will be given permissions to manage projects and invite others in your company to collaborate if you are an invited co-worker, you'll need your company's partner id to register follow these steps to register if you are the first samsung pay member of your company to register, select the first option "i am the first samsung pay member of my company" if you were given a samsung pay partner id by a co-worker, select the second option "my company is already registered" and enter your company's partner id in the field provided click next complete the company information form and agree to the terms and conditions of use, then click save and next if you cannot complete the profile at this time, click skip and verify later complete the user information form, then click done; or, if you cannot provide the information at this time, click skip and verify later upon review of the information provided, your samsung pay relationship manager rm may request additional details once your membership registration is approved, you'll be granted access to currently restricted areas of the samsung pay portal and you can invite members of your team to collaborate on your samsung pay projects until then, take advantage of valuable resources like the samsung pay sdk and sdk programming guide from the following link android sdk [in-app payment and push provisioning] https //developer samsung com/pay/native/sdk-overview html web checkout sdk https //developer samsung com/pay/web/overview html w3c mobile payment https //developer samsung com/internet/android/web-payments-integration-guide html when you receive the email notifying you of membership approval, you're ready to get started in your browser, return to the samsung pay portal and sign in set up your partner project when you integrate your project with samsung pay, it is important to have a clear understanding of what is involved for starters, consider the difference between apps and services app an app can be your issuer app or merchant app service a service is a combination of your app, its service type, a csr and a service id your app will pass these information to samsung wallet for partnership verification you can create different service for the same package for multiple purpose testing note that,only one application can be added under one service id for example app deployment scenario unique service-app combinations global issuer app using a different csr encryption key for services in different regions to interact with local servers service 1 = com issuer walletapp, csr1_us service 2 = com issuer walletapp, csr2_plcc_abcmart same issuer app for all customers but different csrs for managing different card services b2b vs plcc service 1 = com issuer walletapp, csr1_regular service 2 = com issuer walletapp, csr2_plcc_abcmart multiple merchant apps using the same pg service 1 = com merchant electronicsapp, csr_pg1 service 2 = com merchant groceryapp, csr_pg1 global merchant app using a different pg for each country service 1 = com merchant electronicsapp, csr_pg1 service 2 = com merchant electronicsapp, csr_pg2 multiple web sites using the same pg service 1 = electronicssite merchant com, csr_pg1 service 2 = grocerysite merchant com, crs_pg1 global merchant web site using a different pg for each country service 1 = electronicsapp merchant com, csr_pg1 service 2 = electronicsapp merchant com, csr_pg2 create new service to create a new service follow the below steps go to my projects > service management or click services management in the navigation panel on the left, then click create new service select for test or for release to define the service for integration with samsung pay, then click next note that, samsung pay will verify all services requested only for release purpose this is to ensure all samsung pay features are functioning correctly and follows samsung pay guideline select your desired service type web online payment service w3c mobile web payments in-app online payment service app to app card enrollment click save and next web online payment service enter the new service name select your service country select your payment gateway from the list of supported payment gateways if your payment gateway uses the network token mode, upload the certificate signing request csr you obtained from your pg supported formats are csr or pem contact your pg for details confirm your agreement with the portal's terms and conditions click the link to read and print , then click done thus, you have completed service configuration for web online payment w3c mobile web payments service enter the new service name select your service country select your payment gateway from the list of supported payment gateways if your payment gateway uses the network token mode, upload the certificate signing request csr you obtained from your pg supported formats are csr or pem contact your pg for details enter the payment domain name s for your website in the service domain field and click add for example, if your domain is mywebstore com but the checkout page is hosted on the subdomain payments mywebstore com, you will need to enter payments mywebstore com as the service domain in the portal for each additional domain name, click add confirm your agreement with the portal's terms and conditions click the link to read and print , then click done thus, you have completed service configuration for w3c mobile web payments in-app online payment service enter the new service name select your service country select your payment gateway from the list of supported payment gateways drag and drop the csr you share with your payment gateway in the box provided or click the paperclip to browse confirm your agreement with the portal's terms and conditions click the link to read and print , then click save and next app to app card enrollment service enter the new service name select your service country add issuer names these correspond to your financial institution/bank's name s registered with the card networks be sure to click the add button after each entry note that, the issuer name on the samsung pay portal and the actual issuer name of the card must match if you cannot confirm the actual issuer name of the card, just add your card to samsung wallet app and see its details information open wallet app > tap on the card > three-dot menu > customer services option under the title you will find the issuer name confirm your agreement with the portal's terms and conditions click the link to read and print , then click save and next for android sdk in-app online payment service and push provisioning service , you have to go through two additional steps- providing app information and setting test environment providing app information if you have already registered an app following register a partner app for android sdk section, select i already registered app information then select the desired app name from the app list you can add a new app on the fly by selecting i will upload new app information click next setting test environment now enter up to 30 test accounts comma-separated these are samsung accounts associated with a registered samsung pay app on a supported device you can always edit the service later to add or delete test accounts click done to save the service configuration and see it listed in your service management dashboard register a partner app for android sdk go to my projects > app management in the navigation panel on the left, then click add new app enter the app name enter its package name to specifically identify this app enter an app description optional; helpful for version control upload the apk file by dragging and dropping it in the corresponding box click the paperclip icon to browse upload representative screenshots showing ui branding elements/buttons in a supported format png, jpeg, gif indicating samsung pay as a supported payment option in your app steps 5 and 6 are required for release versions of your app; not required for initial integration testing click create, then click next at the bottom of the plug-in configuration page your newly added app is now listed in your app management dashboard you can view its details by clicking its app name then, on the app details page, you can edit the app name and description by clicking the corresponding pencil icon
Develop Samsung Internet
docweb payments integration guide overview to help standardize and streamline how payments are done on the web, the worldwide web consortium w3c has introduced a payment request api to provide an interface between a merchant web page and a mobile payment app, like samsung pay, to facilitate payment transactions samsung internet browser leverages the w3c payment request api to support samsung pay as a payment method for web purchases chrome also supports a samsung pay web payment method why integrate samsung pay into your website? samsung pay is accepted at more retail locations than any other mobile payment service available because of its unique ability to transact with newer nfc-supported payment terminals and legacy payment terminals it continues to enjoy the best user reviews among mobile payment apps now available for mobile website integration, samsung pay is secure, easy to set up, simple to use, and pre-installed on all new samsung galaxy-class smartphones when integrated with your website, samsung pay presents your users with a common checkout process that leverages samsung pay’s secure purchase authentication technology, eliminating manual entry or re-entry of card details and shipping destinations checkout is streamlined, conversions are maximized, and the exposure of sensitive data is kept to the absolute minimum simplifying the transaction process the benefits of the new process, certainly from an end-user perspective, is that the previous tedium ― request, authorization, payment, and result ― can now be handled in a single step for the web developer, it entails a single javascript api call for samsung pay users, there’s no change at all in the way a payment card is selected and authenticated after selecting the desired merchandise from the merchant’s web site, the user initiates checkout, selects samsung pay as the preferred payment method, authenticates with a fingerprint or pin, and voila ― payment complete that’s the user experience at its most basic when properly implemented, the api also supports editing the billing/shipping address in samsung pay and selecting a different enrolled card before approving the transaction with a fingerprint scan or entering a pin in terms of convenience, it’s a remote shopper’s dream ― no complicated, input-intensive forms to fill out, no fumbling for a plastic card to enter the account number, card expiration, and security code, and no worrying that someone other than the legitimate cardholder is attempting to make the payment meanwhile, samsung pay’s tokenized payload securely protects the transaction from intercept and replay attacks about this guide intended for web developers with a working knowledge of javascript and json, this guide takes you through the complete process of onboarding as a samsung pay merchant partner, creating/registering the w3c service for your domain, adding the w3c payment request object to your website, then testing and releasing your merchant website offering samsung pay as a payment method let's get started determining your gateway integration mode the api methods for integrating samsung pay with your website depend on the type of payment token your payment gateway pg handles — either gateway tokens or network tokens samsung pay supports requests for both types for instance, if stripe is your pg, you will want to request a gateway token from samsung pay on the other hand, if you’re using first data, you’ll want to request an encrypted network token bundle, for which you handle the token decryption yourself or work with the pg first data in this case to handle decrypting the token bundle the process begins when your merchant website makes a payment request and passes all required information to the browser, which then determines compatibility between the accepted payment methods for your website and the methods apps installed on the target device let’s take a brief look at how each integration mode — gateway token and network token — works with samsung pay gateway token mode although samsung pay doesn’t process the payment, your merchant website will still need to invoke the appropriate payment gateway apis to charge and process the token returned by your pg hence, when samsung pay returns a gateway token from stripe, for example, the recommended flow looks like this user selects samsung pay as the payment method at checkout in the merchant's website and the samsung pay app requests partner verification from the samsung pay online payment server encrypted payment information and the partner id are passed to the samsung-pg interface server samsung-pg interface server sends a transaction authorization request to the pg on behalf of the merchant; pg authenticates the partner id before generating a transaction reference id samsung-pg interface server returns the payment token to the pg i e , the gateway token it received from the samsung pay app in step 2 pg continues payment processing with the acquirer and payment network the result approved/declined is returned to the merchant website on the device for display to the user in this mode, samsung pay makes a call to your pg on your behalf and returns a chargeable gateway token network token mode under network token mode, the samsung pay api returns an encrypted network token bundle, which you can then either decrypt yourself or leverage the apis of your pg first data, for example to handle decryption and charge the token user selects samsung pay as the payment method at checkout in the merchant's website and the samsung pay app requests partner verification from the samsung pay online payment server encrypted payment information is passed from the samsung pay app to the pg through the merchant app via the pg sdk applying the merchant's private key, pg decrypts the payment information structure and processes the payment through the acquirer and payment network upon receiving authorization or rejection, pg notifies the merchant website through its pg sdk to simplify integration of network tokens, you can pass the encrypted payload directly to your pg and let it handle decryption in general, decrypting the payload yourself is more complex and involves private key management see your particular pg’s documentation for details once you determine which mode your pg supports, you're ready to register with the portal first, however, there are a number of prerequisites you'll need to satisfy prerequisites registering with the samsung pay developers portal and adapting the appropriate payment request apis for your website in accordance with the guidance contained herein will help to ensure a successful implementation to that end, the following requirements apply release contents minimum samsung pay app version 2 8 xx minimum samsung internet browser version 5 4 minimum chrome browser version 61 supported device models samsung galaxy-class smartphones running minimum version of the wallet app and browser supported payment gateways pgs view the most current list in the portal's payment gateway drop-down menu in service create/edit mode see step 5 under registering your domain for the w3c service registering with the portal through the samsung pay developers portal you can access valuable resources to help you manage the samsung pay features you incorporate into you partner app, including the ability to create multiple samsung pay service groups so you can use different services without the need to create multiple accounts invite co-workers to the portal to help you manage samsung pay features for your website register your website with samsung pay configure your samsung pay w3c service s to create a member account on the samsung pay developers portal open a browser like chrome, go to https //pay samsung com/developers, click sign up and confirm/acknowledge that you accept the samsung pay terms and conditions and understand the privacy policy, then do one of the following a if you already have a valid samsung account, click sign up and enter your samsung account id and password b if you do not have a samsung account, click create a samsung account to create one open the account activation email you receive and click the account activation link if you’re the first samsung pay member of your company to register, select the first option, click next, and complete a company and user profile if, on the other hand, you were given a samsung pay partner id by a co-worker, select the second option — my company is already registered — and enter your company’s partner id in the field provided, then click next after you receive notification by email that your membership is approved, typically within 2 business days, return to https //pay samsung com/developers, click sign in and enter your samsung account id and password for site access as a new member registering your domain for the w3c service your domain is the url associated with your website, whether in test or production the service type specifically associates w3c with your domain once you create the service, you will be prompted to configure the domain you want associated with it to create a new service go to my projects > service management and click create a new service select for test to define the service for initial integration with samsung pay, then click next select w3c mobile web payments as the service type and click next enter a service name and select “united states” as the service country select a payment gateway from the list of supported pgs if your payment gateway uses the network token mode, upload the certificate signing request csr you obtained from your pg supported formats are csr or pem contact your pg for details otherwise, key management is already established for pgs supporting samsung pay’s gateway token mode; hence, click connect with to create a new service connection with the pg and click ok enter the payment domain name s for your website in the service domain field and click add for example, if your domain is mywebstore com but the checkout page is hosted on the subdomain payments mywebstore com, you’ll need to enter payments mywebstore com as the service domain in the portal for each additional domain name, click add notewhen entering the domain name on the portal, do not include an https // prefix confirm your agreement with the terms and conditions, then click next adding w3c payment requests objects to your website in order to accept payments from samsung pay, your website must adhere to the w3c payment request api specification you can get started with the basics by completing the steps that follow and making the appropriate substitutions for your website step 1 feature detect prior making a w3c payment request, it’s wise to run a feature detect to ensure the browser in use supports the w3c payment request api if not, you should fall back to your traditional/normal checkout page example if window paymentrequest { // use payment request api } else { // fallback to traditional checkout window location href = ‘/checkout/traditional’; } step 2 create the paymentrequest constructor the first step is to create a paymentrequest object by calling the paymentrequest constructor, which has the following parameters methoddata – contains a list of payment methods that the website supports e g , visa, amex, samsung pay details – contains information about the shopping cart purchases e g , total, tax, fees, etc options – details pertaining to shipping address, user contact information, etc example var request = new paymentrequest methoddata, // required payment method data details, // required information about transaction options // optional parameter for things like shipping, etc ; step 3 add samsung pay to the methoddata parameter the methoddata parameter contains a list of payment methods supported by the merchant to support samsung pay, you’ll need to add it as a supported payment method notebasic-card is an optional supportedmethod for credit and debit cards saved in the browser, the card details of which are returned directly to the website from the browser before configuring this method, make sure your website and pg can handle generic payment information received from the browser and process with required pci compliance, if applicable see the [w3c basic card payment specification][7] for additional details be aware, however, that if you intend to support a branded samsung pay button, only samsung pay can be enabled as a payment method within the paymentrequest object; basic-card or any other payment method cannot be included if you already offer a generic payment request method, you can continue to do so — and include samsung pay as a payment method within that paymentrequest object from a user experience standpoint, the two distinct pathways look like this standard w3c implementation a standard w3c implementation adds samsung pay to your standard paymentrequest object as one of many supportedmethods available for user selection tapping checkout or its equivalent launches the standard browser payment sheet for user selection of the payment method and/or to add a debit/credit card to the list of options selecting samsung pay as the payment method and tapping pay launches the samsung pay payment sheet branded samsung pay implementation a branded implementation displays a "buy with samsung pay" button in place of your standard checkout button tapping the button will skip directly to the samsung pay payment sheet for authentication unless you specify paymentoptions if paymentoptions is not null, the browser payment sheet is launched see paymentoptions in step 7 for additional guidance first launching your website's checkout page is recommended for branded implementations this is because the samsung pay payment sheet only provides the user's billing address, which means your website will need to capture the user's preferred shipping address, where applicable for physical delivery of purchased goods if no shipping address and/or other options are needed, set the paymentoptions parameter to null as mentioned above, if you populate paymentoptions, the browser payment sheet is automatically launched keeping the foregoing implementations in mind, let's look at how to construct the methoddata argument for the network token mode and gateway token mode, respectively the fields in methoddata comprise supportedmethods – required; specifies https //spay samsung com/ i e , the samsung pay app and other methods suppored by your website data – values specific to the method; for samsung pay, these include version specifies the data structure being used by the merchant; should always be set to 1 until further notice required productid the service id obtained from the samsung pay partner portal required for partner verification; see step #8 under registering your domain for the w3c service merchantgatewayparameter this is the userid value registered with your pg required for gateway token mode in addition, userid should be set in the request parameter for mada token if a merchan request mada token, this field is mandatory as this filed should be included in the payload for mada token, there is a 15-character length limit paymentprotocol defaults to “protocol_3ds,” the only protocol currently supported by samsung pay optional allowedcardnetworks specifies the card brands/networks accepted by the merchant and supported by the pg required merchantname the name of the merchant to be displayed on the payment sheet; must be identical to the merchant name registered on the samsung pay partner portal required ordernumber unique value for merchant use as an external reference id optional isrecurring specifies transaction on subscription basis optional; default = false billingaddressrequired determines if a billing address must be filled-in by the user optional; default = false shown next are examples of the methoddata parameter for each of the supported token modes please note that samsung pay's w3c support for card brands is currently limited to mastercard, visa and american express discover is scheduled for support soon example – network token mode var methoddata = [ { supportedmethods ['https //spay samsung com'], data { 'version' '1', // always 1 until further notice 'productid' '2bc3e6da781e4e458b18bc', // service id from partner portal 'allowedcardnetworks' ['mastercard','visa'], 'merchantname' 'shop samsung demo ', // merchantname must be identical to merchant name on portal 'ordernumber' '1233123', } }] example – gateway token mode var methoddata = [ { supportedmethods ['https //spay samsung com'], data { 'version' '1', // always 1 until further notice 'productid' '7qr7h9ws1872bc3e6da781', // service id from partner portal 'merchantgatewayparameter' {"userid" "acct_ 17irf7f6ypzj7wor"}, 'allowedcardnetworks' ['mastercard','visa'], 'merchantname' 'shop samsung demo ', //merchantname must be identical with merchant name on portal 'ordernumber' '1233123', } }] step 4 fill out the transaction details parameter the details parameter contains information about the transaction there are two major components a total, which reflects the total amount and currency to be charged, and an optional set of displayitems that indicate how the final amount was calculated this parameter is not intended to be a line-item list, but is rather a summary of the order’s major components subtotal, discounts, tax, shipping costs, etc example var details = { displayitems [ { label "total of all items", amount { currency "usd", value "65 00" }, // us$65 00 }, { label "friends & family discount", amount { currency "usd", value "-10 00" }, // -us$10 00 pending true // the price is not yet determined } ], total { label "total", amount { currency "usd", value "55 00" }, // us$55 00 } } step 5 check eligibility to display samsung pay button if you do not support basic-card and you try to call show in step 6 when samsung pay or any other supportedmethod is not present on the device, the returned promise will reject with the following error domexception the payment method is not supported you can, however, check beforehand to see if the user has an available/supported method set up this is done with the canmakepayment method, which tells you whether the user has a payment method that can fulfill the current payment request example – canmakepayment const paymentrequest = new paymentrequest supportedpaymentmethods, transactiondetails, options ; // if canmakepayment isn’t available, default to assume the method is supported const canmakepaymentpromise = promise resolve true ; // feature detect canmakepayment if request canmakepayment { canmakepaymentpromise = paymentrequest canmakepayment ; } canmakepaymentpromise then result => { if !result { // the user does not have a supported payment method // todo redirect to traditional checkout flow return; } // todo the user has a payment - call show } catch err => { // todo either fall back to traditional checkout or call show } ; notebranded samsung pay buttons can be found on the [samsung pay developers][8] portal under the resources tab direct cdn links will be available soon step 6 call the show method to display the payment sheet the payment sheet can be activated by calling its show method this method invokes the browser’s native ui so the user can examine the details of the purchase, add or change the information, and submit it for payment a promise, indicated by its then method and callback function, resolves what will be returned when the user accepts or rejects the payment request example – show request show then function paymentresponse { // process paymentresponse here paymentresponse complete "success" ; } catch function err { console error "uh oh, something bad happened", err message ; } ; step 7 handle the paymentresponse once the user approves the payment request by verifying the payment option and shipping option if provided , the show method’s promise resolves, resulting in a paymentresponse object comprised of the following fields methodname string indicating the chose payment method e g , visa details dictionary containing information for methodname shippingaddress shipping address of the user, if requested shippingoption id of the selected shipping option, if requested payeremail email address of the payer, if requested payerphone telephone number of the payer, if requested payername name of the payer, if requested here, it’s important to remember that the response from the payment request api must be submitted by the merchant in accordance with the pg’s integration model and apis in all cases, the samsung pay response is encapsulated within the paymentresponse details parameter, which comprises the following fields paymentcredential – contains the payment credential information necessary for processing the transaction with the pg in network token mode, this field includes 3ds data in gateway token mode, it includes token information network token mode type use “s” version 1 0 0; standard for payment authentication aka mastercard securecode, verified by visa, and american express safekey data encrypted payload value gateway token mode reference token id reference status authorized or rejected/declined billingaddress – contains the billing address and related attributes for the cardholder, possibly including country [iso3166] alpha-2 code; canonical form is upper case for example, “us” addressline[n] most specific part of the address; can include a street name, a house number, apartment number, a rural delivery route, descriptive instructions, or a post office box number region top level administrative subdivision of the country; can be a state, a province, an oblast, or a prefecture city city/town portion of the address dependentlocality dependent locality or sub-locality within a city; fused for neighborhoods, boroughs, districts, or uk dependent localities postalcode postal code or zip code, also known as pin code in india sortingcode bank sorting code; for example, in the british and irish banking industries, the sort code is a six-digit number, is usually formatted as three pairs of numbers, for example 12-34-56, identifying both the bank and the branch where the account is held languagecode [bcp47] language tag for the address, in canonical form; used to determine the field separators and the order of fields when formatting the address for display organization organization, firm, company, or institution at this address recipient name of the recipient or contact person this member may, under certain circumstances, contain multiline information; for example, it might contain “care of” information phone telephone number of the recipient or contact person paymentinfo – contains the payment information, including card_last4digits last four digits of the card’s dpan cardbrand currently, either mastercard or visa ordernumber merchant’s unique external reference id supplied in the original request’s methoddata parameter if the user pays with a credit card using the basic-card method, then the details response returned directly to your website from the browser will contain cardholdername, cardnumber, expirymonth, expiryyear, cardsecuritycode, billingaddress example request show then paymentresponse => { var paymentdata = { // payment method string, e g “amex” method paymentresponse methodname, // payment details contains payment information details paymentresponse details /* request details depends on pg token mode network - e g , first data; or gateway - e g , stripe ---------------------------------------------------------|------------------------------------------------------| * gateway token mode |* network token mode | * “details” { |* “details { | * “paymentcredential” { |* “method” “3ds”, | * “reference” “tok_1asceoyf6ypzj7f8se6grp0i”, |* “paymentcredential” { | * “status” “authorized” |* “type” “s”, | * }, |* “version” “100”, | * |* “data” “long_encrypted_payload_value”, | * |* }, | *--------------------------------------------------------|------------------------------------------------------| * “paymentinfo” { * “card_last4digits” “1489”, * “cardbrand” “mastercard”, * “ordernumber” “1233123”, * “billingaddress” { * “country” “usa”, * “addressline” [“chhccy”, “hdyxych”], * “region” “ca”, * “city” “mountain view”, * “dependentlocality” “”, * “postalcode” “94043”, * “sortingcode” “”, * “languagecode” “en”, * “organization” “”, * “recipient” “”, * “phone” “” * } * } * } * */ }; return fetch ‘/validatepayment’, { method ‘post’, headers { ‘content-type’ ‘application/json’ }, body json stringify paymentdata } then res => { if res status === 200 { return res json ; } else { throw ‘payment error’; } } then res => { paymentresponse complete “success” ; }, err => { paymentresponse complete “fail” ; } ; } catch err => { console error “error, something went wrong”, err message ; } ; once payment information is received from samsung pay, the website should submit the payment information to the merchant’s pg for transaction processing the ui will show a spinner while the request takes place when a response is received, the website should call complete to close the ui the website is then free to show an order complete or order confirmation page for user feedback as previously mentioned, you can simplify integration of network tokens by passing the encrypted payload directly to your pg and letting it handle decryption in all cases, how you handle a submitted network token depends on the payment gateway refer to your particular pg’s documentation for details paymentoptions is an optional parameter in thepaymentrequest constructor depending on your particular requirements, you may want additional information, such as the user’s shipping address for physical goods purchased and contact details for guest users paymentoptions currently comprises the following requestpayername true if payer name is required; otherwise, false requestpayeremail true if payer email address is required; otherwise, false requestpayerphone true if payer telephone number is required; otherwise, false requestshipping true if shipping address is required; otherwise, false shippingtype available label options “shipping/pickup/delivery” for indicating to user; solely for display purposes example var options = { requestpayeremail false, requestpayername true, requestpayerphone false, requestshipping true, shippingtype "delivery" } noteif any of the elements listed above are set to true, the browser payment sheet is launched; otherwise, the samsung pay payment sheet is displayed putting it all together let’s assemble the various code blocks into a prototype to demonstrate the w3c payment request api in action function onbuyclicked { const samsung_pay = 'https //spay samsung com'; if !window paymentrequest { // paymentrequest api is not available - forwarding to legacy form based experience location href = '/checkout'; } // setup var supportedinstruments = [{ supportedmethods [ samsung_pay ], // 'https //spay samsung com' data { "version" "1", "productid" "2bc3e6da781e4e458b18bc", //service id from partner portal "allowedcardnetworks" ['mastercard','visa'], "ordernumber" "1233123", "merchantname" "shop samsung demo ", //merchant name in partner portal "merchantgatewayparameter" {"userid" "acct_17irf7f6ypzj7wor"}, "isrecurring" false, "billingaddressrequired" false, "paymentprotocol" "protocol_3ds" } }]; var details = { displayitems [{ label 'original donation amount', amount { currency 'usd', value '65 00' } }, { label 'friends and family discount', amount { currency 'usd', value '-10 00' } }], total { label 'total due', amount { currency 'usd', value '55 00' } }; var options = { requestshipping true, requestpayeremail true, requestpayerphone true, requestpayername true }; // initialization var request = new paymentrequest supportedinstruments, details, options ; // when user selects a shipping address request addeventlistener 'shippingaddresschange', e => { e updatewith details, addr => { var shippingoption = { id '', label '', amount { currency ‘usd’, value ‘0 00’ }, selected true}; // shipping to us is supported if addr country === 'us' { shippingoption id = 'us'; shippingoption label = 'standard shipping in us'; shippingoption amount value = '0 00'; details total amount value = '55 00'; // shipping to jp is supported } else if addr country === 'jp' { shippingoption id = 'jp'; shippingoption label = 'international shipping'; shippingoption amount value = '10 00'; details total amount value = '65 00'; // shipping to elsewhere is unsupported } else { // empty array indicates rejection of the address details shippingoptions = []; return promise resolve details ; { // hardcoded for simplicity if details displayitems length === 2 { details displayitems[2] = shippingoption; } else { details displayitems push shippingoption ; } details shippingoptions = [shippingoption]; return promise resolve details ; } details, request shippingaddress ; } ; // when user selects a shipping option request addeventlistener 'shippingoptionchange', e => { e updatewith details => { // there should be only one option do nothing return promise resolve details ; } details ; } ; // show ui then continue with user payment info request show then result => { // post the result to the server return fetch '/pay', { method 'post', credentials ‘include’, headers { 'content-type' 'application/json' }, body json stringify result tojson } then res => { // only if successful if res status === 200 { return res json ; } else { throw 'failure'; } } then response => { // you should have received a json object if response success == true { return result complete 'success' ; } else { return result complete 'fail' ; } } then => { console log 'thank you!', result shippingaddress tojson , result methodname, result details tojson ; } catch => { return result complete 'fail' ; } ; } catch function err { console error 'uh oh, something bad happened ' + err message ; } ; } document queryselector '#start' addeventlistener 'click', onbuyclicked ; refer to the official w3c integration specs for additional details and definition testing once you have the code saved and loaded, you’re ready to test be sure to test your website or test domain on a device running samsung internet browser and with the samsung pay wallet app already set up and ready to go in accordance with the prerequisites cited above if you use a separate subdomain for your test environment, be sure to add it as an eligible service domain for the service you configured under registering your domain for the w3c service remember that any/all subdomains for production must also be added to the service, up to a maximum of 10 service domains again, please note that samsung pay’s webpay api currently supports mastercard and visa only support for american express and discover is under development and will be available soon be sure to test using the samsung internet and chrome mobile browser apps to test select samsung pay as the payment method by clicking on the branded samsung pay button branded implementations or the samsung pay radio button standard w3c implementations this should launch the samsung pay payment sheet authenticate payment validate your results end to end isolate issues in the log, debug, and test again contact your samsung pay rm to coordinate assistance with troubleshooting recommended test cases check if the samsung pay is available in the payment option on the website verify samsung pay logo on browser sheet verify order summary on the payment sheet verify “edit” and “pay” buttons on payment sheet verify purchased item in the summary verify the billing address on the payment sheet change the billing address try to change the card in payment sheet when only one card is enrolled in samsung pay try to change the card when multiple cards is enrolled in samsung pay verify the payment amount verify the payment options verify the payment completion screen verify merchant name on the payment sheet verify merchant domain name on the payments sheet verify “cancel” and “pay” buttons on browser sheet try to make payment with large amount larger than max allowed amount and verify the behavior make a payment using samsung pay with a card already added for the merchant’s website basic-card verify transaction notification after w3c purchase verify transaction notification after refund set payment options for shipping address and verify that browser payment sheet launches and captures shipping address input/changes by user verify that the shipping cost is updated based on a shipping address change and is reflected in the updated total amount release once your tests are successful and you are satisfied with the results, take the following steps to ready your integrated with samsung pay website for release go to the samsung pay developers portaland create a new release service sharing identical attributes with the service you successfully tested a click on service management, then click create new service b select for release pictured , then click next c select w3c mobile web payments as the service type, then click next d enter a "release" service name and select "united states" as the service country e select united states as the service country f select your payment gateway from the drop-down menu, then click connect with for gateway token mode or provide a valid csr for network token mode g enter your service domain and click add for each additional domain name, click add remember, when entering domain names on the portal, do not include a "https"//" prefix h confirm your agreement with the terms and conditions, then click next retrieve the service id from the service details page and enter copy-paste it into your website's methoddata object in place of the current testing service id when your service is approved by your samsung pay rm — as indicated in the status column of your service management dashboard — you're ready to release your integrated website to the public send queries concerning service package approval to webpayment@samsungpay com
Develop Samsung Pay
docoverview developers of merchant/issuer apps familiar with the android or javascript programming environment are the target audience for this guidance in accordance with the applicable samsung partner agreements, it covers the setup and use of the samsung pay sdk and services for purposes of integrating the samsung wallet app with partner apps developed by both merchants and payment card issuers for samsung devices and is intended for no other purpose the accompanying use cases and related code samples are simply meant to serve as representative examples and not as recommendations or requirements please be aware that certain samsung pay apk behavior may not be exactly the same in different countries due to regulatory restrictions in each one use the samsung and samsung pay documentation specific to the market you are working in and test your integrated project in accordance with the instructions given for that market/country samsung pay sdk the android sdk offers an easy-to-use api application programming interface that you may use to integrate payment functionality into your apps push provisioning, processing payment requests, obtaining payment data, and managing payment transactions are all services available through the api web checkout sdk online applications can use the straightforward and user-friendly interface provided by the samsung web checkout sdk to accept payments the sdk's adaptability enables web application developers to modify the checkout procedure to meet their own requirements save to pay provides integration interface for end users to provision payment cards from website into the samsung wallet app using desktop computer, tablet device or mobile minimal partner effort and a very straightforward integration interface are two design objectives of save to pay overall, the samsung pay offers developers strong and adaptable platforms to integrate payment functionality into their apps the samsung pay is a great option for developers who want to provide their users with a smooth payment experience inside of their apps because it supports a broad variety of payment methods, has a secure payment processing system, and is simple to use samsung pay integration life cycle integrating samsung pay to your application has following five steps step-1 register as a member to develop a samsung pay sdk service, merchants and issuers need to register for an account with samsung pay developers in order to create the appropriate service type for their applications here is the guide on becoming a member become a member step-2 configure your project configure your project by creating services and registering application in the samsung pay developers portal according to your chosen sdk create services https //pay samsung com/developers/tour/memberguide register apps https //pay samsung com/developers/tour/appsguide manage services and apps https //pay samsung com/developers/tour/svcnappsguide step-3 integrate with samsung pay follow the below guidelines for specific sdk integration process android sdk https //developer samsung com/pay/native/common-api html web checkout sdk https //developer samsung com/pay/web/overview html save to pay https //developer samsung com/pay/save2pay/overview html step -4 test and validate testing your application is critical to validating samsung pay push provisioning performance or samsung pay transaction performance this will ensure a positive user experience for your users and an effective business channel for your company in fact, the goal of testing is not merely to find errors but to fully understand the quality of the samsung pay integration step-5 release you need to get release version approval from samsung via samsung pay developers portal once you are approved, you can proceed to make your application live and monitor user satisfaction
tutorials mobile
blogsamsung has invested tremendous effort in the digital economy from the very beginning and continuously facilitates millions of people who use samsung wallet. samsung wallet is one of the most used digital wallets right now in the cashless industry. it is a medium that fuels up digital currency transactions by its ease-of-use and security. to support various businesses, samsung has developed the samsung pay sdk which allows you to use samsung wallet’s features effortlessly. the samsung pay android sdk consists of android-based apis to perform transactions using samsung wallet. it helps to implement simple payment solutions, which boost your businesses' growth to the next level. to understand the business and possibilities, visit the samsung pay sdk portal for more information. what is push provisioning? push provisioning is one of the major features of the samsung pay sdk. it allows an issuer bank to push the payment experience to a digital wallet. it simplifies the process of adding a payment card as it can be done with a single tap of a finger. the normal process is time consuming since it involves multiple steps, and the user needs to enter their card information. with push provisioning, the process is easier as it can be done with a single tap, and it's also secure because the process is performed from the issuer application. this tutorial demonstrates how to implement the push provisioning feature in an issuer application with the samsung pay sdk. figure 1: samsung pay push provisioning concept prerequisite to use the samsung pay sdk, you must be an official samsung partner. for information about the partnership process, see the samsung pay member guide. as a samsung pay sdk partner, you can utilize this tutorial while implementing push provisioning. sdk integration to download the samsung pay sdk, go to samsung developers portal > samsung pay > download . when the download is complete, a .jar file called “samsungpaysdk_x.xx.xx_release.jar” can be found under the libs folder. add the samsung pay sdk .jar file to the libs folder of your android project using android studio or file explorer. navigate to the build.gradle file of your application module and enter the following dependency to the dependencies block: implementation files('libs/samsungpaysdk_x.xx.xx_release.jar') if the target sdk version is 30 or higher (android 11 or r-os), include the following <queries> element in androidmanifest.xml. for more information, see declare package visibility needs. <queries> <package android:name="com.samsung.android.spay" /> </queries> since we are using the latest sdk, set the api level to 2.18. we recommend using the updated version of the samsung pay sdk for a better user experience. implement the following code in the <application> element of androidmanifest.xml: <meta-data android:name="spay_sdk_api_level" android:value="2.18" /><!-- most recent sdk version is recommended to leverage the latest apis--> configure the debug or release mode for your project as follows: for testing and qa, set the debug mode value to y. this mode requires the allowed samsung account(s) list to test. for market release to end users, set the debug mode value to n. <meta-data android:name="debug_mode" android:value="n" /><!--set to y if debug mode--> let’s get started since the main functionalities in this tutorial are based on push provisioning, we need to initialize the samsungpay and cardmanager classes first. these two classes take the same parameters to construct, which are context and an instance of the partnerinfo class. the partnerinfo object contains information about partners, which is to validate the request from the issuer application. private val partnerinfo = partnerinfoholder.getinstance(context).partnerinfo private val samsungpay= samsungpay(context,partnerinfo) private val cardmanager = cardmanager(context, partnerinfo) check if samsung wallet is ready since the samsung pay sdk depends on samsung wallet, you need to ensure that samsung wallet is prepared for transactions. check the samsung wallet status before the sdk api call using the getsamsungpaystatus() method. if you get the "spay_ready" status, you can proceed further to call any api. for more details, see the programming guide. samsungpay.getsamsungpaystatus(object : statuslistener { override fun onsuccess(status: int, bundle: bundle?) { if(status == spaysdk.spay_ready){ //enable samsung pay sdk functionalities } else{ //disable samsung pay sdk functionalities } } override fun onfail(status: int, bundle: bundle?) { //disable samsung pay sdk functionalities } }) check if the card is added during development, you may need to know whether the card is already added to samsung wallet or not. to get a list of cards that have already been added to the wallet, use the getallcards() method. for card-related operations, such as getting cards from samsung wallet, the cardmanager class is the responsible one to perform. this means that the getallcards() method is a property of the cardmanager class. this method takes a bundle and an interface as parameters, so it returns the result based on the operation. notethe getsamsungpaystatus() method must be called before the getallcards() method. the getallcards() method cannot return a card list if the getsamsungpaystatus() method responds with a code other than spay_ready. tipone of the most common issues during development is that the getallcards() method returns empty data even though a card has been added. the main reason for this issue is that the card issuer name and issuer name on the samsung pay portal are not the same. for more information, see the faq & troubleshooting page. val getcardlistener: getcardlistener = object : getcardlistener { override fun onsuccess(cards: list<card>) { //show cards } override fun onfail(errorcode: int, errordata: bundle) { //show error } } cardmanager.getallcards(null, getcardlistener) configure your payload the getwalletinfo() method is designed to request wallet information from the samsung wallet application prior to performing the add card operation. wallet information can be mandatory or optional for token providers for payload configuration. for visa, wallet information is mandatory, and you have to use it while building the payload. val keys = arraylist<string>() keys.add(samsungpay.wallet_dm_id) keys.add(samsungpay.device_id) keys.add(samsungpay.wallet_user_id) val statuslistener: statuslistener = object : statuslistener { override fun onsuccess(status: int, walletdata: bundle) { val deviceid: string? = walletdata.getstring(samsungpay.device_id) val walletaccountid: string? = walletdata.getstring(samsungpay.wallet_user_id) //build payload } override fun onfail(errorcode: int, errordata: bundle) { //show error } } samsungpay.getwalletinfo(keys, statuslistener) complete the push provisioning the last command to execute the push provisioning operation in our tutorial is the addcard() method, which is required to perform the push provisioning in samsung wallet. the payload we have created must be delivered with the addcard() method as a parameter. the payload is a tricky part where partners can sometimes get confused or misguided. to be clear, samsung does not provide the payload for push provisioning. the payload is defined between the issuer and the token provider, and it varies based on different issuers and token providers. samsung only delivers the payload to the token provider without consuming anything. the addcard() method also takes a callback as a parameter to return the result based on the operation. tipfor push provisioning of a payment card, samsung pay does not store any card information nor provide any payload for adding cards. so, the issuer needs to provide the payload in a format that is defined in the token provider specification. the issuer and the token provider have their own agreement of data sharing, payload, and encryption. samsung pay is only a medium for this process. val tokenizationprovider = addcardinfo.provider_abcd val carddetail = bundle() carddetail.putstring(extra_provision_payload, payload) var cardtype = card.card_type_credit_debit val addcardinfo = addcardinfo(cardtype, tokenizationprovider, carddetail) val addcardlistener: addcardlistener = object : addcardlistener { override fun onsuccess(status: int, card: card) { //show successful message } override fun onfail(errorcode: int, errordata: bundle) { //show error } override fun onprogress(currentcount: int, totalcount: int, bundledata: bundle) { //extra event for operation count } } cardmanager.addcard(addcardinfo, addcardlistener) summary push provisioning is the powerful experience of sharing information to a digital wallet, and digital wallets transform this experience to the next level by facilitating transactions within seconds. samsung wallet handles these operations and helps the digital payment system to its next step. for more information about the samsung pay sdk, visit the samsung pay developers portal. if you face any issues during sdk implementation, contact the developer support team.
Yasin Hosain
Develop Samsung Pay
docenable app to app service the following diagram illustrates the flows of the app-to-app apis for payment card push provisioning bank appsamsung wallet apptoken service providerref[checking samsungpay status]section in common flowalt[if neccessary optional ]1cardmanager getallcards 2onsuccess card cardid, card cardstatus 3request card information with card cardid4success5samsungpay getwalletinfo 6onsuccess device_id, wallet_user_id 7create provisioningpayloadwith card information & wallet informationrefer to card networks spec8cardmanager addcard payload 9request token provision10success11onsuccess flows of push provisioning apis the main classes involved are samsung pay – for fetching samsung wallet app status and wallet information on the device paymentmanager – for card provisioning and invoking favorite cards payment functionalities cardmanager – for payment card management watchmanager – for all functions related to samsung pay watch let’s now take a look at how each one works in the context of your bank app requesting registered card list in the samsung pay thegetallcards method of the cardmanager class is used to request a list of all cards currently registered/enrolled in samsung wallet on the same device running the issuer’s app to succeed, the issuer app must pass valid partnerinfo to 'cardmanager' for caller verification 'cardfilter' narrows the card list returned by samsung wallet to the issuername specified please be noted that getsamsungpaystatus must be called before getallcards getallcards could not return a cards list when getsamsungpaystatus responds with a code other than spay_ready noteto get the cards list of samsung pay watch, you have to use the watchmanager class instead of the cardmanager class as of api level sdk version 1 4, cardfilter retrieves this information from the samsung pay developers portal certain issuers may need to register multiple issuer name s with the portal, depending on their app and/or the requirements of their token service provider tsp the getallcards parameter cardfilter matches the issuer name s specified with those registered in the portal only complete matches are returned this method is typically called when your partner app wants to check the card status it does not need to be called every time the partner app resumes therefore, you should create the card list with the 'oncreate ' method, rather than the 'onresume ' method the result of a getallcards call is delivered to getcardlistener, which provides the following events onsuccess - called when the operation succeeds; provides the list of all filtered cards and their status card information includes cardid, cardstatus, and extra cardinfo data onfail - called when the operation fails here’s an example of how to use the 'getallcards ' api method in your issuer app val cardfilter = bundle // since api level 1 4, cardfilter param is ignored partner does not need to use it here // it is retrieved from the samsung pay developers portal cardfilter putstring cardmanager extra_issuer_name, issuername cardmanager getallcards null, object getcardlistener{ override fun onsuccess cards mutablelist<card>? { // 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 s in cards { log d tag, "cardid " + s cardid + "cardstatus " + s cardstatus // get extra card data if s cardinfo != null { val cardid = s cardid // since api level 2 13, id from card network val last4fpan = s cardinfo getstring cardmanager extra_last4_fpan val last4dpan = s cardinfo getstring cardmanager extra_last4_dpan val cardtype = s cardinfo getstring cardmanager extra_card_type val cardissuername = s cardinfo getstring cardmanager extra_issuer_name log d tag, "last4fpan $last4fpan last4dpan $last4dpan cardid $cardid" } } } } override fun onfail errorcode int, errordata bundle? { // getting card status is failed } } getting wallet information the samsungpay class provides the getwalletinfo api method, which is called to request wallet information from the samsung wallet app prior to calling the addcard api, when you want to avoid duplicate provisioning your issuer app uses this information to uniquely identify the user and the samsung wallet app on a particular device wallet device management id, device id, and wallet user id noteto get wallet information of samsung pay watch, you have to use the watchmanager class instead of the cardmanager class fun getwalletinfo list<string> keys, statuslistener callback the following example demonstrates how to use it // set the serviceid assigned by the samsung pay developers portal during service creation val serviceid = "sampleserviceid" val bundle = bundle bundle putstring samsungpay extra_issuer_name, "issuer name" bundle putstring samsungpay partner_service_type, servicetype app2app tostring val pinfo = partnerinfo serviceid, bundle val samsungpay = samsungpay context, pinfo // add bundle keys to get wallet information from samsung pay // this information can be delivered to the partner server for an eligibility check val keys = arraylist<string> keys add samsungpay wallet_user_id keys add samsungpay device_id samsungpay getwalletinfo keys, object statuslistener{ override fun onsuccess status int, walletdata bundle { // log d tag, "dowalletinfo onsuccess callback is called" ; // for visa, deviceid can be set to "clientdeviceid" as defined by visa val deviceid = walletdata getstring samsungpay device_id // for visa, walletuserid can be set to "clientwalletaccountid" as defined by visa val walletuserid = walletdata getstring samsungpay wallet_user_id } override fun onfail errorcode int, errordata bundle? { log e tag, "onfail callback is called, errorcode " + errorcode ; // check the extra error codes in the errordata bundle for all the reasons in // samsungpay extra_error_reason, when provided } } adding a card to samsung pay your issuer app calls the 'addcard ' api method of cardmanager to add a card to samsung wallet by providing the required card details, your app can make it convenient and easy for users to add their bank-issued debit/credit cards to samsung wallet directly from your app without additional steps, like switching between apps noteif you want to add a card to samsung pay watch, you have to use the 'watchmanager' class instead of the cardmanager class for most issuers, getwalletinfo suffices for requesting current wallet information the response from samsung wallet tells the issuer app whether or not the user’s card has already been added to samsung wallet or is ineligible for provisioning it is therefore recommended that you call getwalletinfo before displaying the add to samsung pay button if the card is eligible, display the “add” button and, if the user taps it, call addcard importantremember to obtain the governing issuer implementation guide s and specifications from the respective card network and implement each network’s required handling in your partner app and server the 'addcard ' result is delivered to addcardlistener, which provides the following events onsuccess - called when the operation succeeds; provides information and status regarding the added card onfail - called when the operation fails; returns the error code and extra bundle data such as extra_error_reason or extra_request_id if provided onprogress - called to indicate the current progress of the 'addcard ' operation; can be used to show a progress bar to the user in the issuer app this callback is supported for tsm solution issuers in china and spain here’s an example of how to use the addcard api method in your issuer app val cardtype = card card_type_credit val tokenizationprovider string = addcardinfo provider_abcd // samsung pay does not provide detailed payload information; generate the provisioning payload in // accordance with your card network specifications val testpayload = "thisistestpayloadcardinfo1234567890" val carddetail = bundle carddetail putstring extra_provision_payload, testpayload val addcardinfo = addcardinfo cardtype, tokenizationprovider, carddetail cardmanager addcard addcardinfo, object addcardlistener { override fun onsuccess status int, card card? { log d tag, "onsuccess callback is called" ; } override fun onfail errorcode int, errordata bundle? { log d tag, "onfail callback is called" ; // check some extra error codes in the errordata bundle // such as samsungpay extra_error_reason or samsungpay extra_request_id if provided } override fun onprogress currentcount int, totalcount int, bundledata bundle? { log d tag,"onprogress callback is called " + currentcount + " / " + totalcount ; } } adding a co-badge card to samsung pay co-badge payment cards combine two payment brands/networks to add a co-badge card through push provisioning, you must provide two different card network details one for the primary card network and another for the secondary card network issuer app calls the addcobadgecard api method of cardmanager to add a co-badge card to samsung pay in most cases, calling getwalletinfo will suffice to request current wallet information the response from samsung pay indicates whether the user's co-badge card has already been added to samsung pay or is ineligible for provisioning therefore, it is advisable to call getwalletinfo before displaying the add to samsung pay button if the co-badge card is eligible, display the "add" button and, upon user tapping, call addcobadgecard important please remember to refer to the relevant issuer implementation guide s and specifications provided by each card network and ensure that your partner app and server adhere to their specific requirements the addcobadgecard result is delivered to addcardlistener, which provides the following events onsuccess - called when the operation succeeds; provides information and status regarding the added card onfail - called when the operation fails; returns the error code and extra bundle data such as extra_error_reason or extra_request_id if provided onprogress - called to indicate the current progress of the 'addcard ' operation; can be used to show a progress bar to the user in the issuer app this callback is supported for tsm solution issuers in china and spain here’s an example of how to use the addcobadgecard api method in your issuer app note samsung pay does not provide detailed payload information; generate the provisioning payload in accordance with your card networks specifications string cardtype = card card_type_credit; string primarytokenizationprovider = addcardinfo provider_abcd; //provide your primary card network payload string testprimarypayload = "thisistestprimarypayloadcardinfo1234567890"; string secondarytokenizationprovider = addcardinfo provider_efgh; //provide your secondary card network payload string testsecondarypayload = "thisistestsecondarypayloadcardinfo1234567890"; bundle primarycarddetail = new bundle ; primarycarddetail putstring addcardinfo extra_provision_payload, testprimarypayload ; addcardinfo primaryaddcardinfo = new addcardinfo cardtype, primarytokenizationprovider, primarycarddetail ; bundle secondarycarddetail = new bundle ; secondarycarddetail putstring addcardinfo extra_provision_payload, testsecondarypayload ; addcardinfo secondaryaddcardinfo = new addcardinfo cardtype, secondarytokenizationprovider, secondarycarddetail ; cardmanager addcobadgecard primaryaddcardinfo, secondaryaddcardinfo, new addcardlistener { @override public void onsuccess int status, card card { log d tag, "onsuccess callback is called" ; } @override public void onfail int error, bundle errordata { log d tag, "onfail callback is called" ; 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 ; } } ;
FAQ marketplace, mobile, web
docfaq & troubleshooting if the samsung pay app throws error_not_allowed -6 / error_unable_to_verify_caller -359 , what needs to be checked on the partner app side? for debug verify that the serviceid is correct; make sure it was generated for the test mode and not for release verify that the servicetype is correct; make sure it is same as the value assigned by the samsung pay developers portal when you create the service verify that the device’s samsung account is registered allowed under test accounts in the service details for release verify that the serviceid is correct; make sure it was generated for release and not for the test mode verify that the servicetype is correct; make sure it is same as the value assigned by the samsung pay developers portal when you create the service ask your samsung pay relationship manager rm to confirm that the status of your service is approved i received an onsuccess callback for a `getallcards ` response but the card list is empty even though there already one or more installed cards in samsungpay one of the most common exceptions during development is that “getallcard ” returns an empty list even though the card has already been added to the samsung wallet the main reason for this exception is the mismatch of an issuer name with the samsung pay portal the issuer name on the samsung pay portal and the actual issuer name of the card must be the same to overcome this problem if you cannot confirm the actual issuer name of the card, just add the card to samsung wallet app and see its details information open wallet app > tap on the card > three-dot menu > customer service option > under the title you will find the issuer name the following screenshot would be helpful for better understanding, i have received an onfail callback for `getsamsungpaystatus ` with a `spay_not_supported` status code if your app’s target api level is set to 30 or higher, refer to setting up your sdk development environmen part and follow guide for android r os targetsdkversion 30 i am getting 500 error when registering a csr while creating the 'web payment' service what should i do? if your csr was signed using your own private key rather than signed by a payment gateway, please select payment gateway with 'none default ' note the default pg name is 'none default '
Develop Samsung Pay
doccommon flow once setup is complete, you’re ready to add the samsung pay sdk flutter plugin code within your partner app for calling the samsung pay sdk’s apis and receiving callbacks the following functionalities are ready to call through apis checking samsung wallet status activating the samsung wallet app updating the samsung wallet app checking samsung wallet status the first step in implementing the samsung pay sdk flutter plugin within your partner app is to create the samsungpaysdkflutter instance, this will check the samsung wallet status on the device it's determine the support for samsung wallet or lack thereof , and whether or not to display the samsung pay button to the user for selection as a payment option the samsung pay button also lets issuer apps add a card to samsung wallet in both instances, the partner app must have valid partnerinfo to pass to samsungpay for caller verification to set its partnerinfo, the partner app passes its serviceid sid and servicetype, both of which are assigned by the samsung pay developers portal when you create the service this will be used for checking blocked list and version control between the samsung pay sdk flutter plugin and the samsung wallet app on the device you must set the servicetype in partnerinfo to call other samsung wallet apis string serviceid; map<string,dynamic> data; static final samsungpaysdkflutterplugin = samsungpaysdkflutter partnerinfo serviceid 'partner_app_service_id', data {spaysdk partner_service_type servicetype app2app name tostring } ; after setting partnerinfo, your partner app can now call getsamsungpaystatus this method of the samsungpay class must be called before using any other feature in the samsung pay sdk flutter plugin future<void> getsamsungpaystatus statuslistener? statuslistener the result is delivered to statuslistener and provides onsucccess and onfail events check the android sdk common flow for more details the following sample code shows how to use the getsamsungpaystatus api method myhomepage samsungpaysdkflutterplugin getsamsungpaystatus statuslistener onsuccess status, bundle async { showstatus status, bundle ; }, onfail errorcode, bundle { showerror errorcode, bundle ; } ; activating the samsung walllet app the samsungpaysdkflutter class provides the following api method to activate the samsung wallet app on a device future<void> activatesamsungpay activatesamsungpay is called to activate the samsung wallet app on the same device on which the partner app is running first, the partner app must check the samsung wallet status with a getsamsungpaystatus call if the status is spay_not_ready and extra_error_reason is error_spay_setup_not_complete, the partner app needs to display an appropriate message to user, then call activatesamsungpay to launch the samsung wallet app so the user can sign in here’s an example of how to code this samsungpaysdkflutterplugin activatesamsungpay ; updating the samsung wallet app the samsungpaysdkflutter class provides the following api method to update the samsung wallet app on the device future<void> gotoupdatepage gotoupdatepage is called to update samsung wallet app on the same device on which the partner app is running as with all api calls, the partner app must first check the samsung wallet status with getsamsungpaystatus if this returns spay_not_ready and extra_error_reason is error_spay_app_need_to_update, then the partner app needs to display an appropriate message to the user and call gotoupdatepage , which launches the samsung wallet update page the following code sample reflects how to update samsung wallet samsungpaysdkflutterplugin gotoupdatepage ;
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.