Skip to main content
When you need to close your web shop, for example while your game servers are down, switch it into maintenance mode from your game server. Players see the web shop’s maintenance screen instead of the shop until you switch it off. They stay signed in.

What players see and when

The two-minute bound also covers a page that is still waiting to reload after an earlier catalog refresh for every player. When you switch maintenance mode off, players on the maintenance screen see the shop again when they reload the page or return to it.
Use maintenance mode to close the shop. A catalog refresh for every player refreshes the catalog but does not close the shop.

Authenticate the request

Both endpoints are server-to-server and accept HMAC signatures only. Sign each request with your ingress secret in the x-stash-hmac-signature header, as described in HMAC signing:
  • For POST, sign the exact body bytes you send.
  • For GET, sign an empty body: the signed string is "<unixMillisTimestamp>.".
The deprecated X-Stash-Api-Key header is not accepted on these endpoints. The call always applies to the web shop of the app named in the signature.

Switch maintenance mode on or off

Call Set maintenance mode (POST /sdk/server/shop/maintenance) with enabled set to true to switch it on, or false to switch it off.
Stash returns the resulting state. since is the time maintenance mode was switched on, in RFC 3339 format:
While maintenance mode is off, since is null:
enabled is required. A request without it, including an empty body, {} or a misspelled field name, is refused with 400 and changes nothing. The call is idempotent, so retries are safe:
  • Switching on a shop that is already in maintenance mode succeeds and keeps the original since.
  • Switching off a shop that is not in maintenance mode succeeds and changes nothing.

Read the current state

Call Get maintenance mode (GET /sdk/server/shop/maintenance). The response has the same shape as the one above.

Call limits

Limits are counted per shop, in 60-second windows. Every authenticated call counts, including one refused with 400. Above the limit, Stash returns 429 with a RetryInfo detail whose retryDelay says how long to wait until the window ends, for example:
A maintenance window needs two calls: one to switch on and one to switch off. Retry with backoff and wait for retryDelay after a 429; do not retry in a tight loop. If your server spends all 10 Set maintenance mode calls in a window, a call to switch maintenance mode off is refused until the window ends.
Web shop maintenance mode is separate from launcher maintenance mode. Switching one does not affect the other.