> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.scripe.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Service unavailable

# `service_unavailable`

| HTTP | When                                                          |
| ---- | ------------------------------------------------------------- |
| 503  | A downstream subsystem (DB, Redis, audit buffer) is degraded. |

The Scripe API depends on PlanetScale (DB), Upstash Redis (cache + rate
limit + audit buffer), and a few other downstreams. When one of them is
unhealthy enough that we can't safely serve a request, we return 503.

Most often this is the public health probe surfacing the issue:

```bash theme={null}
curl -i https://api.scripe.io/v1/health
# → 503 with status: "degraded"
```

To recover:

1. Treat 503 as **transient**. Retry with exponential backoff (e.g.
   start at 1 s, cap at 30 s).
2. Check [status.scripe.io](https://status.scripe.io) for ongoing
   incidents.
3. If your retry loop has been failing for more than a few minutes and
   the status page is green, capture a `request_id` and contact
   support.

We deliberately fail closed instead of returning misleading 200s when a
core dependency is unhealthy.
