Skip to content

A2A AgentCard

digid pay publishes an Agent-to-Agent (A2A) card so other agents can discover digid pay as a payment capability and start tasks against it. As with the MCP server, money movement always ends in a human-approved step.

Status. contract — part of the facade's day-one agent surface (FR-14 / AD-12).

AgentCard

https://api.digid.cc/.well-known/agent.json
bash
curl https://api.digid.cc/.well-known/agent.json
json
{
  "name": "digid pay",
  "description": "Payment gateway agent: create and manage card PaymentIntents for a merchant. Money movement always requires human approval.",
  "url": "https://api.digid.cc/.well-known/agent.json",
  "version": "0.1.0-contract",
  "skills": [
    {
      "id": "payments",
      "name": "digid pay payments",
      "description": "Create and manage PaymentIntents under a merchant's digid pay keys.",
      "inputModes": ["text/plain"],
      "outputModes": ["text/plain"]
    }
  ],
  "capabilities": {
    "requiresApproval": true
  }
}

Task flow

A2A tasks follow the standard lifecycle (input → working → completed / input-required → failed). digid pay maps its payment steps onto it:

mermaid
sequenceDiagram
    participant Agent
    participant digidpay as digid pay A2A
    participant Approver
    Agent->>digidpay: task (create PaymentIntent)
    digidpay-->>Agent: requires_approval (working, awaiting human)
    digidpay->>Approver: notify designated approver
    Approver->>digidpay: approve
    digidpay-->>Agent: completed (succeeded) / failed

Every agent task is opt-in per merchant and bound to merchant-scoped keys and limits.

Client configuration (copy-paste)

Discovery

bash
curl https://api.digid.cc/.well-known/agent.json

Start a task

An A2A client sends JSON-RPC to the card's configured task URL. Example using the same payment shape as the REST API:

json
{
  "jsonrpc": "2.0",
  "id": "1",
  "method": "tasks/send",
  "params": {
    "taskId": "task-1",
    "message": {
      "role": "user",
      "parts": [
        {
          "text": "Create a payment of 2490 eur with merchant_reference order-1001. Return the intent id."
        }
      ]
    }
  }
}

Python client sketch

python
import httpx

CARD_URL = "https://api.digid.cc/a2a"   # agent task endpoint
HEADERS = {"Authorization": "Bearer sk_live_..."}

def send_task(text: str) -> dict:
    r = httpx.post(CARD_URL, json={
        "jsonrpc": "2.0", "id": "1", "method": "tasks/send",
        "params": {"taskId": "task-1", "message": {"role": "user", "parts": [{"text": text}]}},
    }, headers=HEADERS, timeout=30)
    r.raise_for_status()
    return r.json()

TypeScript client sketch

ts
const res = await fetch('https://api.digid.cc/a2a', {
  method: 'POST',
  headers: { 'content-type': 'application/json', authorization: `Bearer ${process.env.DIGIDPAY_SECRET_KEY}` },
  body: JSON.stringify({
    jsonrpc: '2.0', id: '1', method: 'tasks/send',
    params: { taskId: 'task-1', message: { role: 'user', parts: [{ text: 'Create a payment of 2490 eur for order-1001' }] } },
  }),
})
const result = await res.json()

Human-approval requirement

  • An agent-created PaymentIntent is held in requires_approval.
  • It proceeds only after a designated human approves — via the dashboard or the payment_intent.approve API call.
  • No autonomous money movement exists. If a task asks digid pay to charge without an approval step, it fails with approval_error.

Further reading

  • MCP server — the parallel agent surface with its tool catalog.
  • Accounts — opt-in and approver configuration.

digid pay — built in Europe.