Authorization
SchemeNIP-98 (kind 27235)
Bindsmethod + URL + body hash
HeaderAuthorization: Nostr <base64>
Signerseller or buyer pubkey
Developer reference
Your storefront owns checkout. BitUnlock owns payment verification and private delivery. Every protected call is a NIP-98 signed request \u2014 no API keys.
Full request/response shapes live in the OpenAPI contract.
| Method | Path | Actor | Purpose |
|---|---|---|---|
| GET | /health | public | Liveness + signed-policy status. |
| GET | /.well-known/bitunlock.json | public | Signed service policy for discovery. |
| GET | /openapi.json | public | OpenAPI 3.1 contract. |
| POST | /v1/tenants | seller | Create or update the store account; accept policy + fee cap. |
| POST | /v1/wallet-connections | seller | Register a receive-only NWC connection (encrypted at rest). |
| POST | /v1/products | seller | Register an encrypted delivery payload against a signed product. |
| POST | /v1/products/:coord/revoke | seller | Disable or rotate a delivery payload. |
| POST | /v1/quotes | buyer | Create an immutable 2-leg payment plan (seller, BitUnlock). |
| GET | /v1/orders/:id | buyer | Authorized order + settlement status. |
| POST | /v1/orders/:id/refresh | buyer | Replace only expired, unpaid legs. |
| POST | /v1/orders/:id/unlock | buyer | After all legs settle, return the idempotent NIP-44 envelope. |