DEVELOPER HUB
One execution boundary for applications and AI agents.
Connect through HTTP, MCP or A2A, and keep payment credentials with your existing provider.
CURL
Call the pre-flight endpoint
curl https://mandateshield.com/api/v1/preflight \
-X POST \
-H "content-type: application/json" \
-H "authorization: Bearer ms_live_..." \
-d '{
"protocol": "AP2",
"mandate_id": "mnd_2048",
"agent_id": "agent_travel_07",
"merchant_id": "merchant_rail",
"amount": { "value": 124.90, "currency": "USD" },
"limits": {
"max_amount": 150,
"currencies": ["USD"],
"merchants": ["merchant_rail"]
},
"expires_at": "2030-01-01T19:00:00Z",
"idempotency_key": "order_9f22a1",
"user_consent": true
}'
JAVASCRIPT
Fail closed before execution
const response = await fetch(
"https://mandateshield.com/api/v1/preflight",
{
method: "POST",
headers: {
"content-type": "application/json",
authorization: `Bearer ${process.env.MANDATESHIELD_KEY}`
},
body: JSON.stringify(purchase)
}
)
const result = await response.json()
if (result.decision !== "ALLOW") stopPayment(result.findings)
PYTHON
Use the same contract everywhere
import os, requests
result = requests.post(
"https://mandateshield.com/api/v1/preflight",
headers={
"Authorization": f"Bearer {os.environ['MANDATESHIELD_KEY']}"
},
json=purchase,
).json()
if result["decision"] != "ALLOW":
raise RuntimeError(result["findings"])