Introduction
A self-hosted webstore is a store you build and host yourself, on your own domain and in your own framework, that sells through PayNow. It is also called a headless storefront, because it uses the Storefront API without the hosted front end.
Your pages read the catalogue and manage the customer's cart through the Storefront API, open the PayNow checkout when they pay, and PayNow takes it from there.
The hosted webstore gives you the same store with no code, customised through templates. Headless is for when you want the store to be part of a site you already have, or want a design the templates cannot express.
Before you start
- A store with products, tags and at least one delivery method configured in the dashboard. The storefront sells what the dashboard defines.
- An API key for your server. It never reaches the browser.
- A server you control. Even a mostly static site needs one endpoint to sign customers in, because minting a customer token uses the API key.
- Node.js 20.3 or newer if you want the TypeScript SDK. Any language can call the REST API directly.
The guides
Read them in order the first time. Each one stands on its own after that.
Building a Storefront
The map: credentials, which API each side calls, and the build order.
Signing Customers In
Steam OpenID and Minecraft usernames, and how each becomes a customer token.
Carts and Checkout
Prices, cart lines, checkout sessions, and opening the checkout by redirect or embedded with PayNow.js.
Gifting
Buying for another player - the gift parameters and the rules around them.
Account Pages
Profile, active items, subscriptions with cancel, and order history.
API Behaviour Notes
Rules the endpoint reference leaves implicit: products first, mixed lines, delivery items, and which API is safe to expose.