Corvane

Paying per call

Corvane uses HTTP status 402, Payment Required, so an agent can discover the price of a call and pay for it in the same exchange, without an account.

The exchange

  1. The agent calls a paid endpoint with no Authorization header and no payment.
  2. Corvane answers 402 with the price and how to pay, in two formats: x402 terms in the JSON body, and an MPP challenge in the WWW-Authenticate: Payment header. The agent uses whichever its wallet supports.
  3. The agent pays and repeats the same request with the proof: an X-PAYMENT header for x402, or Authorization: Payment <credential> for MPP.
  4. Corvane checks the proof and answers 200 with the data.

What a 402 looks like

HTTP/1.1 402 Payment Required
WWW-Authenticate: Payment id="...", realm="...", method="test", intent="charge", request="..."

{
  "x402Version": 1,
  "error": "X-PAYMENT header is required",
  "accepts": [{"scheme": "exact", "maxAmountRequired": "20000", "resource": ".../v1/companies", "...": "..."}],
  "message": "Test terms only: USD 0.02 per call ..."
}

maxAmountRequired is in the asset's smallest unit (six decimals), so 20000 is USD 0.02. Read the terms from each response rather than hard-coding them, because the receiving details can change.

Test terms

The terms this API returns today are test terms. Payments made against them do not settle and no data is sold for value; a request with a payment header receives a test response. Use them to build and check your agent's payment flow.

Calls that are free

GET /v1/pricing returns the current price list and never asks for payment. Calls sent with a valid API key are billed to that key's plan and never receive a 402.

Prices

See pricing. The price in a 402 response always matches the published price list.