Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Revenue
Platforms and marketplaces
Money management
Developer tools
Overview
Versioning
Changelog
Upgrade your API version
Upgrade your SDK version
Developer tools
SDKs
API
Testing
Workbench
Event Destinations
Workflows
Stripe CLI
Stripe Shell
Developers Dashboard
Agent toolkit
Build with LLMsStripe for Visual Studio CodeStripe health alertsFile uploads
Security and privacy
Security
Privacy
Extend Stripe
Stripe Apps
Stripe Connectors
    Overview
    Integrate a connector
    Commercetools
      Install checkout connector
      Install composable commerce connector
    Adobe Commerce
    Mirakl
    NetSuite
    Oracle Opera
    Cegid
    PrestaShop
    Salesforce
    SAP
    Shopware 6
    Stripe Tax for WooCommerce
    Stripe Tax for BigCommerce
    Partner connectors
    Build your own connector
Partners
Partner ecosystem
Partner certification
HomeDeveloper toolsStripe ConnectorsCommercetools

Install and configure the Stripe Payment Composable Connector for Commercetools

Learn how to set up your Commercetools merchant centre to install the composable connector.

Copy page

Integrate Stripe with the Commercetools composable commerce to create a custom checkout workflow that supports your business requirements and commerce storefront.

Connector listing in Commercetools Merchant Center

Before you begin

Before you install the Stripe Payment Composable Connector:

  1. Identify the organisation and project in your Commercetools instance where you want to install the connector.
  2. Prepare to install and configure the connector directly from your Commercetools instance.

Install the Stripe Payment Connector

  1. From the Connect Marketplace in your Commercetools instance, select the Stripe Payment for Composable Commerce.
  2. On the Commercetools configuration page, select the region, organisation, and projects in which to install the connector.
  3. Next, provide your environment variables and configuration details.
  4. In the Stripe Dashboard, create a webhook with a test transaction URL and copy the webhook signing secret. The test transaction URL automatically updates through a post-deploy script with the correct URL upon successful authentication.

Configure the Stripe Payment Connector

Use the following installation variables to configure the connector.

VariableDescription
CTP_API_URLThe URL for the Commercetools composable commerce API. The default value is https://api.europe-west1.gcp.commercetools.com.
CTP_AUTH_URLThe URL for authentication in the Commercetools platform that’s used to generate an OAuth 2.0 token. Every API call to the Commercetools composable commerce requires an OAuth 2.0 token. The default value is: https://auth.europewest1.gcp.commercetools.com.
CTP_CLIENT_IDThe client ID of your Commercetools composable commerce user account. The Commercetools client uses the client ID to communicate with the Commercetools composable commerce through the SDK.
CTP_CLIENT_SECRETThe client secret of the Commercetools composable commerce user account. The Commercetools client uses the client secret to communicate with the Commercetools composable commerce through the SDK.
CTP_JWKS_URLThe URL that provides the JSON Web Key Set.
CTP_JWT_ISSUERThe issuer in the JSON Web Token that’s required for the JWT validation process.
CTP_PROJECT_KEYThe key for the Commercetools composable commerce project.
CTP_SCOPEThe scope defines which endpoints the Commercetools client can access and has read and write access to.
CTP_SESSION_URLThe URL for session creation in the Commercetools platform. Connectors rely on the created session to share information between the enabler and the processor. The default value is https://session.europewest1.gcp.commercetools.com.
STRIPE_APPEARANCE_EXPRESS_CHECKOUTStripe Elements supports visual customisation, allowing you to use the appearance option to match the design of your site. This value defines the appearance of the Express Checkout Element.
STRIPE_APPEARANCE_PAYMENT_ELEMENTStripe Elements supports visual customisation, allowing you to use the appearance option to match the design of your site. This value defines the appearance of the Payment Element.
STRIPE_CAPTURE_METHODThe Stripe capture method (manual or automatic). The default value is automatic.
STRIPE_SECRET_KEYStripe authenticates API requests using your account’s API keys. We recommend creating a restricted access key, instead of using the default secret API key.
STRIPE_WEBHOOK_IDThe Stripe unique identifier for webhook endpoints.
STRIPE_WEBHOOK_SIGNING_SECRETThe Stripe secret key that’s used with official libraries to verify webhook signatures. This key is created in the Stripe Dashboard.

The payment connector creates two main links:

  • Payment Connector JS Enabler Component: The URL where the payment components are embedded (for example, https://assets-{{uuid}}.assets.uscentral1.gcp.preview.commercetools.app/connector-enabler.es.js)
  • Payment Connector Processor: The URL where all webhooks are sent and transformed into payment transactions in Commercetools (for example, https://service-{{uuid}}.uscentral1.gcp.preview.commercetools.app)

Extend the payment integration

If you want to build and extend the existing payment integration to meet your specific needs:

  1. Use the connector codebase available on GitHub.
  2. Deploy the connector locally.
  3. Update the .env configuration in both the processor and enabler.

By choosing this path, you’re responsible for the deployment and configuration of the connector.

General settings

You can modify the capture mode (manual or automatic) of components generated by the Payment Connector Enabler in the payment connector configuration. The enabler manages the payment components connected to the Payment Connector Processor. The processor creates the Payment Intent in Stripe with the respective metadata, and converts webhook events into payment transactions in Commercetools.

You can modify the appearance of the Stripe Payment Element and Express Checkout Element from the Stripe Payment Connector configuration.

Webhooks

Stripe uses webhooks to notify your application when an event occurs in your account. Webhooks are useful for updating payment transactions when a customer’s bank confirms or declines a payment, or when the payment is canceled or refunded. We support the following webhooks:

Event TypeDescription
charge.refundedIf charge.captured is true, add a Refund:Success transaction to the payment in Commercetools.
charge.succeededIf the payment hasn’t been captured, create a payment in Commercetools. If the payment was made, add an Authorization:Success transaction to the payment in Commercetools.
payment_intent.canceledAdd a CancelAuthorization:Success transaction to the payment in Commercetools.
payment_intent.payment_failedLogs the information in the processor logs in the connector app.
payment_intent.requires_actionLogs the information in the processor logs in the connector app.
payment_intent.succeededYou can handle this event using one of the following capture methods:
  • Automatic: If paymentIntent.capture_method is automatic, create a payment in Commercetools, and add a Charge:Success transaction to it.
  • Manual: If paymentIntent.capture_method is manual, add a Charge:Success transaction to the payment in Commercetools.

Changelog and accessing code

You can monitor changes and upgrades to the connector from the Github repo.

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc