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.
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. |