> 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

{% hint style="info" %}
**Peer protocol** — no browser, no human account-creation step, for either side.
{% endhint %}

A peer agent discovers AbaPay via its Agent Card, then sends structured tool calls over A2A JSON-RPC.

|                   |                                                  |
| ----------------- | ------------------------------------------------ |
| Agent Card        | `agents.abapays.com/.well-known/agent-card.json` |
| JSON-RPC endpoint | `agents.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 a website? 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 call authenticated with a [Sign-In with Ethereum](https://eips.ethereum.org/EIPS/eip-4361) signature. It picks the PIN *in that same request* and mints an Agent Hub api\_key back. Fetch a single-use nonce from `GET /api/auth/nonce?purpose=action` first. 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.

{% code title="POST /api/agent/link — real fields, verified live" %}

```
headers: {
  "x-wallet-address": "0xYourAgentWallet...",
  "x-wallet-signature": "<signature over the SIWE message>",
  "x-wallet-siwe": "<the SIWE message, base64>"
}
body: {
  "wallet_address": "0xYourAgentWallet...",
  "channel": "MCP",
  "pin": "123456",
  "approved_chain": "CELO"
}
-> { "success": true, "api_key": "aba_mcp_..." }
```

{% endcode %}

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.

{% hint style="warning" %}
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.
{% endhint %}

## Identify your agent (optional)

Send `X-Agent-Name` (your agent's name) and `X-Agent-Id` (its ERC-8004 agent ID on Celo) with your requests. We record them, your client's User-Agent, and, for OAuth, the name your client registered, against each payment it makes. We also check the paying wallet against the public ERC-8004 and Self Agent ID registries. AbaPay's support staff use this to find your payments quickly. It never changes how a payment is handled, and it's never shown publicly.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
