Introducing our brand new Rules Engine —
Read the docs
LogoLogo
Core APIOther APIsChangelog
How-tos
How-tos
  • Introduction
  • Product discovery
    • Product listing page
    • Product page
  • Placing orders
    • Shopping cart
      • Creating a shopping cart
      • Adding products to cart
      • Updating cart quantities
      • Removing products from cart
      • Displaying the cart summary
    • Checkout
      • Adding the customer
      • Adding a billing address
      • Adding a shipping address
      • Selecting a shipping method
      • Selecting a payment method
      • Adding a payment source
      • Adding a gift card or coupon
      • Placing the order
    • Subscriptions
      • Configuring a subscription model
      • Selecting the source order
      • Generating the subscriptions
      • Updating the subscriptions
    • Payments
      • Adyen
        • Adding the payment source
        • Sending back the payment details
        • Configuring the notification webhooks
        • Reusing the payment source
      • Axerve
        • Adding the payment source
        • Updating the payment intent
      • Braintree
        • Adding the payment source
        • Sending back the payment method nonce
        • Accepting local payments
        • Reusing the payment source
      • Checkout.com
        • Adding the payment source
        • Getting the payment details
        • Refreshing pending transactions
        • Reusing the payment source
      • Klarna
        • Adding the payment source
        • Sending back the authorization token
        • Reusing the payment source
      • PayPal
        • Adding the payment source
        • Preparing the payment for execution
      • Stripe
        • Adding the payment source
        • Refreshing the payment source
        • Reusing the payment source
      • Manual payments
        • Adding a wire transfer payment source
      • External payments
        • Adding the payment source
        • Reusing the payment source
    • Auto-capture
      • Enabling the auto-capture
      • Limiting the auto-capture amount
  • inventory
    • Inventory strategies
      • No split
      • Split shipments
      • Split by line items
      • Ship from first available (or primary)
      • Ship from primary
  • FAQ
    • Environments and initial setup
    • Authentication and access tokens
On this page
  • Documentation references
  • Frequently asked questions
  1. FAQ

Environments and initial setup

Frequently asked questions about Commerce Layer's environments, how to switch between them, and anything related to an organization's initial setup

PreviousShip from primaryNextAuthentication and access tokens

Last updated 6 months ago

Documentation references

Check our documentation for more information about this topic:

Frequently asked questions

How many environments does an organization have in Commerce Layer?

Each organization has a test and a live environment. The test environment is available for free to anyone. The live environment is reachable only after subscribing to a .

Do test and live environments communicate? How does the toggle button work?

The two environments are completely independent and separated. They do not communicate with one another. There is no automatic way (yet) to keep them aligned.

The toggle button in the Dashboard allows you to switch from one environment to the other, meaning that it's meant to switch the data you see in the Dashboard from test environment data to live environment data. Therefore, switching the toggle off does not switch off your production environment, it only drives you to test settings and configurations.

How can I keep the two environments aligned?

All the configurations done in your test environment should be replicated in the live environment. Most of the resources can be from one environment into the other.

We suggest you leverage the code field of , , , and to facilitate the data import. If you use the ID of a resource, keep in mind that it will change from test to live, therefore you will have to adjust your code/import accordingly. If you use the code instead, you can keep the same configuration/request both in frontend and backend imports/jobs.

Can I import archived orders?

If you need to, you can import your old orders in Commerce Layer. For non-enterprise clients, they will be counted as normal orders. Enterprise clients can import orders from 12 months prior to the go-live date at no additional costs. Any other order will be charged as specified in your Master Service Agreement (MSA).

When importing orders, make sure to check the first and remember that imports are subject to some limits:

  • If an import gets more than 10% of errors, it will be interrupted.

  • Each import can include a maximum of 10000 items.

  • A maximum of 10 concurrent imports in total (counting both test and live environments) are allowed.

We suggest importing orders that are approved, archived and paid to make sure to skip any validity check. In this way, it will also be possible to import orders associated with SKUs that do not exist in Commerce Layer.

Can I capture imported orders?

For security reasons, it's not possible to import authorized payments and then capture them in Commerce Layer.

Orders that have been authorized in the old system will have to be captured in the old system or directly via the related payment gateway dashboards or admin UI. Once the payment is captured or partially/totally refunded, the order status should be updated accordingly in Commerce Layer.

Can I import returns?

We recommend not to import returns. We suggest using the order's metadata to store information about the line items that have been returned and/or refunded for each order, especially if you just need this information for populating the user "My account" page of your website or similar purposes.

If you need to import returns for different reasons, you'll have to create them one by one in Commerce Layer.

Are there restrictions on the payment gateway credentials between the environments?

Every payment gateway must be set up in test and live mode separately using the appropriate credentials. Successful testing in a test environment does not guarantee that the payment process is correctly configured in the related live environment too.

We recommend testing your integration properly both in test and live mode carefully checking the full order cycle (from order placement to refund creation and management, taking into account all the necessary operations and transactions, voids and cancellations included).

plan
imported
technical documentation
markets
SKUs
stock locations
shipping categories
Cover

Test and live environments

Cover

Importing resources