Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management

Install the Stripe Connector for Salesforce Order Management

Set up and configure the Stripe Connector.

Before installing the Salesforce Order Management Connector

  1. Identify the organization and B2C Commerce store in your Salesforce instance where you want to install and map the connector.
  2. Review the entitlements and prerequisites before starting the installation process.
  3. Note the integration limitations:
    1. Supports only a single B2C storefront
    2. Supports one time manual capture only
    3. Doesn’t support complex scenarios like over-capture and multi-capture

Installation

To learn more about integrating with Salesforce Order Management, contact Stripe support.

Make sure Install for Admins Only is selected, then click Install.

Approve access to and from third-party websites. Check the grant access checkbox and click Continue.

If the installation takes time, you will receive an email telling you the package is installed.

To verify, navigate to Setup > Apps > Packaging > Installed Packages and make sure the package is installed.

Configuration

Instructions in the following sections detail how to configure your integration.

Configure a Stripe Synchronous Payment Gateway Adapter

  1. Follow the instructions in step 3 of Set Up a Synchronous Payment Gateway Adapter in Salesforce to create a payment gateway provider. Here’s the set of values we recommend for the payload:

    { "ApexAdapterId": "Output of this Query: SELECT Id FROM ApexClass WHERE Name IN ('StripeAdapter')", "DeveloperName": "StripeProvider", "MasterLabel": " StripeProvider", "IdempotencySupported": "No", "Comments": "Stripe Synchronous Payment Gateway Adapter" }
  2. Follow the instructions in step 4 of Set Up a Synchronous Payment Gateway Adapter in Salesforce to create a payment gateway record.

    Recommended values:

    Field LabelValue
    NameSALESFORCE_PAYMENTS
    Merchant Credential IDOutput of this query: SELECT Id FROM NamedCredential WHERE DeveloperName = 'StripeAPI'
    Payment Gateway ProviderOutput of the query (modify the query accordingly if your Stripe Synchronous Payment Gateway Provider is different than ‘StripeProvider’): SELECT Id FROM PaymentGatewayProvider WHERE DeveloperName ='StripeProvider'
    StatusActive

Configure a Stripe Asynchronous Payment Gateway Adapter

  1. Follow the instructions in Set Up an Asynchronous Payment Gateway Adapter in Salesforce to configure the Stripe Asynchronous Payment Gateway Adapter (skip step 2 and 3 if you’ve already executed the same for the Stripe Synchronous Payment Gateway Adapter). To create an asynchronous Payment Gateway Provider (follow step 4 from the previously linked instruction). Here is the recommended set of values for the payload:

    { "ApexAdapterId": "Output of this Query: SELECT Id FROM ApexClass WHERE Name IN (‘StripeAsyncAdapter’)", "DeveloperName": "StripeAsyncAdapter", "MasterLabel": " StripeAsyncAdapterProvider ", "IdempotencySupported": "No", "Comments": "Stripe Asynchronous Payment Gateway Adapter" }
  2. Follow the instruction from step 5 (Create a payment gateway record) in Set Up an Asynchronous Payment Gateway Adapter in Salesforce to register the Stripe Asynchronous Payment Gateway record in Salesforce.

    Here are the recommended values for the fields to be inserted (if you’re creating a gateway record for the first time) or updated (if you have already created a gateway record while setting up the synchronous payment gateway adapter)

    Field LabelValue
    NameSALESFORCE_PAYMENTS
    Merchant Credential IDOutput of this query: SELECT Id FROM NamedCredential WHERE DeveloperName = 'StripeAPI'
    Payment Gateway ProviderOutput of the query (modify the query accordingly if your Stripe Synchronous Payment Gateway Provider is different than ‘StripeProvider’): SELECT Id FROM PaymentGatewayProvider WHERE DeveloperName ='StripeAsyncAdapter'.
    StatusActive
  3. Follow the instructions in step 6 to configure the webhook URL for Stripe. The typical format of the webhook URL is a publicly accessible, HTTPS URL. For example: https://mydomainname.my.salesforce-sites.com/subdomain/services/data/v[Replace_ME_version]/commerce/payments/notify%20?provider=<ID>

    SELECT Id FROM PaymentGatewayProvider WHERE DeveloperName = ‘StripeAsyncAdapter’

    [Replace_ME_version] with the API version of your org 49.0 and later

  4. Follow these steps to register your webhooks URL in Stripe:

    1. Log in to the Stripe Dashboard.
    2. Go to the Webhooks tab in Workbench.
    3. Click Create new endpoint.
    4. Add the following event types: charge.refunded, charge.succeeded, charge.captured, then click Continue.
  5. Enter your webhooks URL, then click Create destination.

  6. Copy your webhook signing secret and save it for later use.

Complete the configurations using Stripe OM Setup

Instructions in the following sections detail how to complete the configuration of your integration.

Authorize the Stripe OMS Connector with your Stripe Account

In your Salesforce Order Management org, go through the Stripe Setup Assistant to connect your org to your Stripe account.

  1. Click the App Launcher, then click View All.

  2. Click Stripe OM Setup.

  3. Click Get Started.

  4. Toggle live mode. We recommend leaving live mode disabled to test your Stripe integration without affecting your live data, and activating live mode when you’re ready to start processing real transactions with the Stripe Payment Gateway. Come back to this step and reauthorize your connection to switch between test mode and live mode. If you’re in live mode and you want to switch back to test mode, you don’t need to re-authorize.

  5. Click Authorize.

    This allows Salesforce to access your Stripe data so you can capture and refund payments. The Stripe website opens to complete the authorization process, which might require you to enter login information or activate your Stripe account. When done, you’re redirected to this page to finish the setup process. After authorization is complete and successful, the following message displays:

    Store the webhook signing secret for Stripe asynchronous payment processing.

    1. Add the webhook signing secret value in Signing secret.
    2. Click Update.
    3. A message appears on top to confirm successful insertion. Click Finish.

Modify existing order management flows

The authentication with Stripe is using OAuth, where Stripe is the OAuth provider. Salesforce doesn’t support Stripe as an OAuth provider, therefore the OAuth token is obtained using a custom integration, leveraging an invocable action getAccesToken. This is packaged as part of the Stripe OM Connector Managed Package.

Identify the flow that initiates the payment or refund to Stripe and include the getAccessToken invocable method in an action just before the Ensure Funds action in the flow (as shown in the following example). The flows that you need to modify varies from the one shown in the following example.

  1. Navigate to Setup > Process Automation > Flows.
  2. Select the active Flow to use to capture funds.
  3. Create a new Action that calls the getAccessToken invocable method.
  1. Make sure that the Get Access Token action occurs before the Capture Funds action. After it completes, save a new version of this Flow to make sure that your processes use the new version.
  1. You can now use Stripe Payment as a payment method in your Order Management org. You can now place orders from Salesforce B2C Commerce Cloud and complete transactions, such as capture and refund transactions for payment methods that are associated with Salesforce commerce payments.

Next steps

  • Operations and Maintenance
  • Testing
Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access program.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc