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

# Payment Handler

> Web Payment Handler API endpoints for HyperAuth — the payment service worker, the user-facing confirmation page, and the payment method manifest.

These endpoints support the [Web Payment Handler API](https://www.w3.org/TR/payment-handler/).

## `GET /pay/sw.js`

Returns the payment service worker JavaScript file. Sets `Service-Worker-Allowed: /pay/` to authorize the service worker scope.

## `GET /pay/confirm`

Returns the payment confirmation HTML page (`/pay/confirm.html` from the static `ASSETS` binding).

## `GET /pay/manifest.json`

Returns the Web App Manifest for the payment handler.

## `GET /pay/payment-method.json`

Returns the payment method manifest. Declares a single `webapp` application pointing to `/pay/manifest.json`.

```json theme={null}
{
  "default_applications": [
    { "platform": "webapp", "manifest_url": "/pay/manifest.json" }
  ]
}
```

## `GET /.well-known/payment-method-manifest`

Redirects (`302`) to `/pay/payment-method.json`.
