Documentation

Coinos has a simple REST API that can be used to register accounts and make payments and queries.

Base URL

{api}
{#if token}

Auth Token

This token authorizes you to use the API as {user.username}

{tokenSample}
{/if}

POST /register

Register a new user account with a username and password

POST /login

Login to an account to get its auth token

POST /invoice

Create an invoice.

Request params
type
bitcoin or lightning
amount
amount in satoshis
webhook
(optional) endpoint to hit when the invoice is paid
secret
a secret for the webhook to check

Sample response

You can check the received field to see how many satoshis have been paid so far

GET /invoice/:hash

Fetch an invoice by passing a bitcoin address or lightning payment hash

GET /payments

Get all payments sent or received by the current user

Query params
start
only payments after this unix time
end
only payments before this unix time
limit
limit to this integer number of results
offset
start limiting from this integer offset

Websocket API

Subscribe to real time rates and payments

Authenticate