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.
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*.
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(); // ...... } // ...... };