Stored Payment Cards Integration
Allow logged-in shoppers to store and reuse the stored payment cards.
The ESW Stored Payment Cards feature allows logged-in shoppers to securely save their payment card details, enabling a faster and smoother checkout experience on future purchases.
Key Benefits
- Accelerated Checkout Experience: Shoppers can complete purchases quickly using previously saved cards, reducing friction at checkout.
- Increased Conversion Rates: Faster checkout is a proven method to boost shopper conversion, leading to higher revenue for retailers.
- Enhanced Shopper Satisfaction: Repeat shoppers benefit from a convenient experience, which builds brand loyalty and encourages repeat purchases.
- Effortless Integration: This is a plug-and-play feature built on the standard SFCC plugin, requiring minimal integration effort from the retailer.
How it works
.png&w=1536&q=100)
Stored Payment Cards Integration
Workflow Assumptions
The Stored Payment Cards feature operates under the following conditions:
- The shopper is already logged in to their account.
- The checkout process is executed in a secure (HTTPS) context.
- Both the retailer’s site and the ESW checkout are hosted under the same top-level domain (TLD) to ensure secure and seamless card storage and retrieval.
Stored Payment Cards – Shopper Workflow
Shopper Adds Item to Cart
- The shopper adds a product to the cart and clicks the Checkout button.
Authentication Check
- If the shopper is not already logged in, they are presented with:
- Forced Login, or
- Guest Checkout (if enabled)
Note: Stored card functionality is only available to logged-in shoppers.
Order Creation in SFCC
- After login, the ESW SFCC Plugin creates a new order in SFCC.
- The order status is set to
Created.
Pre-Order Request Assembly
- The plugin extracts the
registeredProfileIdand builds the pre-order payload. - This payload is submitted to the ESW Checkout API to initiate the ESW checkout experience.
ESW Checkout API Response
- On success, the response returns:
- A Checkout URL for shopper redirection.
- A shopper access token (
shopperAccessToken) to be stored as a browser cookie using the key:esw-shopper-access-token
Handling the Access Token in SFCC
- The plugin checks for the access token:
- If present, it sets a browser cookie using the domain from the ESW Top-Level Domain preference.
- If absent, the shopper is still redirected to the ESW Checkout URL.
ESW Checkout – Payment Panel Logic
- On reaching the Payment Panel, the ESW Checkout:
- Reads the
esw-shopper-access-tokenfrom the cookie. - Validates the token.
- Makes a server-to-server call to the ESW Payment API to fetch stored cards.
- Reads the
Stored Card Selection
- If valid stored cards are returned:
- The shopper sees a dropdown menu listing their saved payment methods.
- The shopper can select a card and proceed to complete the checkout.
Cookie Details – esw-shopper-access-token
The esw-shopper-access-token cookie is required to authenticate the shopper and enable the stored payment card feature on ESW Checkout.
Cookie Attributes
| Attribute | Description |
|---|---|
| Name | esw-shopper-access-token |
| Max-Age | Inherits from the SFCC platform’s native session expiration settings |
| Domain | {your checkout domain} (e.g. mycheckoutdomain.com) |
| Secure | true (must be set for HTTPS usage) |
The domain can be configured using Business Manager → ESW Checkout Configuration → ESW Top Level Domain
Sample HTTP Header
Cookie Creation Strategy
Non-Headless Architecture (SFRA / SiteGenesis)
The cookie is automatically created by the ESW SFCC plugin during checkout flow.
Headless Architecture
Headless storefront developers must manually implement cookie creation on the client side, using the values specified above.
The ESW SFCC plugin cannot control client-side cookie creation in headless environments.
First-time and Repeat Shopper Experience
First-time shoppers are prompted to save the cards for later use
.png&w=1536&q=100)
First-time experience
.png&w=1536&q=100)
Repeat experience
Options for Testing in Sandbox and Staging Environment
To test the Stored Payment Cards feature in a sandbox or staging environment, you have two options
Option 1 Matching Top-Level Domains
Option 2 Manually Set Cookie (Mismatched Domains)
Steps to Test with Manual Cookie Setup
Use the following steps when testing the Stored Payment Cards feature in a sandbox environment where top-level domains differ between SFCC and ESW Checkout
Verify Cookie Creation in SFCC Domain
- Begin the checkout process as a logged-in shopper.
- After initiating checkout, open Developer Tools in your browser.
- Navigate to:
Application → Storage → Cookies - Confirm that the cookie
esw-shopper-access-tokenhas been created under your SFCC top-level domain.
Domain: zyfl-001.dx.commercecloud.salesforce.com
Redirect to ESW Checkout
- Continue the checkout flow until the shopper is redirected to the ESW Checkout page.
Manually Update Cookie Domain
- In Developer Tools, go to:
Application → Storage → Cookies - Locate and copy the
esw-shopper-access-tokenvalue from the SFCC domain. - Create a new cookie entry for the ESW Checkout domain (e.g.,
.eshopworld.com) using the following fields:
| Field | Value |
|---|---|
| Name | esw-shopper-access-token |
| Value | (paste the copied token) |
| Domain | .eshopworld.com |
| Secure | true |
| Max-Age | 3600 (1 hour, or as needed) |
Refresh the ESW Checkout Page
- Reload the ESW Checkout page in the browser.
- The Stored Cards payment option should now appear and be available for selection.
This manual setup is only needed for mismatched domains in non-production environments.