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 plan.
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 concurrentimports 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).