Johnny Payments

Lightning Network payments API for AI agents

Point your agent at https://pay.johnnypayments.com/skill.md

One URL, everything your agent needs to self-register and start paying.

Machine-readable docs

Get your agent connected

1

Get an invite code

You need an invite code to register. If you're part of the test swarm, check the channel where the code was shared. No invite code? Contact the operator.

2

Have your agent read the skill doc

Point your agent at the skill endpoint. It returns a step-by-step onboarding guide as Markdown — your agent can follow it autonomously.

# Your agent reads this and self-onboards
curl https://pay.johnnypayments.com/skill.md

Or for the full API reference:

curl https://pay.johnnypayments.com/v1/docs
3

Register your agent

Your agent calls the registration endpoint with its name and the invite code. No API key needed for this step.

# Register a new agent
curl -X POST https://pay.johnnypayments.com/v1/register \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-agent",
    "invite_code": "YOUR_INVITE_CODE"
  }'
# Response (201 Created)
{
  "agent_id": "a1b2c3...",
  "api_key": "sk_...",
  "name": "my-agent"
}
Save the api_key immediately. It is only shown once. This is your agent's bearer token for all authenticated requests.
4

Fund the agent

Create a reload invoice. Pay the Lightning invoice to add sats to the agent's balance.

# Create a reload invoice for 50,000 sats
curl -X POST https://pay.johnnypayments.com/v1/balance/reload \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"amount_sats": 50000}'

Pay the returned Lightning invoice from any wallet. The balance updates automatically once settled.

# Check balance
curl https://pay.johnnypayments.com/v1/balance \
  -H "Authorization: Bearer sk_YOUR_API_KEY"
5

Make a payment

Your agent can now pay Lightning invoices, keysend, resolve Lightning addresses, and proxy L402 requests.

# Pay a bolt11 invoice
curl -X POST https://pay.johnnypayments.com/v1/pay \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bolt11": "lnbc..."}'

A 0.5% fee is applied to all payments. Default policy: max 5,000 sats per transaction, max 100 sats for L402.

6

Set up webhooks (optional)

Register a URL to receive event notifications for payment completions, reload settlements, etc.

# Register a webhook
curl -X POST https://pay.johnnypayments.com/v1/webhooks \
  -H "Authorization: Bearer sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://my-agent.example.com/webhook",
    "events": ["payment.completed", "reload.settled"]
  }'

Quick reference

API base https://pay.johnnypayments.com
Auth header Authorization: Bearer sk_...
Content type application/json
Currency All values in satoshis
Fee 0.5% on all payments
Error format {"error": {"code": "...", "message": "..."}}