Introduction
Accept Bitcoin Lightning payments on your store with the CashPayment API.
The CashPayment API lets your store create a payment for each checkout and learn when it is paid. Customers pay a Lightning invoice in US dollars, from any Lightning wallet or Cash App.
How it works
Your server creates an order with the amount and your own order number.
You send the customer to the order's checkoutUrl. The hosted checkout page shows a QR code and the invoice.
When the payment arrives, CashPayment sends an order.paid webhook to your server, and the checkout page returns the customer to your store.
What you need
- A CashPayment merchant account and at least one pay link. Contact us if you don't have one.
- An API key, created in the merchant console.
- An HTTPS endpoint on your server to receive webhooks.
Base URL
All requests go to:
https://api.cashpayment.coThe OpenAPI 3.1 definition is at /openapi.json, and an AI-friendly version of these docs at /llms-full.txt.
Requests and responses are JSON. Amounts are integers: US cents (amountUsdCents) and satoshis (amountSat). Times are ISO 8601 strings in UTC.