⚡ Developer Guide

Agent payments in minutes.

LATTP (Lightning Agent Trust Transport Protocol) lets autonomous AI agents pay each other, pay for services, and pay humans — over Bitcoin Lightning. No card details. No bank accounts. No waiting. 1,000 sat free trial on signup.

Before you start

You need: a Lightning wallet (Phoenix, Wallet of Satoshi, Breez) to fund your agent. That's it. No SDK required — plain HTTP.


Step 1 — Register your agent

One POST request. You get back an Agent ID and an API key. Keep the API key secret — it authorises all payments.

1

Send the registration request

Request — curl
curl -X POST https://api.lattp.co.uk/agent/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-purchasing-agent",
    "operator": "acme-corp",
    "trust": "L1"
  }'
Request — JavaScript
const res = await fetch('https://api.lattp.co.uk/agent/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    name: 'my-purchasing-agent',
    operator: 'acme-corp',
    trust: 'L1'
  })
});
const agent = await res.json();
Response
{ "agentId": "ap_ab7ddc57005d0ee4", "apiKey": "attp_9fa7d5bb6c4be29a...", "trustLevel": "L1", "balance": 1000, "note": "1,000 sat trial. Top up via POST /agent/topup" }
Save your API key

The apiKey is shown once. Store it securely — it's the only way to authorise payments from this agent. If lost, register a new agent.


Step 2 — Top up with Lightning

Your agent starts with 1,000 free sats to test with. When you need more, request a Lightning invoice, pay it from any wallet, and your balance updates instantly on settlement.

1

Request an invoice

Request
curl -X POST https://api.lattp.co.uk/agent/topup \
  -H "Authorization: Bearer attp_9fa7d5bb6c4be29a..." \
  -H "Content-Type: application/json" \
  -d '{"amountSats": 50000}'
Response
{ "invoice": "lnbc500u1pj9fa7d5...", // pay this in your Lightning wallet "paymentId": "a3f9c2e1d8b7...", "amountSats": 50000, "network": "mainnet" }
2

Pay the invoice

Open Phoenix, Wallet of Satoshi, or any Lightning wallet. Paste the invoice string or scan it as a QR code. The payment settles in seconds.

3

Poll for settlement

Poll status
curl "https://api.lattp.co.uk/agent/topup/status?id=a3f9c2e1d8b7..." \
  -H "Authorization: Bearer attp_9fa7d5bb6c4be29a..."
Settled response
{ "status": "settled", "credited": 50000, "balance": 51000 // 50,000 + 1,000 trial }

Poll every 3 seconds until status is settled. In practice Lightning payments settle in under 10 seconds. Minimum top-up is 100 sats.


Trust levels

Every agent has a trust level that caps the maximum sats per single transaction. Start at L0 for testing, request upgrades at contact@agentsign.dev.

LevelMax per transactionUse case
L01,000 satsTesting, demos, micro-purchases
L110,000 satsAPI calls, small service fees
L2100,000 satsProduction services, SaaS billing
L31,000,000 satsEnterprise transactions
L4UnlimitedVerified institutional agents

Payment scenarios

LATTP handles three core agent payment flows. All use the same POST /agent/pay endpoint — the difference is who or what the recipient is.

🤖→🤖

Agent to Agent

Orchestrator pays a sub-agent for completing a task

🤖→⚡

Agent to Service

Agent pays for an API call, data feed, or compute

🤖→🧑

Agent to Human

Agent pays a human contractor or service provider

Scenario 1 — Agent to Agent

An orchestrator agent hires a specialist sub-agent to complete a task and pays on completion. Both agents must be registered on LATTP.

Orchestrator Agent
→ pays 500 sats →
Research Sub-Agent
MCPS-signed payment — settles instantly — 1 sat platform fee

Real-world example: AI orchestrator paying a research agent

Your orchestrator agent needs to look up competitor pricing. It calls a specialist research agent, gets the data, and pays 500 sats on delivery.

Orchestrator — make the payment
// Orchestrator has: agentId, apiKey, and knows the research agent's ID
const payment = await fetch('https://api.lattp.co.uk/agent/pay', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer attp_orchestrator_key...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    toAgentId:  'ap_research_agent_id',
    amountSats: 500,
    memo:       'competitor-pricing-lookup-task-7f2a'
  })
});
const result = await payment.json();
Response — payment settled
{ "verdict": "SETTLED", "txId": "tx_4f8a2b1e", "mcpsFrame": "MCPS:1:48bf0446:b3b0f01b:0x1F4:a9c3...", "amountSats": 500, "fee": 1, "from": { "agentId": "ap_orchestrator", "newBalance": 49499 }, "to": { "agentId": "ap_research_agent", "newBalance": 1500 }, "timestamp": "2026-05-06T21:14:33Z", "protocol": "MCPS:1 — IETF draft-sharif-mcps-secure-mcp" }
What just happened

The payment settled instantly. The mcpsFrame is a cryptographic proof — signed with ECDSA P-256 — that this exact amount moved from this exact agent at this exact time. You can verify it later with GET /agent/verify?frame=MCPS:1:....

Research agent — check its own balance after receiving payment
curl https://api.lattp.co.uk/agent/balance \
  -H "Authorization: Bearer attp_research_agent_key..."
Balance response
{ "agentId": "ap_research_agent", "balance": 1500, "trustLevel": "L1", "txLimit": 10000, "transactions": [ { "direction": "in", "amountSats": 500, "memo": "competitor-pricing-lookup-task-7f2a" } ] }

Scenario 2 — Agent to Service

Your agent pays for an external API, data service, or compute — autonomously, with no human in the loop. The service provider registers their own LATTP agent to receive payments.

Your Agent
→ requests data →
Data Service Agent
→ pays 200 sats →
Data Service Agent
Agent calls service → service charges → agent pays → service delivers

Real-world example: agent pays for a weather data API

A weather data provider exposes a LATTP-enabled endpoint. Your agent queries it, pays per call, and gets the data back.

Full flow — query, pay, receive data
// Step 1: Ask the service what it charges
const quote = await fetch('https://weather-service.example.com/quote');
// Returns: { agentId: "ap_weather_service", pricePerCall: 200 }

// Step 2: Pay the service agent on LATTP
const payment = await fetch('https://api.lattp.co.uk/agent/pay', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer attp_your_agent_key...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    toAgentId:  'ap_weather_service',
    amountSats: 200,
    memo:       'weather-london-2026-05-06'
  })
});
const { txId } = await payment.json();

// Step 3: Call the service with proof of payment
const data = await fetch('https://weather-service.example.com/london', {
  headers: { 'X-LATTP-TxId': txId }
});
// Service verifies txId on LATTP, delivers weather data
How the service verifies payment

The service checks the txId against LATTP to confirm it's SETTLED and the recipient is its own agent ID. Payment is instant and unforgeable — the MCPS cryptographic frame proves it.

Service-side verification (Node.js)
// Service verifies the txId before delivering data
async function verifyPayment(txId) {
  const balance = await fetch('https://api.lattp.co.uk/agent/balance', {
    headers: { 'Authorization': `Bearer ${SERVICE_API_KEY}` }
  });
  const { transactions } = await balance.json();
  return transactions.some(tx =>
    tx.txId === txId && tx.direction === 'in' && tx.amountSats >= 200
  );
}

Scenario 3 — Agent to Human

Your agent pays a human — a freelancer, contractor, or service provider — directly over Lightning. The human doesn't need to be on LATTP. They just need a Lightning wallet address.

Your Agent
→ withdraw to bolt11 invoice →
Human's Lightning Wallet
Agent withdraws sats to any Lightning invoice the human provides

Real-world example: agent pays a human for completing a task

A human freelancer completes a data labelling task. Your agent pays them directly to their Lightning wallet — no PayPal, no bank transfer, no waiting.

Human provides a Lightning invoice — agent pays it
// Human generates an invoice in their wallet app for 5,000 sats
// They send you the bolt11 string: "lnbc50u1p..."

const payout = await fetch('https://api.lattp.co.uk/agent/withdraw', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer attp_your_agent_key...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    bolt11:     'lnbc50u1p5lh9ctpp5...',  // invoice from the human's wallet
    amountSats: 5000
  })
});
const result = await payout.json();
Response
{ "ok": true, "amountSats": 5000, "newBalance": 44499, "note": "Payment submitted to Lightning network" }
Lightning invoices expire

Most Lightning invoices expire after 24 hours. Make sure the human provides a fresh invoice before your agent calls withdraw. Your agent's balance is only deducted when the Lightning payment succeeds.


Check your agent balance

Get balance + last 10 transactions
curl https://api.lattp.co.uk/agent/balance \
  -H "Authorization: Bearer attp_your_key..."
Response
{ "agentId": "ap_ab7ddc57005d0ee4", "name": "my-purchasing-agent", "trustLevel": "L1", "balance": 44499, "txLimit": 10000, "transactions": [...] }

Verify a payment

Every payment produces an mcpsFrame — a cryptographically signed string. Any party can verify it independently.

Verify a payment frame
curl "https://api.lattp.co.uk/agent/verify?frame=MCPS:1:48bf0446:b3b0f01b:0x1F4:a9c3..."
Response
{ "ok": true, "agentId": "ap_ab7ddc57005d0ee4", "name": "my-purchasing-agent", "amountSats": 500, "memo": "competitor-pricing-lookup-task-7f2a" }

Withdraw your sats

Agents that earn sats (by receiving payments) can withdraw to any Lightning wallet at any time.

Withdraw to your Lightning wallet
// Generate an invoice in your wallet, paste it here
curl -X POST https://api.lattp.co.uk/agent/withdraw \
  -H "Authorization: Bearer attp_your_key..." \
  -H "Content-Type: application/json" \
  -d '{
    "bolt11": "lnbc...",
    "amountSats": 10000
  }'

Frequently asked questions

Call POST /agent/topup with your API key and the amount you want. You'll get a Lightning invoice back. Pay it from any Lightning wallet (Phoenix, Wallet of Satoshi, Strike, Breez) and your balance updates within seconds. Minimum top-up is 100 sats (~$0.04 at current prices).

curl -X POST https://api.lattp.co.uk/agent/topup \
  -H "Authorization: Bearer attp_your_key..." \
  -d '{"amountSats": 10000}'

Yes. Every payment is signed with ECDSA P-256 via the MCPS protocol (IETF draft-sharif-mcps-secure-mcp). Each frame includes a nonce (prevents replay attacks), a timestamp (frames expire after 300 seconds), and a cryptographic signature that binds sender, recipient, amount, and memo. The signature cannot be forged without the agent's private key. The platform runs on Bitcoin mainnet Lightning — payments are final and irreversible.

1 sat per transaction — flat, regardless of amount. No percentage. No monthly fee. No hidden charges. If you pay 10,000 sats, the recipient gets 10,000 and your balance reduces by 10,001.

For agent-to-agent and agent-to-service payments, yes — both agents must be registered on LATTP. For agent-to-human payouts, no — the human just needs a Lightning wallet. Your agent withdraws directly to any Lightning invoice.

Email contact@agentsign.dev with your agent ID and use case. Trust levels gate maximum per-transaction size: L0 = 1,000 sats, L1 = 10,000, L2 = 100,000, L3 = 1,000,000, L4 = unlimited. New agents start at L0 with the trial balance and can request L1 immediately.

Yes. Each payment request is independent. The balance is updated atomically on each settlement. If your agent fires 10 payment requests simultaneously, each is processed in order. Ensure your agent has sufficient balance to cover all concurrent payments plus the 1 sat fee each.

There is no recovery mechanism — the API key is only shown once on registration. If lost, register a new agent. Any balance on the old agent cannot be transferred. Keep your API key in environment variables or a secrets manager — never in source code.

MCPS (Model Context Protocol Secure) is an IETF protocol draft (draft-sharif-mcps-secure-mcp) that cryptographically signs every agent payment frame. It means every payment has a tamper-proof receipt — you can prove exactly which agent paid, how much, when, and why. This is used by Cisco AI Defense and integrated into moov-io's sanctions screening platform. It is the security layer LATTP uses under the hood.

Yes — 60 payment requests per minute per agent. This is sufficient for most autonomous agent workloads. If your agent needs higher throughput, contact us.


API endpoint reference

Base URL: https://api.lattp.co.uk

MethodEndpointDescriptionAuth
POST/agent/registerRegister a new agentNone
POST/agent/topupCreate Lightning invoiceAPI key
GET/agent/topup/statusPoll invoice settlementAPI key
POST/agent/payPay another agentAPI key
POST/agent/withdrawWithdraw to LightningAPI key
GET/agent/balanceBalance + transactionsAPI key
GET/agent/verifyVerify MCPS frameNone
GET/agent/usageUsage statsAPI key
GET/healthPlatform health checkNone

All authenticated requests use Authorization: Bearer <apiKey>. All responses are JSON. All amounts are in satoshis (sats). 1 sat ≈ $0.0004 at current prices.


Questions? contact@agentsign.dev  ·  Terms  ·  Privacy