AP2 mandate check
wever_ap2-mandate-checkAgent preflight: verify an AP2 mandate before anything is committed. Send the mandate as presented in presentation: an AP2 v0.2 SD-JWT carrying a closed checkout mandate, a closed payment mandate or both, or one open mandate (human not present), or the AP2 gateway presentation (issuer JWT~holder binding); optionally the closed payment mandate in payment_presentation, the gateway challenge_token, public keys (the issuer key and, for a closed checkout, the merchant key) or trusted_profile for the anchors the AP2 gateway contract publishes, and the context to read it against: read_at, the amount, payee, merchant and items of the payment or checkout, the amount spent and payments made under an open mandate, and the presenter wallet, audience and nonce for the holder binding. The signed report reads the structure against the AP2 v0.2 profile the credential claims, every required claim present; the signature against the key material, naming the key that signed by thumbprint; for a closed pair, the payment mandate transaction_id against the checkout mandate hash; whether the mandate is in force at the read time, with the window left; each constraint against the presented payment (amount range, total budget, payee or merchant set, item scope, recurrence) as holding, violated or not stated by the mandate; and, where the presentation carries holder proof, whether the presenter is bound as holder, read the way the gateway reads it. Every failed or unstated item is named with its fix. It reads only the material in the call and the published AP2 profile: it makes no network call, contacts no issuer, checks no revocation (AP2 v0.2 documents no revocation path for open mandates, and the report says so for an open mandate), moves no money, consumes nothing and records no presentation, and its result never authorizes a payment by itself. wever_ap2-mandate-gateway is the stateful gate that verifies a closed gateway mandate and consumes it once; this check reads both AP2 profiles before that, consuming nothing. wever_negotiation-mandate-check reads a negotiation mandate document, wever_mandate-issue and its siblings run the Wever trading mandate, wever_payment-policy-check reads an x402 challenge against a spending policy, wever_delegation-check reads a delegation document for scope and caps, and wever_x402-payment-gateway reads a payment signature and chain state. A worked sample is wever_ap2-mandate-sample on https://weverlabs.com/mcp-free. POST /api/ap2-mandate-check. Verdict ap2_mandate_fails, ap2_mandate_gaps, ap2_mandate_unverified or ap2_mandate_holds. Paid URL: 0.10 USDC per call on Base via x402 exact, with the shared 10 signed-wallet free calls per rolling 30 days. Bind X-Wever-Wallet-Proof to the exact JSON arguments and the tool route. Returns a report with an Ed25519 signed receipt. Contract: /api/ap2-mandate-check-contract. Human page: https://weverlabs.com/preflight/.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"presentation": "<presentation>"
},
"name": "wever_ap2-mandate-check"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| keys | No | Issuer and merchant public JWKs. | |
| label | No | ||
| context | No | What to read the mandate against; amounts in minor units. | |
| presentation | Yes | An AP2 v0.2 SD-JWT as presented, or the AP2 gateway issuer JWT~holder binding. | |
| challenge_token | No | Gateway challenge token. | |
| trusted_profile | No | ||
| payment_presentation | No | A closed payment mandate sent apart. |