LivePay API

Introduction

The LivePay API will provide access to our services and information to our sellers. If you would like to see a particular function added, please click the Contact menu item above. API calls are implemented as HTTP POST calls to https://apic.livepay.io

API Setup

The only setup needed is to go to the API Keys page and generate an API key. You will be given a private and public key used to authenticate your API calls. Make sure you don't share your private key with any 3rd parties!

Authentication

Every API call has a SHA-512 HMAC signature generated with your private key. Our server generates it's own HMAC signature and compares it with the API caller's. If they don't match the API call is discarded. The HMAC signature is sent as a HTTP header called 'HMAC'.

The HMAC signature is created from the full raw POST data of your request. For example if your API secret key was "test" and public key was "your_api_public_key" (both without quotes) and you were using the get_callback_address function the raw request might look like:

currency=BTC&version=2&cmd=get_callback_address&key=your_api_public_key&format=json

and the HMAC would be: 1f8a643efbad0f78bd3a8602fadaf98958179f0a009b38aafece7ab20a01cf7f7378e37a46adf8c20438b5965d63804f0de1942d9659aefe39acf86adf4ad512

API Response

The API will return an array with 1 or 2 elements: 'error' and 'result'. The result will always have an 'error' field. If its value is 'ok' (case-sensitive) the API call was a success, otherwise it will contain an error message. If there is data to return to you, it will be stored as an array in the 'result' element.

API POST Fields

API calls are made as basic HTTP POST requests using the following variables: (note: The POST data is regular application/x-www-form-urlencoded style data, not JSON or XML)

Field Name Description Required?
Main Fields
These fields will be here for all calls.
version 1 Yes
key Your API public key Yes
cmd The API you are calling Yes
format The format of response to return (default: json) No