Getting Started
Quickstart
From API key to your first paid invoice in five steps.
Five steps
1
Get an API key
Open your store, go to its Developers tab → API keys, and create one with the
invoices:write ability. Copy the secret. It's shown only once.2
Create an invoice
Call the invoices endpoint from your server:
bash
curl https://api.coinfat.com/api/invoices \-H "Authorization: Bearer <API_KEY>" \-H "Content-Type: application/json" \-d '{ "amount": "49.99", "duration": "1h", "supported_wallets": ["btc"] }'
3
Redirect the customer
Send the customer to the response's
checkout_url to pay.4
Add a webhook endpoint
On your store's Developers tab → Webhooks, add your HTTPS URL, subscribe to
invoice.completed, and copy the signing secret.5
Verify & handle it
Verify the webhook signature, then fulfill the order. You're live.