Authentication model
WURK endpoints in this docs set use payment-based authentication:- x402 routes (
/{network}/*) usePAYMENT-SIGNATUREon paid retry - MPP routes (
/mpp/*,/mpp-solana/*) useAuthorization: Payment ...on paid retry
x402 flow
First request (no payment header)
Call a paid endpoint like:Response:
- HTTP
402 Payment-Required(orPAYMENT-REQUIRED) response header- Payment requirements in
accepts[]
MPP flow
First request (no Authorization)
- HTTP
402 WWW-Authenticate: Payment ...application/problem+jsonbody (type,title,status,detail, optionalchallengeId)
Header reference
| Rail | Initial request | Retry request |
|---|---|---|
| x402 | No payment header | PAYMENT-SIGNATURE: ... |
| MPP / MPP Solana | No Authorization | Authorization: Payment ... |
Common payment-related statuses
| Status | Meaning | Action |
|---|---|---|
402 | Payment challenge or payment verification failed | Rebuild payment using latest challenge |
409 | Similar paid/open job already exists | Reuse existing job reference instead of re-paying |
200 + alreadyConfirmed | Idempotent paid state | Treat as success |
Legacy and internal notes
- Public
/{network}/*x402 routes usePAYMENT-SIGNATURE(v2). - Some legacy/internal test flows may still show
X-PAYMENT; do not copy that header into public integrations.
Quick questions
- Can I reuse an old challenge? Prefer a fresh challenge for each paid retry window.
- Can I mix x402 and MPP headers? No, use rail-specific headers only.
- What if retry still returns 402? Re-parse the latest challenge and rebuild payment proof.
Discovery links
- x402 resource discovery:
https://wurkapi.fun/.well-known/x402 - Tempo MPP OpenAPI:
https://wurkapi.fun/openapi.json - Solana MPP OpenAPI:
https://wurkapi.fun/openapi-mpp-solana.json
