402 is not an error. It’s the payment step — always retry with a payment
credential.Base URL
Overview
| Step | Request | Response |
|---|---|---|
| 1. Create order | POST /v1/translate — no Authorization header | 402 Payment Required + WWW-Authenticate: Payment challenge |
| 2. Pay | Decode the charge, get a payment token from your MPP provider, build the credential (base64url) | — (handled by the provider) |
| 3. Retry | POST /v1/translate — same body + Authorization: Payment <credential> | 200 OK + order IDs + Payment-Receipt |
| 4. Poll | GET /v1/orders/{id} — repeat every ~10s | status: QUEUE → IN_PROGRESS → DONE; target_text when DONE |
The retry body must be byte-for-byte identical to step 1 — the server
checks the SHA-256 digest from the challenge.