Configure the Buy with Prime Cartridge

📘

Buy with Prime API is now available for early access

Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.

After you install the Buy with Prime cartridge, you must configure the cartridge to work with your site. You can also edit settings in the cartridge to customize the appearance of Buy with Prime on your site.

For details about installing the cartridge, see Install the Buy with Prime Cartridge.

Assign the Buy with Prime cartridge to your site

If you are using the Storefront Reference Architecture (SFRA) functionality, do the following to assign the Buy with Prime cartridge to your site.

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Administration menu, click Sites, and then click Manage Sites.
  3. Click the name of the site that you want to integrate with Buy with Prime.
  4. Click the Settings tab.
  5. In the Cartridges field, add int_buywithprime_sfra and int_buywithrime to the colon-separated list of cartridges.
    For example, if you are using Amazon Pay as your payment service provider (PSP), specify int_buywithprime:int_buywithprime_sfra:int_amazonpay:int_amazonpay_sfra:app_storefront_base. If you are using your own PSP, specify int_buywithprime:int_buywithprime_sfra:int_YOUR_PSP:app_storefront_base.
  6. Click Apply.

Configure the preferences for the Amazon Pay cartridge

If you are using Amazon Pay as your payment service provider (PSP), configure the preferences for the Amazon Pay cartridge. For details, see Install the Buy with Prime Cartridge.

Configure the preferences for your site

At minimum, you must configure the following site preferences for Buy with Prime. For the full list of site preferences, see Site preferences for the Buy with Prime cartridge .

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Merchant Tools menu, click Site Preferences, click Custom Preferences, and then click Buy_with_Prime.
  3. Do the following:
    • For Buy with Prime Enabled, choose Yes.
    • For BWP Enabled Countries, enter the ISO alpha-2 country code for a country where you want to enable Buy with Prime, and then click Add. To add another country, enter another country code and then click Add.
    • For bwpMode, choose Sandbox or Live.
    • For BWP_Payment_Processor, choose one of the following payment processors:
      • None: Use the sign-in experience, which lets you use your own payment service provider. For details, see Configure the sign-in experience for your site.
      • Amazon Pay: Use express checkout with Amazon Pay wallet.
      • Adyen: Use express checkout with Amazon Pay wallet integrated through Adyen.
    • For Buy with Prime Shipping Method ID, enter the identifier for the shipping method for Buy with Prime for your site. The shipping method must match the shipping method configured for Buy with Prime in Salesforce Commerce Cloud.
    • For BwP Target ID, enter the target identifier that is part of your API credentials that you generated in the Buy with Prime merchant console. For details about the API credentials, see Authenticate to the Buy with Prime API.
    • For BWP_Inventory_List_ID, enter the inventory list identifier from Salesforce Commerce Cloud for your inventory records for Buy with Prime.
  4. In the upper right corner, click Save.

Site preferences for the Buy with Prime cartridge

The following table shows the site preferences for the Buy with Prime cartridge in the order in which they appear in the Business Manager tool for Salesforce Commerce Cloud.

Site preferenceDescription, including the label shown in Business Manager
BWP_EnabledBuy with Prime Enabled. Global switch that enables the Buy with Prime features on your site.
BWP_Enabled_Country_ListBWP Enabled Countries. Set of strings where you specify the ISO alpha-2 country code for each country where you want to enable Buy with Prime features.
BWP_ClickstreamBuy with Prime Clickstream. Global switch that enables the clickstream tracking for Buy with Prime.
bwpModebwpMode. String enumeration where you specify whether to use the sandbox mode or live mode of Buy with Prime.
BWP_Payment_ProcessorBWP_Payment_Processor. String enumeration where you specify the payment processor for your site as None, Amazon Pay, or Adyen.
BWP_Shipping_Method_IDBuy with Prime Shipping Method ID. Identifier for the shipping method for Buy with Prime for your site. The shipping method must match the shipping method configured for Buy with Prime in Salesforce Commerce Cloud.
BWP_Enable_EligibilityEnable the Prime Eligibility API service. Switch that enables checking when a shopper logs in to Amazon whether they are a Prime member. When testing your site in a sandbox environment with shoppers who aren't Prime members, consider disabling this service.
BWP_Cart_Button_EnabledCart Button Enabled. Switch that enables the Buy with Prime button in the shopping cart.
BWP_Mini_Cart_Button_EnabledMini Cart Button Enabled. Switch that enables the Buy with Prime button in the miniature cart flyout.
BWP_Cart_Elements_EnabledCart Elements Enabled. Switch that enables the brand assets in the shopping cart, for example the Prime checkmark logo and the delivery estimate.
BWP_PDP_Elements_EnabledPDP Elements Enabled. Switch that enables the brand assets on the product detail page (PDP), for example the Prime checkmark logo and the delivery estimate.
BWP_PLP_Badge_EnabledPLP Badge Enabled. Switch that enables the Prime checkmark logo on the product listing page (PLP) for the products eligible for Buy with Prime.
BWP_API_Max_VariantsMaximum API Batch Variants. Maximum number of variants to prefetch in a bulk call to the deliveryPreview API to cache on the PDP.
BWP_Quick_View_Button_EnabledBuy with Prime Quick View Button. Switch that enables the Buy with Prime button in the quick-view modal window. Clicking the button adds the product to the shopping cart and initiates the Buy with Prime checkout flow.
BWP_Quick_View_Elements_EnabledBuy with Prime Quick View Elements. Switch that enables the brand assets in the quick-view modal window, for example the Prime checkmark logo and the delivery estimate.
BWP_Checkout_Login_EnabledDisplay Buy with Prime button within Checkout Login Step. Switch that enables the Buy with Prime button on the login step in the checkout flow.
BWP_Checkout_Shipping_EnabledDisplay Buy with Prime button within Shipping Step. Switch that enables the Buy with Prime button on the shipping step in the checkout flow.
BWP_Initiate_Fulfillment_Place_Order_EnabledEnable Real-Time Order Updates. Switch that enables calling updateOrder to initiate fulfillment when the shopper places the order. If disabled, the call instead goes to createOrder to reserve the items in a hold state.
AmzBwPTargetIdBwP Target ID. Target identifier that is part of your API credentials generated in the Buy with Prime merchant console at https://console.buywithprime.amazon.com/. For details about the API credentials, see Authenticate to the Buy with Prime API.
bwpTimeoutConfigFront End API timeout JSON. Data in JSON format that specifies the site components with Buy with Prime API calls, and the timeout for each component in milliseconds, as shown in the following example: { "delivery": { "product": 10000, "search": 10000, "cart": 10000 }, "returns": { "product": 5000, "search": 5000, "cart": 5000 } }
sfccOrderDetailsURLSFCC Order Details URL. String to pass to the Buy with Prime API to link to an order that contains a mix of items eligible for Buy with Prime and not eligible for Buy with Prime. Specify the URL that you would give a shopper to view their order details. This field supports passing the order number as {orderNo} within the URL or as a query parameter, for example http://yoursite.com/order/details?orderNo={orderNo} or http://yoursite.com/order/details/{orderNo}.
BWP_Inventory_List_IDBWP Inventory List ID. Inventory list identifier from Salesforce Commerce Cloud for your inventory records for Buy with Prime.

Configure the sign-in experience for your site

You can optionally configure the sign-in experience if you selected None as your BWP_Payment_Processor site preference and want to use your own payment service provider. Use the sign-in experience to display a sign-in card on your site that the shopper can use to sign in with their Amazon account credentials and verify their Prime membership status. The shopper can then place their Buy with Prime order using any payment method available to them on your site. If you use Amazon Pay or Adyen as your payment processor, you can skip the following procedures.

The following sections describe how to configure the sign-in experience for your site.

Set up LWA

The sign-in experience uses Login with Amazon (LWA). To set up LWA, do the following:

  • Create an LWA security profile.
  • Add your website to the LWA security profile.
  • Get your LWA security profile information.
  • Get your Buy with Prime target ID.
  • Register your LWA security profile with the Buy with Prime team.

For details, see Integrate Login with Amazon with Your Site.

Configure LWA site preferences for your PSP

To configure LWA site preferences for your payment service provider (PSP), do the following:

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Merchant Tools menu, choose Site Preferences, and then choose Custom Preferences.
  3. Choose Login_with_Amazon, and then for Login with Amazon Security Profile App Client ID, enter your app client ID.
  4. Choose Save to confirm your changes.

Configure LWA OAuth credentials for your site

To configure LWA OAuth credentials for your site, do the following:

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Administration menu, choose Operations, and then choose Services.
  3. Open the Service Credential associated with the Service Configuration amazon.api.
  4. Enter your Login with Amazon OAuth credentials. For details, see Integrate Login with Amazon with Your Site.
    • For URL, enter https://api.amazon.com.
    • For Username, enter your client ID from Login with Amazon.
    • For Password, enter your client secret from Login with Amazon.

Configure the payment processor for your site

To configure the payment processor for your site, do the following:

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Merchant Tools menu, choose Site Preferences, choose Custom Preferences, and then choose Buy_with_Prime.
  3. For BWP_Payment_Processor, choose None.
  4. Choose Save to confirm your changes.

Configure Reviews from Amazon for a product

To show shoppers reviews from Amazon on the product detail page (PDP), do the following:

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Merchant Tools menu, choose Products and Catalogs, and then choose Products.
  3. Choose Find, and then choose the name of the product for which you want to show reviews from Amazon.
  4. To edit the product, choose Lock.
  5. Under Buy with Prime, for Is Prime Intended?, choose Yes.
  6. Under Buy with Prime, for Show Amazon Reviews?, choose Yes.
  7. Choose Apply.

Configure the styles for your site

Do the following to optionally configure style preferences to customize the appearance of Buy with Prime on your site. For the list of style preferences, see Style preferences for the Buy with Prime cartridge .

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Merchant Tools menu, click Site Preferences, click Custom Preferences, and then click Amazon_BWP_Styles.
  3. Edit the value for the style preference that you want to modify.
  4. In the upper right corner, click Save.

Style preferences for the Buy with Prime cartridge

The following table shows the style preferences for the Buy with Prime cartridge in the order in which they appear in the Business Manager tool for Salesforce Commerce Cloud.

Style preferenceDescription, including the label shown in Business Manager
BwPContainerColorBuy with Prime Container Color. Hex color code or RGB color code for the background color of the HTML div element containing the visual assets for Buy with Prime.
BwPBrandNameBrand name. Brand name to show in the copy displayed for Buy with Prime in the checkout flow, for example Check out using Buy with Prime right here on {BrandName}. If you don't specify a value, the copy refers only to Buy with Prime, for example Check out using Buy with Prime right here.
BwPCornerRadiusButton Corner Radius. Shape of the corners of the Buy with Prime button.
BwPButtonHeightButton Height. Height of the Buy with Prime button, in units of line height.
BwPButtonWidthButton Width. Width of the Buy with Prime button as a percentage of the default size of the button.
BwPDeliveryColorDelivery Date Font Color. Foreground color of the text that shows the delivery estimate.
BwPButtonTransparencyButton Background Transparency. Transparency setting for the background of the Buy with Prime button.
BwPDeliveryDateFontDelivery Date Font. Typeface for the text that shows the delivery estimate.
BwPDeliveryFontSizeDelivery Date Font Size. Font size for the text that shows the delivery estimate, in rem units.
BwpPdpButtonHeightPDP Button Height. Height of the Buy with Prime button on the product detail page (PDP), in units of line height.
BwpPdpButtonTransparencyPDP Button Background Transparency. Transparency setting for the background of the Buy with Prime button on the PDP.
BwpPdpButtonWidthPDP Button Width. Width of the Buy with Prime button on the PDP as a percentage of the default size of the button.
BwpPdpCornerRadiusPDP Button Corner Radius. Shape of the corners of the Buy with Prime button on the PDP.

Configure the services for your site

To communicate with the Buy with Prime API, enter your Buy with Prime API credentials as your service credentials in Salesforce Commerce Cloud. For details about how to generate your API credentials, see Authenticate to the Buy with Prime API. Do the following to configure the auth service, and leave other services unchanged.

  1. Open the Business Manager tool for Salesforce Commerce Cloud.
  2. On the Administration menu, click Operations, and then click Services.
  3. Verify that the Service Configuration previously named amazon.bwp.auth.RefArch is named amazon.bwp.auth.SITE_ID, where SITE_ID is the name of your site in Business Manager. For details, see Install the Buy with Prime Cartridge.
  4. In the Service Credential associated with amazon.bwp.auth.SITE_ID, enter your API credentials from the Buy with Prime merchant console at https://console.buywithprime.amazon.com/.
    • For URL, leave the field blank.
    • For Username, enter your client ID for Buy with Prime.
    • For Password, enter your client secret for Buy with Prime.

Related topics

Install the Buy with Prime Cartridge
Authenticate to the Buy with Prime API