Understand environments
| Environment | Base URL | Usage |
|---|---|---|
| Sandbox | https://api.sandbox.henrylabs.ai/v0 | Development and QA. Mirrors production data models and supports test card numbers. |
| Production | https://api.henrylabs.ai/v0 | Live traffic. Handles real shoppers, merchants, and payments. |
Sandbox requests require sandbox API keys. Production requests require
production keys and operate on live data. Keys are not interchangeable across
environments.
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 email
lawrence@henry.social 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:
/products/searchand/products/detailswith realistic queries to confirm facets and filters. - Cart lifecycle:
/cart/add-items,/cart/get-items, and/cart/delete-single-itemto verify quantities, pricing, and merchant eligibility. - Hosted checkout: Launch
/cart/initiate-checkoutin an iframe or redirect and complete a mock purchase. Inspect the resulting order with/orders/order-status. - Headless checkout (optional): Use
/checkout/session/quoteand/checkout/singlewith bothx-api-key. - Wallet card collection: Call
/wallet/card-collectto ensure your UI can launch the modal and receive themodal_url. - Merchant data: Fetch
/merchants/listand/merchants/shipping-infoto preload brand-specific settings.
3. Validate error handling
Henry Shopping APIs share a common envelope:{ "success": boolean, "status": string, "message": string, "data": { ... } }. Confirm your integration logs the status and message values and gracefully reacts to these scenarios:
Simulating failures in the sandbox now makes it easier to debug production incidents later.
4. Promote to production
- Swap the base URL to
https://api.henrylabs.ai/v0. - Rotate to production
x-api-key. - Replay the smoke tests above with a small allowlisted merchant and shopper cohort.
- Monitor orders in real time with
/orders/order-status.

