CoinsBill API Documentation

A standards-based REST interface

Introduction

A standards-based REST interface provided. Application Developers can can connect to their CoinsBill account in a powerful and secure way.

CoinsBill API can be utilized by clients to create and manage invoices. Developers can use language of their choice to make the calls.

How to get Started?

Merchants must login to CoinsBill account. Follow Dashboard > Payment Tools > Manage API Tookens. Your API Key must remain private.

Security Concepts API


To gain access control, CoinsBill REST API implements various security features factored in, and it must be applied to requests.

Authenticated Identity

Identitities need to Authenticated to access API requests. In simple terms, Merchants has to be registered and authenticated in order to retrive the API Access Token. Token can also be generated with API, implementing the OAuth2 Authentication using Merchants login creditionals.


Access Token

Every API call must be accomponied by an API Access Token in Bearer type.

Access Tokens are automatically generated for authenticated Merchants.


Scope

Scope named collections of capabilities that can be granted, such as the ability to create invoices .


Authentication


In order to use the CoinsBill API, it implement the OAuth2 Authentication .

How does it work

You will need to authorize your application, once you've done that, you will need an access token required to communicate with CoinsBill API.

Getting Access Token


Important endpoints


To authorize
http://www.coinsbill.com/o/authorize
To get the access token

http://www.coinsbill.com/o/token/


Usage


Requests

Send a request to:
http://www.coinsbill.com/api/invoice

Send a request to:
curl -H "Authorization: Bearer gBhacyaBlVkMCtJP9EdkV7Bti0R4q6" http://www.coinsbill.com/api/invoice


Payment Button


RESOURCE


Create a Checkout Button & Use it to complete a sale on your website. The Merchant manages the shopping cart and collects the buyers name and address if necessary.


Schema

Name Type Read-only Require

PaymentId
PaymentId

string

name
Merchant Name

string

amount
Price

number

description
Payment Description

string

currency
Currency - USD for now

string

recurrence_period
Recurrence Period

number

recurrence_unit
Recurrence Unit

string

email_notify
Buyer Notifications

email

callback_url
Browser Redirct URL

url

server_ipn_url
Server Ipn Url

url

payment_url
payment url

url

url
url

url

POST /api/buttons

Creates an Payment Button.

GET /api/buttons

List of Payment Button.

GET /api/buttons/{PaymentId}

Retrieves the specified Payment Button.

PUT /api/buttons/{PaymentId}

Alters the specified Payment Button.

PATCH /api/buttons/{PaymentId}

Patches the specified Payment Button.

DELETE /api/buttons/{PaymentId}

Deletes the specified Payment Button.

Invoice


RESOURCE


Invoices are payment requests addressed to specific buyers. An invoice has an expire time of about 15 minutes.


Schema

Name Type Read-only Require

orderId
Order Id

string

email
Buyer Email

email

billing_first_name
Customer First Name

string

billing_last_name
Buyer Last Name

string

billing_address
Buyer Address

string

billing_city
Buyer City

string

billing_zip_code
Buyer Zip Code

string

country
Buyer Country Code

string

currency
Currency Fixed Price ('USD' till it is implemented)

string

items
Items Array

array

name
Product Item Name

string

quantity
Product Item Quantity

integer

unit_price
Product Item Unit Price

integer

status
Status for Invoices are
'CART', 'Is a cart'
'NEW', 'New Invoice'
'CHECKOUT', 'Unpaid'
'CONFIRMED', 'Order has been confirmed'
'PAID', 'Order has been paid')
'COMPLETED', 'Order has been completed'
'EXPIRED', 'Invoice can no longer receive payments'
'INVALID', 'Order has received payments but was invalid'

string Yes

invoice_url
Web address of invoice

url

fees
Fixed price fees

number

subtotal
Fixed price subtotal

number

total
Fixed price amount

number

paid
Fixed price amount paid

number

balance_remaining
Fixed price balance remaining

number

is_paid
Invoice is paid

boolean

transactions
All transactions used to pay invoice

array

addr
Crypto currency Bitcoin address used for paying

string

amount
Transaction BTC amount

integer

amount_received
Transaction amount received

integer

amount_received_confirmed
Transaction amount received confirmed

integer

currency
Transaction crypto currency

string

processed
Transaction processed

boolean

POST /api/invoice

Creates an invoice for the calling merchant.

GET /api/invoice

List of invoices for the calling merchant.

GET /api/invoice/{InvoiceID}

Retrieves the specified invoice for the calling merchant.

PUT /api/invoice/{InvoiceID}

Alters the specified invoice for the calling merchant.

PATCH /api/invoice/{InvoiceID}

Patches the specified invoice for the calling merchant.

DELETE /api/invoice/{InvoiceID}

Deletes the specified invoice for the calling merchant.

Customer


RESOURCE


List of Customers


Schema

Name Type Read-only Require

first_name
Customer First Name

string

last_name
Last Name

string

email
Customer Email

email

company
Company

string

address
Customer Address

string

city
City

string

zip_code
Customer Zip Code

string

country
Country

string

GET /api/customer

List of customers.

Settlement


RESOURCE


List of Settlements


Schema

Name Type Read-only Require

status
Settlement Status

string

currency
Currency

string

payment_account
Settlement payment account

string

subtotal_usd
Subtotal usd

number

fees_usd
Fees usd

number

total_usd
Total usd

number

amount_btc
Amount btc

number

payment_method
Payment method

string

GET /api/settlement

List of settlements.

Bitcoin Exchange Rates


RESOURCE


List of supported currencies: https:/coinsbill.com/api/rates/?format=json


Schema

Name Type Read-only Require

currency1
Currency from

string

currency2
Currency to

string

rate
Rate

number

high
High Value

number

low
Low Rate

number

avg
Average Rate

number

GET /api/rates

List of supported currencies.