{#snippet cp(something)} {/snippet}
Coinos is free and open source software. The code is available at github.com/coinos
Coinos has a REST API that can be used to register accounts and make payments. The following examples show how you can call the API with curl
{#if user && token} This token authorizes you to use the API as {user.username}. {:else} Sign in to view your auth token here, or get one from the /login endpoint. {/if} Save it in a variable called $token to run the examples. It gives full access to your account so keep it safe.
This read-only token has permission to create invoices and fetch payments but can't be used to make withdrawals
Register a new user account with a username and password
Login to an account to get its auth token
Get your account details and balance
Update your account/settings
Create an invoice.
Get a lightning invoice to receive funds
Get a bitcoin address to receive funds
Sample response
You can check the received field to see how much has been paid
Specify a webhook to be called when an invoice is paid
Fetch an invoice by passing a bitcoin address or lightning payment hash
Find out what a lightning payment will cost before sending it. The routing fee comes from querying the route ahead of time and is exact; pass it as fee to POST /payments. Pass amount for an amountless invoice, or max to solve for the largest amount whose amount + fees uses the whole balance.
Sample response
Send a lightning payment. fee caps the routing fee; if omitted, the route is quoted and the exact fee used.
Send an internal payment to another user
Send a bitcoin payment
Get all payments sent or received by the current user