Skip to main content
Henry provides parallel sandbox and production environments so you can build confidently before you ship to real buyers. Follow the steps below to configure the Henry Shopping SDK, test critical flows, and complete the production launch checklist.

Understand environments

EnvironmentHenry Shopping SDK configurationUsage
Sandboxenvironment: "sandbox"Development and QA. Mirrors production data models and supports test card numbers.
Productionenvironment: "production"Live traffic. Handles real shoppers, merchants, and payments.
Configure your backend Henry Shopping SDK client with the appropriate API key and set the environment flag to match the target environment.

1. Configure credentials

1

Create sandbox API key

Generate a key from the Henry Sandbox Dashboard. Scope it to the services you plan to test.
2

Set up user tokens

Endpoints that manage user state or checkout sessions require both an x-api-key along with a stable x-user-id.
3

Request production access

When you’re ready to go live, contact your Henry representative or contact us for production credentials. Rotate the values in your secrets manager without redeploying code.

2. Exercise core scenarios

Run through the flows below using sandbox credentials before you promote:
  • Product discovery: Exercise client.products.search and client.products.retrieveDetails with realistic queries to confirm filters, variant data, and catalog coverage. Capture representative sandbox responses so you can compare payload structures after the production cutover.
  • Cart lifecycle: Validate client.cart.items.add, client.cart.items.list, client.cart.items.remove, and client.cart.items.clear. Check that totals, quantities, and optional variant checks update as expected and that idempotent retries behave gracefully.
  • Hosted checkout: Launch client.cart.createCheckout in an iframe or redirect, walk through a sandbox purchase, and record the resulting order ID. Use client.orders.retrieveStatus to confirm the order progresses through expected fulfillment states.
  • Headless checkout (optional): Walk the full flow with client.checkout.session.createQuote, client.checkout.session.listProducts, and client.checkout.session.confirmCheckout. Pass both x-user-id and the returned session_token, and make sure you persist those identifiers long enough to retry confirmation.
  • Wallet card collection: Trigger client.wallet.createCardCollection and ensure your UI properly renders the hosted modal and handles the returned modal_url lifecycle.
  • Merchant data: Fetch client.merchants.listSupported() and client.merchants.getShippingInfo() to preload brand-specific settings, shipping expectations, and pagination edge cases ahead of production.
Document each request and response so you can compare sandbox versus production during rollout.

3. Validate error handling

Henry Shopping SDK responses share a common envelope: { success, status, message, data }. Confirm your integration logs the status and message values, inspects success before using payloads, and surfaces helpful recovery messaging whenever a call fails. Simulating failures in the sandbox now makes it easier to debug production incidents later.

4. Promote to production

  1. Instantiate the SDK with production credentials (apiKey + environment: "production").
  2. Rotate to production API key values in your secrets manager.
  3. Replay the smoke tests above with a small allowlisted merchant and shopper cohort using the same SDK helpers.
  4. Monitor orders in real time with client.orders.retrieveStatus(orderId).
Need help validating your integration? Contact us and we’ll review your sandbox results.