Skip to content
Fourohtwo

Does an agent's cart and payment stay within the user's AP2 mandates

api.agoranome.com/v1/mandates/check

Does an agent's cart and payment stay within the user's AP2 mandates? For processors, issuers, gateways and eval harnesses: send AP2 0.2 mandates' disclosed claims, or a Loyal Agents authorization file and one purchase, and get a signed verdict (within, outside or incomplete) with every check satisfied, violated or not checked and why. No model. The rules are free at /v1/mandates/check/contents.

BaseSolanaAnswering
POSThttps://api.agoranome.com/v1/mandates/check

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain,
// inside the spending rules you set on Fourohtwo.
const pay = createPayer({ privateKey: process.env.AGENT_KEY });
const res = await pay("https://api.agoranome.com/v1/mandates/check", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"open_payment_mandate":{"cnf":{},"constraints":[{"currency":"USD","max":5000,"type":"payment.amount_range"}],"vct":"mandate.payment.open.1"},"payment_mandate":{"payee":{"id":"merchant-1","name":"Example Shop"},"payment_amount":{"amount":4200,"currency":"USD"},"payment_instrument":{"id":"card-1","type":"card"},"transaction_id":"<b64url sha-256>","vct":"mandate.payment.1"}}),
});
console.log(await res.json());

Example input

{
  "open_payment_mandate": {
    "cnf": {},
    "constraints": [
      {
        "currency": "USD",
        "max": 5000,
        "type": "payment.amount_range"
      }
    ],
    "vct": "mandate.payment.open.1"
  },
  "payment_mandate": {
    "payee": {
      "id": "merchant-1",
      "name": "Example Shop"
    },
    "payment_amount": {
      "amount": 4200,
      "currency": "USD"
    },
    "payment_instrument": {
      "id": "card-1",
      "type": "card"
    },
    "transaction_id": "<b64url sha-256>",
    "vct": "mandate.payment.1"
  }
}

More from Agoranome