Documentation Index
Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Customers interact with your store through the Store API. They can register, log in, manage their profile, and view order history.Registration
Login
token and a user object. Pass the token in subsequent requests via the Authorization: Bearer <token> header.
Token Refresh
Refresh an expiring token to keep the session alive:Password Reset
Password reset is a two-step flow. First, request a reset email. Then, use the token from the email to set a new password.Step 1: Request Reset
redirect_url parameter specifies where the password reset link in the email should point to. The token will be appended as a query parameter (e.g., https://myshop.com/reset-password?token=...). If the store has Allowed Origins configured, the redirect_url must match one of them.
This fires a customer.password_reset_requested event with the reset token in the payload. If you’re using the spree_emails package, the email is sent automatically. Otherwise, subscribe to this event to send the reset email yourself (see Events).
Step 2: Reset Password
Spree::Config.customer_password_reset_expires_in) and is single-use (changing the password invalidates it).
Customer Profile
Customer Resources
Authenticated customers have access to these resources:| Resource | Description |
|---|---|
| Addresses | Billing and shipping addresses with default selection |
| Orders | Past order history |
| Credit Cards | Saved credit cards for checkout |
| Payment Sources | Other saved payment methods (PayPal, Klarna, etc.) |
| Store Credits | Balance assigned by the store, usable at checkout |
| Gift Cards | Gift cards owned by or assigned to the customer |
| Wishlists | Saved product lists |
Guest Checkout
Customers don’t need to register to purchase. Guest checkout uses an order token (X-Spree-Token) to identify the cart. See Orders — Cart for details.
Related Documentation
- Addresses — Customer address management
- Orders — Order history and checkout
- Authentication — Custom authentication setup
- Staff & Roles — Admin users and permissions

