azeth_subscribe_service
Set up recurring payments to an x402-gated service by creating an on-chain payment agreement. Automates subscription billing without per-request payments.
Instructions
Subscribe to an x402-gated service by creating a payment agreement.
Use this when: You want to set up a subscription instead of paying per-request. The tool fetches the service URL, parses the 402 payment-agreement extension terms, and creates an on-chain payment agreement matching those terms.
Returns: The agreement ID, transaction hash, and subscription details.
Note: The service must advertise payment-agreement terms in its 402 response. After subscribing, subsequent calls to azeth_pay will automatically detect the agreement. No need to pass an agreementId — the server recognizes your wallet via SIWx authentication.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Target chain. Defaults to AZETH_CHAIN env var or "baseSepolia". Accepts "base", "baseSepolia", "ethereumSepolia", "ethereum" (and aliases like "base-sepolia", "eth-sepolia", "sepolia", "eth", "mainnet"). | |
| url | Yes | The HTTPS URL of the x402-gated service to subscribe to. | |
| intervalSeconds | No | Override the suggested interval (seconds, minimum 60). Defaults to the service suggestion. | |
| maxExecutions | No | Maximum number of payments (count cap). 0 or omit for no count limit — an amount cap (totalCap) applies instead. | |
| totalCap | No | Maximum total payout in human-readable token units (e.g., "100.00"). Omit BOTH this and maxExecutions to default to ~1 year of payments (amountPerInterval × 365). |