> For the complete documentation index, see [llms.txt](https://docs.abapays.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.abapays.com/protocols/a2a.md).

# A2A

> Peer protocol

A peer agent discovers AbaPay via its Agent Card, then sends structured tool calls over A2A JSON-RPC — no browser, no human account-creation step, for either side.

|                   |                                           |
| ----------------- | ----------------------------------------- |
| Agent Card        | `abapays.com/.well-known/agent-card.json` |
| JSON-RPC endpoint | `abapays.com/api/a2a`                     |

## Skills (10)

`describe_capabilities` `check_balance` `list_plans` `list_international_options` `transaction_history` `pay_bill` `pay_bill_batch` `schedule_bill` `list_schedules` `cancel_schedule`

## Can an agent set and use a PIN without visiting abapays.com? Yes.

The PIN is a field in a JSON body, not something entered into a web form. Linking and every payment after it are both plain API calls:

* `POST /api/agent/link` — a wallet-signature-authenticated call (the same `personal_sign` scheme x402 signing uses elsewhere) that picks the PIN *in that same request* and mints an Agent Hub api\_key back. One HTTP call, no session, no browser.
* Every `pay_bill` / `pay_bill_batch` / `schedule_bill` call after that sends the same PIN back as another JSON field — still just an HTTP request.

`POST /api/agent/link` — real fields, verified live:

```
headers: {
  "x-wallet-address": "0xYourAgentWallet...",
  "x-wallet-signature": "<personal_sign over the request>",
  "x-wallet-timestamp": "1234567890"
}
body: {
  "wallet_address": "0xYourAgentWallet...",
  "channel": "MCP",
  "pin": "1234",
  "approved_chain": "CELO"
}
-> { "success": true, "api_key": "aba_mcp_..." }
```

Full runnable version: [examples/agent-quickstart.mjs](https://github.com/investorphem/AbaPay/blob/main/examples/agent-quickstart.mjs). Or skip the wire format entirely: `AbaPayAgent.link()` in [the SDK](/build/sdk.md) does this in one line.

> The PIN itself is still real security, not a formality: it's the one thing separate from the signature that has to be right on *every* payment call — unlike x402, which needs neither a PIN nor a link step at all. Two different trust models, both entirely API-driven.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.abapays.com/protocols/a2a.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
