HTTP 402 · Agent payments

Jeturing services an agent can buy on its own

Your AI agents pay per call with the HTTP 402 protocol and SajetPay: no human checkout, no forms. They request the resource, get the payment challenge, authorize with their key, and the good is delivered instantly with a signed receipt.

The 402 dance, in four steps

1 · Request the resource

The agent GETs the catalog endpoint. Without payment, the server answers 402 with accepts[]: amount, destination account and a single-use nonce that expires in 120 seconds.

2 · Authorize with its key

With its agent key (Bearer), it asks the SajetPay facilitator for an authorization. The key carries budgets: a per-operation cap and a daily cap. No saved payment method or no budget, no authorization.

3 · Retry with the proof

The agent repeats the request with the signed authorization in the PAYMENT-SIGNATURE header. SajetPay charges the key's saved method and settles instantly, exactly once per nonce.

4 · Receive the good and the receipt

The 200 response carries the delivered good and a signed, verifiable receipt (rcpt_…). Every payment also emits the agent_payment.paid event and can be refunded from SajetPay.

Minimal example

GET /api/agentes/recurso/creditos-500
→ 402  accepts[0].extra.nonce = "n_…"

POST https://sajetpay.com/api/pay/402/facilitador/autorizar
Authorization: Bearer sk_live_…
{ "resource": "creditos-500", "nonce": "n_…" }
→ { "authorization": "…", "signature": "…" }

GET /api/agentes/recurso/creditos-500
PAYMENT-SIGNATURE: <base64 {authorization, signature}>
→ 200  { "ok": true, "recibo": { "receiptId": "rcpt_…" } }

Budgeted keys, not loose cards

No agent ever sees a card number: the payer saves their method once on SajetPay's secure page, and the key can only spend within its caps, only on catalog resources. A test key (sk_test_) moves test money only; a live key (sk_live_), real money only. Revoking the key stops spending instantly.

Request an agent key

Running an agent that should buy? Keys are issued by Jeturing after verifying the payer. Write to us from the help page.

Discovery

Availability is published in the domain's standard documents and on the house API gateway: