REST API

Accept Bitcoin payments.
Settle to your wallet.

One API. Bitcoin & Lightning. Self-custody settlement direct to your AQUA wallet. No self-hosting required.

First 5 payments free · No credit card required

BTCPay Server
Self-custody
Requires self-hosting, server maintenance, and DevOps overhead.
OpenNode / IBEX
Managed
Easy setup, but custodial — funds pass through the provider before you receive them.
AvoPay
Self-custody, no self-hosting
Payments settle directly into your AQUA wallet. We never hold your funds. No server to maintain.

For any platform that needs Bitcoin payments

If you can make an HTTP request, you can integrate AvoPay.

📦

SaaS platforms

Add Bitcoin as a subscription payment option. Receive payment.confirmed webhooks to activate accounts.

🛒

Marketplaces

Per-transaction settlement, no custodial risk. Create a payment per order, webhook on confirmation.

🖥️

POS systems

In-person and remote payments with the same API. Display a QR from lightning_invoice on any screen.

🔄

Subscription services

Trigger a new payment per billing cycle. Metadata carries your user_id and plan through the webhook.

🤖

AI agents

Programmatic account creation and payment via Lightning. Machine-readable onboarding →

⚙️

Custom ecommerce

Headless checkout — render lightning_invoice and liquid_address in your own UI. Or redirect to hosted checkout.

First API call in under 2 minutes

Three steps from signup to first confirmed payment.

1

Create a payment

Call POST /api/v1/payments from your backend. You receive a Lightning invoice, a Liquid BTC address, and a hosted checkout URL — all in one response.

curl https://api.avopay.dev/api/v1/payments \ -H "Authorization: Bearer ak_live_..." \ -H "Content-Type: application/json" \ -d '{ "amount": 25.00, "currency": "EUR", "metadata": {"order_id": "ORD-1234"} }'
Response
{ "payment_id": "pmt_abc123", "status": "pending", "amount_fiat": 25.00, "currency": "EUR", "amount_sats": 12500, "invoice_sats": 12500, "methods": ["lightning", "liquid"], "lightning_invoice": "lnbc125u1p...", "liquid_address": "VJL4iV2MML...", "btc_address": null, "btc_amount_sat": null, "checkout_url": "https://avopay.dev/pay/pmt_abc123", "expires_at": "2026-06-19T12:10:00Z" }
2

Send your buyer to checkout

Hosted checkout: redirect to checkout_url — AvoPay handles the UI, QR codes, and polling.

Headless: render lightning_invoice and liquid_address as QR codes in your own UI. Use invoice_sats for the Lightning amount display.

Both modes use the same payment object. You can switch between them without changing your backend.

3

Receive a webhook when paid

AvoPay sends a signed payment.confirmed event to your endpoint. Verify authenticity with the X-AvoPay-Signature: sha256=... header.

{ "event": "payment.confirmed", "payment_id": "pmt_abc123", "amount_fiat": 25.00, "currency": "EUR", "amount_sats": 12500, "metadata": {"order_id": "ORD-1234"}, "settled_at": "2026-06-19T12:07:43Z" }

Set your webhook URL in your dashboard, or configure it via the Webhooks API.

Everything a payment API needs

Lightning + on-chain Bitcoin

Three payment rails, one API call. The methods array tells you which are available for each payment.

🔑

API key authentication

Secret keys (ak_live_) for backend calls. Generate, rotate, and revoke from your dashboard.

🔔

Signed webhooks

payment.confirmed and payment.expired events with HMAC-SHA256 signatures. Four automatic retries.

🔁

Idempotency keys

Send Idempotency-Key: your-order-id to safely retry without creating duplicate payments.

📦

Metadata passthrough

Attach any JSON to a payment at creation. It comes back in every webhook so you never lose context.

🧾

Invoices & receipts

PDF invoices auto-generated on settlement. Download via API or retrieve the buyer receipt URL.

🔗

Payment links via API

Create reusable payment links programmatically with Bearer ak_live_ — no dashboard session required.

📄

OpenAPI spec

Machine-readable spec at /openapi.yaml. Generate a typed client in any language with openapi-generator.

Included in Website Checkout Pro

The REST API is part of Website Checkout Pro — not a standalone purchase. Sign up once, use everything.

What Pro includes
  • POST /payments — create payments from your backend
  • Idempotency keys — safe retries, 24h TTL
  • 30 req/min · 50 concurrent open payments
  • HMAC-SHA256 signed webhooks — paid, expired, failed
  • Payment links via API key — no dashboard session needed
  • 50 products (up from 5 on Starter)
  • Removes "Powered by AvoPay" branding

Starter plan ($9/mo) includes payment links and webhooks but not POST /payments.

Website Checkout
Starter
$9/mo
$7.50/mo billed yearly
Save 2 months
5 products · payment links · webhooks
Pro
$18/mo
$15/mo billed yearly
Save 2 months
Full REST API · 50 products · removes branding
Get API Keys →

First 5 payments free · No credit card

See full pricing →

Everything you need to ship

Start accepting Bitcoin.
Keep your keys.

Get API keys in 60 seconds. First 5 payments free. No credit card required.