SDK Programming Guide
  • 3.3.7 Fast Checkout (FCO)
  • Partner apps: Merchant (US-only feature)

  • Studies show that last year the average US conversion rate for e-commerce transactions sits at around 4 percent on desktop but drops to a mere 1.3 percent on smartphones, which currently represent roughly 46 percent of global e-commerce traffic. What’s the problem? Most business insiders agree that friction within the checkout process is a major pain point for many mobile shoppers, as well as a leading reason for mobile cart abandonment. After all, being forced to enter shipping and billing information, and often even more information, all on a small screen with an even smaller keyboard, added to the fact that many people are on the go while using their mobile device, and it’s not hard to understand why mobile conversions are not higher.

    To help merchants increase and sustain conversions on smartphones, Samsung pay is introducing a new SDK feature called Fast Checkout (FCO). Enabled by default, FCO allows your users to steamline their checkout experience by enabling them to bypass authentication during checkout using their favorite method of payment. When FCO is disabled by the user, the Samsung Pay payment sheet configured for your app, whether normal or custom, is presented to the user as usual. At their option, your users can disable FCO in the Samsung Pay app settings on the device. Once disabled for a particular merchant, FCO can be enabled again by checking the Turn on Fast Checkout control in the merchant’s standard payment sheet.

    Even when FCO is enabled, standard checkout with user authentication via the merchant’s normal or custom payment sheet is required the very first time a user makes an In-App purchase using Samsung Pay. Thereafter, if the user has FCO enabled, the last payment card selected, along with the shipping addresses and method used for the last transaction made with Samsung Pay from your app, is stored in the Samsung Pay cloud so it can be used for subsequest transactions without the user having to authenticate.

  • Once enabled, the user can change the registered information used from the last transaction by tapping EDIT or CHANGE button on the merchant app's checkout page.
    • Important
    • If the EDIT or CHANGE button is not in place on your payment sheet, your merchant app must call the startInAppPay() API for normal sheet transactions ― or startInAppPayWithCustomSheet() for custom payment sheet transaction ― with the enableEnforcePaymentSheet option enabled. Calling the respective APIs with enableEnforcePaymentSheet enabled is also required if the Payment Gateway denies a payload due to a payment card-specific error (e.g., “not enough funds to complete transaction” or some other failure that results in a rejected transaction by the card issuer.
  • After enabling FCO, should the user decide to disable the FCO experience and return to the standard payment sheet for purchases, they can do so in the Settings menu of Samsung Pay (pictured below).
  • Button UI assets are available in a variety of branded forms to indicate whether or not FCO is enabled.
    • Note
    • To implement FCO, existing partner apps will need to upgrade to SDK v1.7.00 or a subsequent version and update their Samsung Pay button assets in accordance with the approved UI assets shown above. The key guideline here is that when FCO is enabled, its status is clearly indicated to users so they are not surprised when the transaction goes through without a payment sheet first appearing. A “Fast checkout is enabled” label on or near the Samsung Pay button is recommended to show FCO status.

      The earliest version of the wallet app that supports external partner app FCO is release 2.8.xx.

      The ECO/eco (Express Checkout) designation used in the code samples below refers to FCO (Fast Checkout). Do not use *fco*.

  • Fast Checkout UX ‒ First time versus follow-on use
  • Upon implementing FCO in a new release of your app, users will encounter your standard payment sheet configuration during their first checkout after upgrading to a version of your app supporting FCO. What will be different is a new Turn on fast checkout control in the UI, enabled by default.
    • Remember, if the user unchecks the control, FCO is disabled for subsequent transactions unless the user enables it once again from the payment sheet during any of subsequent transaction. .
  • Authentication proceeds as usual―either biometrically or by entering the correct PIN―for this initial purchase, as pictured next.
  • For subsequent transactions, as pictured below, once the user taps the Buy with Samsung Pay button, the payment sheet is not displayed; the user is taken directly to the order confirmation screen.
  • For the best user experience, the following changes to your existing merchant app are recommended when FCO is enabled:
    1. Merchant app presents user with the option of making payment with Samsung Pay.
    2. Upon user selection of the Samsung Pay option, merchant app calls the APIs included in the Samsung Pay SDK to initiate a transaction with Samsung Pay app.
    3. Samsung Pay app responds with the tokenized payment information necessary to complete the transaction.
    4. Merchant app forwards this payment information to the designated Payment Gateway (PG), either directly or through the merchant's web server, or indirectly via the Samsung-PG Interface server for normal transaction processing.
      1. Last used card (saved from last transaction) with an “Edit” option – along with option enableEnforcePaymentSheet
      2. Last used shipping address (saved from the last transaction) with an “Edit” option – also with option enableEnforcePaymentSheet
      3. Samsung Pay button with the label “Fast checkout enabled.”
  • Sample FCO code
  • In the following example, you’ll see how to configure Samsung Pay buttons and get the last transaction information. The last transaction information includes card brand, currency code, last 4 digits of card DPAN/FPAN, shipping method, and shipping address.
  • private boolean isFcoEnabled = false;
    private String PaymentCardLast4DPAN = "";
    private String PaymentCardLast4FPAN = "";
    private SpaySdk.Brand PaymentCardBrand = null;
    private CheckBox enforcePaymentSheet_checkbox;
           
        @Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        	// ......
    
             // Fast Checkout view
                enforcePaymentSheet_checkbox=(CheckBox)fragmentView.
    findViewById(R.id.enforce_payment_sheet_checkbox);
    
             initPayButtonBackground();
            
             // ......
             return fragmentView;
        }   
            
        /**
         * Initialize Pay button background image
         * Call this function when merchant app is initializing
         */
    
        private void initPayButtonBackground() {
    
            if (null == samsungPayButton) {
                return;
            }
    
            //Retrieve FCO state which was saved before. Below is a sample code.
            isFcoEnabled = false;
    
            //Initialize background image according to current FCO state
            if (isFcoEnabled) {
                samsungPayButton.setImageDrawable(getResources().getDrawable(R.drawable
                        .fc_rectangular_full_screen_black, null));
    
            } else {
                samsungPayButton.setImageDrawable(getResources().getDrawable(R.drawable
                        .pay_rectangular_full_screen_black, null));
    
            }
    
        }
    
        /*
         * Update Pay button background image
         * Call this function when current transaction finished successfully.
         *
         */
    
        private void updatePayButtonBackground(boolean isFcoEnabled) {
    
            if (null == samsungPayButton) {
                return;
            }
    
            if (isFcoEnabled) {
                samsungPayButton.setImageDrawable(getResources().getDrawable(R.drawable
                        .fc_rectangular_full_screen_black, null));
    
            } else {
                samsungPayButton.setImageDrawable(getResources().getDrawable(R.drawable
                        .pay_rectangular_full_screen_black, null));
            }
           
        }
    
        //Update PAY button background in CustomSheet after transaction finished successfully
         private PaymentManager.CustomSheetTransactionInfoListener transactionListener
    = new PaymentManager.CustomSheetTransactionInfoListener() {
    
                 // ......
            @Override
            public void onSuccess(CustomSheetPaymentInfo response, String paymentCredential,
    Bundle extraPaymentData) {
                 // ......
    
                 // Partner can save this information and if they want, they can use this information
                 // for the next transaction without user authentication
                 // This sample app use the information for Fast Checkout control.
    		
                 // Get FCO state from response data and update Pay button background accordingly.
                      isFcoEnabled = response.isFastCheckout();
    	    	updatePayButtonBackground(isFcoEnabled);
    		         
                      PaymentCardLast4DPAN = response.getPaymentCardLast4DPAN();
                      PaymentCardLast4FPAN = response.getPaymentCardLast4FPAN();
                      PaymentCardBrand = response.getPaymentCardBrand();
                     
                 // ......
            }
            // ......
        };    
    
  • Upon upgrading your app to SDK v1.7.00, making the appropriate UI modifications cited above, and testing locally, merchant partners wishing to enable FCO for release will need to contact their Samsung Pay relationship manager to facilitate the server-side change.
    • Note
    • Samsung Pay FCO currently supports Visa transactions only. FCO support for MasterCard and American Express is coming soon.