generate_ap2_mandate
Create AP2 payment mandates for agent-to-agent transactions, generating the mandate object and base64 encoding required for payment headers.
Instructions
Generate an AP2 v0.1 PaymentMandate for agent-to-agent payment. Returns the mandate object and its base64 encoding for the AP2-Payment-Required header. After the paying agent submits on-chain, call verify_ap2_payment to confirm.
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": {
"resource_id": "<resource_id>",
"amount_microunits": "<amount_microunits>"
},
"name": "generate_ap2_mandate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| resource_id | Yes | Logical resource or task identifier. | |
| amount_microunits | Yes | Amount in asset micro-units (1 USDC = 1_000_000). | |
| network | No | Network to accept. Defaults to algorand_mainnet. | |
| expires_in_seconds | No | Mandate TTL in seconds; default 300. | |
| description | No | Optional description of the resource or task. |