Getting started
Mandate lets an AI agent spend money only within rules a person signed, and lets anyone check afterwards that it did. This API is for the other side of the payment: a seller, marketplace or auditor checking an agent's payment before shipping.
Check an agent payment in one call
You need only the PayPal order id the payment arrived with. No account and no key: everything is checked with Mandate's public keys.
curl https://mandate-e13m.onrender.com/api/verify/{paypalOrderId}The answer says whether:
- the buyer signed a mandate that allows this purchase (an AP2 Intent Mandate),
- the cart is the exact cart the merchant signed and the buyer's rules allowed,
- PayPal's own record shows that amount captured,
- and, if the buyer approved it, that their device signed that cart (a passkey).
With the SDK
import { MandateApiClient, ServerEnvironment } from "mandate-api";
const client = new MandateApiClient({ serverEnvironment: ServerEnvironment.Production });
const verdict = await client.verification.verifyOrder({ paypalOrderId: "5O190127TN364715T" });
if (!verdict.ok) throw new Error("Don't ship: this payment isn't backed by the buyer's mandate");SDKs are generated by APIMatic for TypeScript, Python and C#.
Next
- How Mandate decides: the 7 rules every purchase goes through.
- The API reference, generated from Mandate's OpenAPI document.