-
Notifications
You must be signed in to change notification settings - Fork 0
Composable Storefront
This plugin enables AltaPay as the Payment Service Provider (PSP) for storefronts using the Salesforce Composable Storefront PWA.
Table of Contents
Before configuring the cartridges, you need the below information. These can be provided by AltaPay.
- AltaPay credentials:
- Username
- Password
- AltaPay gateway information:
- AltaPay Terminal Configuration JSON: Used for mapping payment methods in Salesforce to terminals in the AltaPay payment gateway.
- Gateway
Note: If the API user credentials have not yet been created, refer to the Creating a New API User section for step-by-step instructions.
Download the AltaPay for Salesforce Commerce Cloud int_marketpay_headless cartridge from Github for headless implementation.
Then follow the steps below to complete the installation.
-
Open the int_marketpay_headless cartridge into the VS Code.
-
Add your sandbox credentials to
dw.jsonfile. -
Open the Prophet extension.
-
Click on the
Prophet: Clean Project/Upload allfrom CARTRIDGES window. -
The Cartridge extension will upload cartridges to the linked sandbox.
-
Log into the SFCC Business Manager on your sandbox.
-
Navigate to: Administration > Manage Sites > [store front site] > settings tab.
-
Add int_marketpay_headless cartridge in the cartridge path and click the Apply button.

-
Go to
metadata/MarketPay-Headless/sitesand renameRefArchGlobalto match your site ID. -
Zip
MarketPay-Headlessfolder. -
From the SFCC Business Manager: Navigate to: Administration > Site Development > Site Import & Export.

-
Choose file from the Import section, click the Upload link or button.
Once the import is successful, all the necessary fields will be created in Salesforce to allow our solution to function. You will have configuration fields to set up the environment, as well as payment data fields that help you understand the payment status and provide information necessary for debugging.
From the SFCC Business Manager:
-
Select your site from the list in the top navigation bar.
-
Navigate to: Merchant Tools > Site Preferences > Custom Preferences > MarketPay:
-
This is where the merchant can access and configure the MarketPay integration.
-
Fill out the settings as desired. Descriptions of the site preferences are listed in the tables below.
Use the following preferences to configure your AltaPay credentials.
Preference Description MarketPay Terminals / Payment Methods Mapping of payment methods in Salesforce and terminals in the MarketPay payment gateway.
A terminal can only contain one payment method and one currency, However, it is possible to use the same terminal for multiple payment methods. By sharing your requirements with MarketPay, we will ensure that the correct configuration and JSON mapping are created to meet your needs.
The setting must be structured as shown in the screen illustration.
The attribute id must correspond with the payment method added in: Merchant Tools > Ordering > Payment Methods plus the preferred currency. The attribute name is the name and identifier of the MarketPay terminal. The attribute allowedlocales defines which locales that can use the terminal.
Note: The JSON file containing the terminal configuration will be provided by AltaPay. This file defines the mapping between Salesforce payment methods and the terminals configured in the MarketPay payment gateway.Organization ID To find the organization ID in Business Manager, click App Launcher and then select Administration > Site Development > Salesforce Commerce API Settings. Example: f_ecom_zzdc_001Organization ShortCode To find your short code in Business Manager, click App Launcher and then select Administration > Site Development > Salesforce Commerce API Settings. Example: kv7kzm78Known IP Protection Restricts callbacks to known gateway IP addresses. Disable this option if the store is using a firewall or proxy service (such as Cloudflare)
Preference Description Payment Success URL URL where MarketPay redirects after a successful payment. Example: https://example.com/{LOCALE}/checkout/confirmation. The{LOCALE}variable is replaced with the store's locale (e.g.de,nl)Payment Failed URL URL where MarketPay redirects after a failed payment. Example: https://example.com/{LOCALE}/checkout/confirmation. The{LOCALE}variable is replaced with the store's locale (e.g.de,nl)Payment Success App URL URL where MarketPay redirects after a successful payment. Example: exampleapp://{LOCALE}/checkout/confirmation. The{LOCALE}variable is replaced with the store's locale (e.g.de,nl)Payment Failed App URL Payment failed mobile app deep link URL. Example: exampleapp://{LOCALE}/checkout/confirmation. The{LOCALE}variable is replaced with the store's locale (e.g.de,nl)
From the SFCC Business Manager:
-
Navigate to: Administration > Operations > Services > Service Credentials
-
Click on int.marketpay.service.credentials.
-
Update the URL, replace
https://testgateway.altapaysecure.comwith your gateway URL, and enter Gateway API user and Password and click Apply button.
-
Click on int.marketpay.slas.credentials.
-
Enter the SLAS User and Password and click Apply button.

You can use the B2C Commerce API’s getOrder endpoint to retrieve MarketPay payment data (e.g., transaction ID, captured amount, reserved amount, etc.). All MarketPay-related fields are prefixed with c_marketPay.
To create a new API user in your AltaPay account, please follow these steps:
-
Log in to your AltaPay account.
-
From the left menu, navigate to Settings > API Keys.

-
Click on the Create New API Key button from top right corner.
-
Fill in the required fields:
- Your current password
- Username
- Password
- Assign Shops

-
After entering the details, click Create.
The new credentials can now be used as the API Login and API Password in the AltaPay API Login section.