> This page is for Afterpay Online Developer, version Main (default).
> For other versions, use one of these documentation indexes:
> - Main (default): https://developers.afterpay.com/afterpay-online-developer/main/llms.txt
> - v1: https://developers.afterpay.com/afterpay-online-developer/v-1/llms.txt
> - Chinese: https://developers.afterpay.com/afterpay-online-developer/chinese/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.afterpay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.afterpay.com/_mcp/server.

# SFCC Configure the Cartridge

## Set the Cartridge Path

Before the Afterpay functionality can become available to your site, the cartridge names must be added to the cartridge path of the Site’s settings. To do this, follow these instructions:

1. Log into **Business Manager**.
2. Navigate to **Administration** > **Sites** > **Manage Sites** > **\[yourSite]** > **Settings**
   * If you are using SFRA, enter: `int_afterpay_sfra:int_afterpay_core:app_storefront_base`. If you are using SFRA > 6.0.0 then you should use `int_afterpay_sfra_6 instead`.
   * If you are using SiteGenesis, enter: `int_afterpay_sg:int_afterpay_core` in front of Sitegenesis base cartridges.
3. Click **Apply**.

## Set SFCC (Demandware) Service

Navigate to **Administration** > **Operations** > **Services** > **Credentials** > and select the required service and enter the account details.

|          |                                                                                                                                                                                          |
| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL      | Sandbox [https://global-api-sandbox.afterpay.com/v2/](https://global-api-sandbox.afterpay.com/v2/) Production [https://global-api.afterpay.com/v2/](https://global-api.afterpay.com/v2/) |
| User     | Enter the Merchant ID provided by Afterpay                                                                                                                                               |
| Password | Enter the Secret Key provided by Afterpay                                                                                                                                                |

## Set Afterpay Custom Site Preferences

In **Business Manager**, navigate to the **Merchant Tools** > **Site Preferences** > **Custom Preferences**. A custom site preference group with the ID `Integration_Afterpay` is available for you to use. Select it and edit the attributes according to your Afterpay account data and the data shown in the table below.

> **Info**
>
> Listed preferences are for the Afterpay cartridge v23.4.1 and above. If you are using any other versions please refer to the integration guide provided under the documentation folder in the [repository](https://github.com/afterpay/afterpay-salesforce-commerce-cloud).

| Site Preference                                                                        | Description                                                                                                                                                                                                                                                                                                | Default                                                                                       |
| -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| Enable Afterpay (`enableAfterpay`)                                                     | This field determines whether all of the cartridge functionality is active and visible on your storefront. You can use this field to temporarily disable the payment method at the checkout along with all customer-facing messaging throughout the site without uninstalling the cartridge.               | No                                                                                            |
| Enable CashAppPay (`enableCashAppPay`)                                                 | This field determines if Cash App Pay is enabled / disabled in the cartridge. Cash App Pay is not available outside the US, keep this setting on the default **No**.                                                                                                                                       | No                                                                                            |
| Brand settings (`apBrandSettings`)                                                     | Afterpay / Clearpay Brand related settings in JSON format where: Brand – Afterpay/Clearpay, depending on region; Service – the field is used to identify the service with Afterpay/Clearpay.(You can find the services according to your country under **Administration** > **Operations** > **Services**) | `{     "US": {         "brand": "afterpay",         "service": "afterpay.service.US"     } }` |
| Afterpay JavaScript URL (`apJavaScript`)                                               | The endpoint where the javascript library is obtained from – Use: Sandbox - [https://js-sandbox.squarecdn.com/square-marketplace.js](https://js-sandbox.squarecdn.com/square-marketplace.js) Production - [https://js.squarecdn.com/square-marketplace.js](https://js.squarecdn.com/square-marketplace.js) |                                                                                               |
| Afterpay Display Product Details Page Information (`apDisplayPdpInfo`)                 | This field determines if the Afterpay messaging is displayed on the **Product Details** page.                                                                                                                                                                                                              | Yes                                                                                           |
| Afterpay Display Product List Page Information (`apDisplayPlpInfo`)                    | This field determines if the Afterpay messaging is displayed on the **Product List** Page.                                                                                                                                                                                                                 | No                                                                                            |
| Afterpay Display Cart Page Information (`apDisplayCartInfo`)                           | This field determines if the Afterpay messaging is displayed on the **Cart** Page.                                                                                                                                                                                                                         | Yes                                                                                           |
| Afterpay Payment Mode (`apPaymentMode`)                                                | This field determines if the payment should be Authorized only or if the merchant will use **Direct Capture**.                                                                                                                                                                                             | Merchant Specific – Select the ones to be supported.                                          |
| CapturePaymentTimeout (`apCaptureTimeout`)                                             | This field is used to set timeout for the **Direct Timeout Capture** payments.                                                                                                                                                                                                                             |                                                                                               |
| apDelayRetry (`apDelayRetry`)                                                          | This field is required to set the delay time for the unavailable service                                                                                                                                                                                                                                   |                                                                                               |
| Enable Express Checkout (`apEnableExpressCheckout`)                                    | Enables the **Express Checkout** feature.                                                                                                                                                                                                                                                                  | Yes                                                                                           |
| Enable BuyNow (`apEnableExpressCheckoutBuyNow`)                                        | Enables the **BuyNow** mode. Skips review page on merchant checkout. (Note: Only used for **Integrated Shipping**)                                                                                                                                                                                         | Yes                                                                                           |
| Express Checkout Shipping Strategy (`apExpressCheckoutShippingStrategy`)               | Select either **Integrated Shipping** (Afterpay Checkout prompts for shipping method), or **Deferred** (merchant site handles shipping method selection) Note: If there are multiple shipping methods in the cart, cartridge will disregard this preference and select deferred shipping strategy.         | Integrated                                                                                    |
| Description Express Checkout will use for In-Store Pickup (`apStorePickupDescription`) | Prompt to use in Afterpay Express Checkout for in-store pickup orders                                                                                                                                                                                                                                      | Available for next-day pickup                                                                 |
| Enable Express Checkout on Product Details Page (`apEnableExpressCheckoutPdp`)         | Enables Express Checkout directly from the product detail page. If this setting is disabled but Express Checkout is enabled, the button will appear only on the cart page for SiteGenesis storefronts, and the cart page and minicart for SFRA storefronts.                                                | No                                                                                            |
| Enable Express Checkout option on cart (`apEnableExpressCheckoutCart`)                 | Enable Express Checkout option on cart and minicart(SFRA) page.                                                                                                                                                                                                                                            | Yes                                                                                           |
| Default Controller Cartridge Name (`apControllerCartridgeName`)                        | This is used for SiteGenesis only and can be ignored for SFRA.                                                                                                                                                                                                                                             | `app_storefront_controllers`                                                                  |
| Default Core Cartridge (`apCoreCartridge`)                                             | This is used for SiteGenesis only and can be ignored for SFRA.                                                                                                                                                                                                                                             | `app_storefront_core `                                                                        |
| Restricted Products(`apRestrictedProducts`)                                            | The product ids of products that are to be excluded from Afterpay/Clearpay separated by “,”                                                                                                                                                                                                                |                                                                                               |

## Add the Afterpay Image to the Payment Method (For SiteGenesis)

To display the Afterpay image on the site, you must add the image to your site:

1. Go to **Merchant Tools** > **Ordering** > **Payment Methods**.

2. Select the payment method with the ID **AFTERPAY/CLEARPAY** (depending on the target region) and locate the image attribute and upload the image included in the cartridge.   (int_afterpay_sg/cartridge/static/default/images/logo-afterpay-colour.png or int_afterpay_sg/cartridge/static/default/images/logo-clearpay-colour.png).