Authentication for the Agent service is per-endpoint:
Endpoint
Authentication
POST /api/v6/pay/a2a/payment/create
Required: API Key (OK-ACCESS-* headers) or OnchainOS internal call
GET /api/v6/pay/a2a/p/{paymentId}
Public — no authentication required
POST /api/v6/pay/a2a/p/{paymentId}/credential
Public — no authentication required
GET /api/v6/pay/a2a/p/{paymentId}/status
Public — no authentication required
The Buyer-side endpoints (fetch detail, submit credential, query status) are publicly accessible because the Buyer does not hold the Seller's API Key. Smart-Account internally relies on paymentId and the matching challenge to validate request legitimacy.
API Key authentication uses the following request headers:
Header
Required
Description
OK-ACCESS-KEY
Yes
API Key
OK-ACCESS-SIGN
Yes
Request signature
OK-ACCESS-PASSPHRASE
Yes
API passphrase
OK-ACCESS-TIMESTAMP
Yes
ISO 8601 timestamp
Content-Type
Yes
Set to application/json for POST requests
All responses use a uniform business envelope:
json
{"code":"0","msg":"success","data":{/* business fields */}}
On business errors, code is non-"0" and data is null. See the Error codes section at the bottom for the full list.
Business realm; defaults to the realm bound to the Seller at registration
deliveries
Object
No
Delivery toggles
deliveries.includeUrl
Boolean
No
Default true; generate the payment URL. Phase 1 supports URL deliveries only
The create request uses symbol + decimal amount. The server converts these in the response to the standard MPP challenge (with atomic-unit amount and contract address currency) for the Buyer to sign. In phase 1, deliveries only supports the URL type — QR code, card, and other delivery formats are not yet supported.
The Buyer Agent fetches the full challenge by paymentId. The same URL returns the HTML payment page when accessed in a browser, and returns this JSON when called with an A2A Pay UA or Accept: application/json.
{"code":"0","msg":"success","data":{"paymentId":"a2a_01HZX8Q9RK3JWYV7M2N5T8P4AB","status":"pending","createdAt":"2026-04-21T10:00:00Z","expiresAt":"2026-04-21T10:30:00Z","challenge":{"type":"payment-challenge","data":{"...same as create response..."}}}}
The Buyer Agent submits the credential after completing the EIP-3009 signature. Once Smart-Account verifies the signature, it broadcasts the on-chain transaction on the Buyer's behalf.
The request body only contains payload; the challenge is not echoed back — the server looks up its stored challenge by paymentId and validates it against the supplied payload.authorization.
{"code":"0","msg":"success","data":{"paymentId":"a2a_01HZX8Q9RK3JWYV7M2N5T8P4AB","status":"failed","failure":{"reason":"transaction_reverted","message":"EIP-3009 transferWithAuthorization reverted on chain"}}}