AP2 v0.2 · PayPal

Verify any AI-agent payment before you ship

Every payment Mandate makes carries AP2 v0.2 mandates: the customer’s signed limits, the merchant’s signed checkout, the agent’s closed mandates and signed receipts. Check them with public keys alone, in one call. Interoperability is tested against Google’s AP2 reference SDK.

Start here

Verify a payment in one call

You need only the PayPal order id the payment arrived with. No account, no key.

Terminal
# verdict for a PayPal order
curl $MANDATE/api/verify/5O190127TN364715T

# full evidence pack for a dispute
curl $MANDATE/api/ap2/orders/5O190127TN364715T

# the public keys it is checked against
curl $MANDATE/api/ap2/jwks
TypeScript SDK · generated by APIMatic
import { MandateApiClient, ServerEnvironment } from "mandate-api";

const mandate = new MandateApiClient({
  serverEnvironment: ServerEnvironment.Production,
});

const verdict = await mandate.verification.verifyOrder({
  paypalOrderId: "5O190127TN364715T",
});

// Safe only when both chains verify with public keys
if (verdict.ok && verdict.ap2?.ok) ship();

Also in Python and C# · tested against the real API (links open in new tabs)

Verification API

Public, read-only endpoints. The API docs have every request and response.

What the AP2 verdict checks

Following the AP2 specification’s dispute rules. Each check comes back with ok and a readable detail; the payment is safe to fulfil only when all pass.

  • OpenAPI 3.1 spec (YAML): import it into Postman, or generate a client with APIMatic.
  • Postman collection: the whole story with 42 checks: sign rules, shop, approve, block a compromised agent, verify, detect tampering.
  • Java, PHP, Ruby and Go from the same spec: npm run sdk:generate -- go
  • Open Checkout and Payment Mandates are SD-JWTs signed by Mandate as Trusted Agent Provider after the user confirms their rules.
  • They delegate (cnf) to Mandate’s agent key, which closes each in-policy purchase with a key-binding hop.
  • Purchases the user approves are closed with the user’s key; with a passkey, the user’s device also signs that exact cart.
  • Seller and category rules are enforced by the gate before signing, against the live merchant registry.

Any MCP client can shop under a user’s mandate with a private connection link from the Assistants page. Tools: get_mandate, search_products, get_product, buy. Every purchase goes through the same 7 rules.