Skip to main content

Customer Authentication

For Storefront endpoints that require customer identity (/customers/me, /orders), customers authenticate via JWT tokens.
For API key types and basic authentication, see the Introduction.

Customer JWT Flow

Step 1. Your server generates a customer token using the Admin API:
Step 2. The response contains a JWT token:
Step 3. Pass this token from the client via the X-Customer-Token header:

Guest Cart

Carts can be created without customer authentication using a session_id:
When a guest customer logs in, merge the guest cart into their account:
See the Cart Merging recipe for a complete implementation.