Responses

All responses to requests to BIPS API endpoint version 2 listed under Versions, will be returned in the same type of JSON encoded envelope structure. This document describes how that envelope works and what it may contain.

Invoice API
Version 1

Requests to BIPS Invoice API endpoint version 1 will return URL as the only response. You should redirect the customers to the URL received.

Sample Invoice URL

https://bips.me/invoice/Cb/sIk
Version 2

In cases where it's not possible to redirect the customer to BIPS invoice checkout or use Embedded Invoice because of Content Security Policy or similar.

You manage the checkout process, and need to make sure the amount to the bitcoin address is paid within the expiry response.

Sample Response Envelope

{
 "invoice_id": 'sIk',
 "address": '1UpE17cik2edTr8TjSVskcgJodTeCijoi',
 "amount": 1.00000000,
 "created": 1310717260,
 "expiry": 1310719760
}
invoice_id Short code of invoice ID.
address Bitcoin address.
amount Currency converted to Bitcoin amount.
created Invoice creation date.
expiry When the invoice is to be paid the latest.

The above response works great with our WebSocket technology.

Void Invoice API
Version 1

When you generate an invoice, it is posted, so it cannot be deleted. If you need to cancel an invoice, you can void it. After you void an invoice, the customer will be refunded the original bitcoin amount minus network fees. Please read our Void Invoice Request API for making requests.

Sample Response Envelope

{
 "status": 1,
 "message": 'Success'
}
status On successful the status will always be 1
message Success

Void Invoice API Statuses


“status” “message”
2 Invalid Invoice ID
3 Invalid Bitcoin Address
4 Void not possible
5 Timeframe expired
6 Insufficient funds

This section was last updated on May 20, 2014 and replaces all previous versions of this document.