The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

Digital Commerce ServerSDK Client Setup and Usage

You can configure the ServerSDK for use with the client-side SDK or with the proxy server SDK.

Using the client-side implementation, the Digital Commerce APIs are called directly from the client for guest users. After signing in, all Digital Commerce APIs are called from ServerSDK.

Using the Proxy SDK, all Digital Commerce APIs are called from ServerSDK. The Proxy SDK library is very light weight and shares the same signatures as the other Digital Commerce client SDK, requiring no code changes in the user interface.

Add Digital Commerce Lightning Web Component client setup information (on-Platform customers can also use ServerSDK to log in using third-rd party authentication server).

Edit your LWC component HTML include file \<c-dc-sample-app>\</c-dc-sample-app> component with the attributes shown here:

checkout-api-urlContains a value that specifies the URL where ServerSDK is hosted.
secure-server-api-request-credentialsContains a value that specifies a value indicating whether the user agent should send cookies to the secure server if it is hosted on another domain in the case of cross-origin requests. Possible values are: include,omit and same-origin (default value)
checkout-payment-urlContains a value that specifies the checkout payment URL.
enable-proxy-sdkContains a boolean value (true or false). The default valus is false. If set to true, the Digital Commerce, Account, Translation Proxy SDK instances will be created.
auth-configurationContains your Firebase or custom auth configuration details. You can create custom auth config by overriding dcCustomAuthenticationUtil.