Incesty Documentation

Getting Started

Accept Payments with Bitcoin

Bitcoin is one of many cryptocurrencies available today. Within the bitcoin protocol, the blockchain that has seen the most work put into it is considered to be the best blockchain and the one that the entire protocol refers to when verifying transactions. Bitcoins are considered spent once a transaction has been verified.

The bitcoin protocol itself may be secure enough. Customers just send bitcoin from their computer or mobile device directly to a bitcoin payment address.

Incesty implements several usage techniques. You can choose one that fits you to get started.

Online Payments


Online Payment experience is simple, customers on any device just make the payment easily without need for sensitive information.

Pay Buttons

Create a Checkout Button and use it to complete a sale on your website

After the successful transaction, the seller will receive an email order confirmation. The buyer will be given a browser redirect URL to click to return to a Thank You page on your website.


Hosted Catalog

Create the HTML code & Use it to Hosted Catalog Item.

You can create the HTML code to use it your website. Button code genrated will submit the item information and price. Your shopping cart is managed by Incesty, and collects buyer information if necessary.

Bill Clients


Merchants tools can allow to invoice and receive payments for services.

How does Bill Clients work

Incesty has a Dashboard > Payment Tools > Bill Clients tool to set it up. You may email your Clients. Bills can also be setup for recurring bills.

Usage


Requests

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

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


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.

Invoice


CREATE


Invoice can be created by sending a HTTP POST request.


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

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

Invoice create request send to Incesty:


curl \
 -H "Authorization: Bearer a9esthaVUjOuvzTCSTXsJUCK0lCMCk"  \
 -H 'Accept: application/json; indent=4'  \
 -X POST  \
  -d '{"email": "bill@dow.com", "currency": "USD", "country": "US", "billing_first_name": "orliesaurus", "billing_last_name": "smith", "items": [{ "name": "api Name", "quantity": 10, "unit_price": 2}, { "name": "api 2", "quantity": "4", "unit_price": 3 }] }'  \
   -H "Content-type: application/json" http://www.incesty.com/api/invoice/

Incesty returns a response.

Response received from Incesty:


{
    "orderId": "8G98L",
    "billing_first_name": "orliesaurus",
    "billing_last_name": "smith",
    "billing_address": "",
    "billing_zip_code": "",
    "billing_city": "",
    "email": "bill@dow.com",
    "country": "US",
    "currency": "USD",
    "total": 32.3508,
    "status": "New Invoice ",
    "invoice_url": "https://www.incesty.com/invoice/a/8G98L",
    "items": [
        {
            "name": "api Name",
            "quantity": 10,
            "unit_price": "2.0000000000"
        },
        {
            "name": "api 2",
            "quantity": 4,
            "unit_price": "3.0000000000"
        }
    ],
    "tax": 0.0,
    "subtotal": 32.0,
    "paid": "0.0000000000",
    "balance_remaining": 32.3508,
    "is_paid": false,
    "fees": 0.3508,
    "url": "https://www.incesty.com/api/invoice/8G98L/",
    "transactions": null
}

Invoice


LIST


Invoice can be created by sending a request.


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

Invoice list request send to Incesty:


curl http://www.incesty.com/api/invoice/  \
      -H 'Accept: application/json; indent=4'  \
      -H "Authorization: Bearer a9esthaVUjOuvzTCSTXsJUCK0lCMCk"

Incesty returns a response.

Response received from Incesty:


{
        "orderId": "G3X59",
        "billing_first_name": "orliesaurus",
        "billing_last_name": "smith",
        "billing_address": "",
        "billing_zip_code": "",
        "billing_city": "",
        "email": "bill@dow.com",
        "country": "US",
        "currency": "USD",
        "total": 32.3508,
        "status": "New Invoice ",
        "invoice_url": "https://www.incesty.com/invoice/a/G3X59",
        "items": [
            {
                "name": "api Name",
                "quantity": 10,
                "unit_price": "2.0000000000"
            },
            {
                "name": "api 2",
                "quantity": 4,
                "unit_price": "3.0000000000"
            }
        ],
        "tax": 0.0,
        "subtotal": 32.0,
        "paid": "0.0000000000",
        "balance_remaining": 32.3508,
        "is_paid": false,
        "fees": 0.3508,
        "url": "https://www.incesty.com/api/invoice/G3X59/",
        "transactions": null
    }

Callback Invoice - IPN


CALLBACK


Incesty sends Instant Payment Notifications (IPN) every time there is status change on invoices. They are sent to the CallBack URL setup, when you created the invoice. They are sent to Callback URL specified, the gateway needs to receive a response.


The gateway needs to receive a response:
HTTP/1.1 200 OK

The body of the HTTP POST request should be a JSON-formatted string with this structure

Response send from Incesty:


{
   "status":"Invoice can no longer receive payments",
   "btcPaid":0.0,
   "invoiceTime":"2015-11-16 21:36:47",
   "currentTime":"2015-11-26 20:35:59.134813",
   "url":"https://www.incesty.com/invoice/a/6ACX3",
   "price":36.3584,
   "crypto":{

   },
   "expireTime":"2015-11-16 22:36:47",
   "currency":"USD",
   "amount":0.111,
   "address":"171SqmnZ9v3w8Km1psvkZ7KduDQrEAEGuH",
   "buyer":{
      "lastName":"does",
      "city":"",
      "email":"bobhsr+b@gmail.com",
      "firstName":"Joe",
      "address":""
   },
   "id":"6ACX3"
}

IPNs main purpose is to alert merchant e-commerce server that Incesty Invoice has changed. The Incesty IPN is send for each invoice. The Incesty server considers a status code 200 response to be a successful send. It will keep trying times until it gets a code 200