Connect your Project to InStore by creating one or more Composable Commerce API Clients.
Use API Clients to connect the following to your Composable Commerce Project:
- Your InStore environment hosted by commercetools.
- Your in-store application that you build and host. This can be your own application or the InStore colleague app.
This guide helps you create two API Clients:
- An API Client to give the InStore core application access to your Project for performing core payment operations. This client handles calls to allow your frontend application to retrieve a cart, create a payment, and attach a payment to the cart. This client is needed for all deployments.
- One or more separate API Clients to give the InStore core application access to your Composable Commerce Project for performing other colleague app operations.
Create these API Clients for each InStore tenant environment with an integration server. You might need additional API Clients for additional functionalities.
Create the API Clients
-
Create an API Client with the required scopes for InStore:
- For the API Client that performs core payment functions, use the scopes listed in Scopes for core payment functions.
- For the API Client that performs other colleague app functions, use the scopes listed in Scopes for other InStore functions.
For security, we recommend granting only the necessary scopes.
-
On the Project Settings tab of the Environment page in the InStore Center, add your connection credentials (the
Client ID
andClient Secret
values generated by Composable Commerce) and the scopes that you used in the API Client.You cannot edit an existing API Client. Every time you alter your Project connection information, you must delete the old API Client and create a replacement API Client to reflect the change.
-
Add the same connection credentials to the relevant environment variables in your integration server.
Scopes for core payment functions
Use the following scopes for the API Client that connects to the InStore core functionality:
manage_orders
manage_payments
view_customers
view_types
Scopes for other InStore functions
Use the following scopes for the API Client that connects to your in-store application:
manage_shopping_lists
manage_orders
manage_payments
manage_customers
view_categories
view_customer_groups
view_discount_codes
view_published_products
view_shipping_methods
view_stores
The listed
manage_*
scopes are the only manage_*
scopes necessary for InStore. For information about scope syntax, see Scopes.