Custom Storefronts
Build your own storefront for your Phasio store with the Auth API and the Customer API
A custom storefront is your own website or application for your Phasio store. Your customers use it to upload parts, get prices, place orders, and follow their orders. You control the design and the user experience. Phasio supplies the data, the prices, and the order processing through two APIs.
Is a custom storefront right for you?
Phasio gives you three ways to let customers order from you. A custom storefront gives you the most control, and it is also the most work.
| Option | What you get | Who builds it |
|---|---|---|
| Phasio storefront | A complete storefront that Phasio hosts, with your branding | Nobody. Configure it in the dashboard. |
| Embedded storefront | The Phasio storefront inside a page of your website | You paste an embed code into your website and whitelist your domain. |
| Custom storefront | Your own screens, design, and user experience, with Phasio prices and order processing | A developer. A server is necessary. |
Choose a custom storefront when the Phasio storefront or the embed does not give you the experience that you want.
Who does what
| Task | Who | Where |
|---|---|---|
| Configure the store settings that your storefront reads | Your organisation | Phasio dashboard. Refer to Configure Storefront settings. |
| Create the storefront credentials | Owner or admin of the organisation | Your Phasio account page. Refer to Quick start. |
| Build and host the storefront | Your developer | Your server. Start with the storefront starter. |
How it works
┌──────────────────────────┐
│ Your storefront server │
Customer's browser ─▶│ (holds the credentials) │
└──────┬────────────┬──────┘
│ │
client ID + secret access token
▼ ▼
┌───────────┐ ┌──────────────┐
│ Auth API │ │ Customer API │
└───────────┘ └──────────────┘| API | Purpose | How your storefront authenticates |
|---|---|---|
| Auth API | Signs customers in. Gives access tokens for guests and customers. | Storefront credentials (client ID and client secret), from your server only |
| Customer API | Store settings, parts, prices, carts, orders, payments | The access token, and the X-Store-Name header |
What you need
- A Phasio store, and an account that is an owner or admin of the organisation.
- Your store name: the unique name of your store, as in the URL of your Phasio-hosted storefront. It is case-sensitive.
- The base URLs of the two APIs for your region. Refer to Base URLs.
- A server (or serverless functions) for your storefront. A site that has only browser code cannot keep the client secret safe.
Base URLs
| Region | AUTH_SERVER | API_BASE |
|---|---|---|
| Europe (EU) | https://auth.eu.phas.io | https://c-api.eu.phas.io |
| United States (US) | https://auth.us.phas.io | https://c-api.us.phas.io |
Use the region of your Phasio account. The address of your Phasio dashboard shows it: app.eu.phas.io or app.us.phas.io.
Use the two URLs of one region together. Credentials and tokens from one region do not work in the other region.
Next steps
Quick start
Create credentials, make your first calls, and run the example storefront.
Storefront rules
The store settings, security rules, and API behaviour that your storefront must handle. Includes the go-live checklist.
Authentication
Guest sessions, sign-up, sign-in, access tokens, and rate limits.
Purchase flow
Each call from part upload to a paid order, in sequence.
Customer API reference
All endpoints and data shapes, grouped by topic.
Last updated on