# A2a Payments

> Blockchain USDC payments via APay — pay services, manage budgets, open streaming channels, and handle x402 protocol.

- **Type:** Skill
- **Install:** `agentstack add skill-lord1egypt-awesome-skill-forge-a2a-payments`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Lord1Egypt](https://agentstack.voostack.com/s/lord1egypt)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Lord1Egypt](https://github.com/Lord1Egypt)
- **Source:** https://github.com/Lord1Egypt/awesome-skill-forge/tree/master/community/clawhub/a/a2a-payments
- **Website:** https://skill-explorer-rho.vercel.app

## Install

```sh
agentstack add skill-lord1egypt-awesome-skill-forge-a2a-payments
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# A2A Payments (APay)

Blockchain-native USDC payments for AI agents on Base chain. Pay for services, manage budgets, and handle micropayments.

## Quick Start

Check your balance:

```
Use apay_check_balance to see my USDC balance
```

Pay a service:

```
Use apay_pay_service with serviceId "svc-123" and amount "0.50"
```

## Available Tools

### Balance & Budget

| Tool | Description |
|------|-------------|
| `apay_check_balance` | Check USDC balance, daily budget, spending limits |
| `apay_budget_check` | Verify if a specific amount is affordable |
| `apay_spending_history` | Get spending analytics and history |

### Payments

| Tool | Description |
|------|-------------|
| `apay_pay_service` | Pay a service (agent pays gas) |
| `apay_pay_signed` | Gasless signed payment (server submits on-chain) |
| `apay_estimate_cost` | Estimate cost including 0.5% platform fee |

### Services

| Tool | Description |
|------|-------------|
| `apay_list_services` | List available APay services |
| `apay_get_service` | Get detailed service info |

### Payment Channels (Streaming)

| Tool | Description |
|------|-------------|
| `apay_channel_status` | Check channel status |
| `apay_stream_open` | Open channel with USDC deposit |
| `apay_stream_pay` | Sign off-chain micropayment |
| `apay_stream_close` | Close channel (refund unspent) |

### x402 Protocol

| Tool | Description |
|------|-------------|
| `apay_x402_fetch` | Fetch URL with automatic x402 payment on HTTP 402 |

## Workflows

### Pay for a tool execution

1. `apay_budget_check` — verify affordability
2. `apay_estimate_cost` — see total with fees
3. `apay_pay_service` — execute payment
4. Receive payment receipt with tx hash

### Streaming micropayments

For services that charge per-request (API calls, data feeds):

1. `apay_stream_open` — deposit USDC into channel
2. `apay_stream_pay` — sign micropayments (off-chain, instant)
3. `apay_stream_close` — settle on-chain, refund remainder

### x402 auto-payment

For services using the HTTP 402 payment protocol:

```
Use apay_x402_fetch with url "https://api.example.com/premium/data" and maxPayment "1.00"
```

The tool automatically detects 402 responses, pays the required amount, and retries the request.

## Network

- **Chain**: Base (Coinbase L2)
- **Stablecoin**: USDC (6 decimals)
- **Model**: Escrow-based sessions with spending limits
- **Testnet**: base-sepolia for development

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Lord1Egypt](https://github.com/Lord1Egypt)
- **Source:** [Lord1Egypt/awesome-skill-forge](https://github.com/Lord1Egypt/awesome-skill-forge)
- **License:** MIT
- **Homepage:** https://skill-explorer-rho.vercel.app

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-lord1egypt-awesome-skill-forge-a2a-payments
- Seller: https://agentstack.voostack.com/s/lord1egypt
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
