Authentication
Wallet
Balance
Transactions
Payment Info
Req. Payment
Cancel Payment
Send Payment
Authentication
POST/api/auth
Receive a API Bearer Authentication Token - Valid for 1 hour
Response
{
    "err": null,
    "token": "...TOKEN..."
}
Request
Bash
curl -X POST https://api.lidia.co.in/api/auth -H 'Cache-Control: no-cache' -H 'cache-control: no-cache' -H 'Content-Type: application/json' -H 'Host: api.lidia.co.in' -d '{"account": "...Account, ex. AAAA-0000...","password": "...password..."}'
Java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"account\": \"...Account, ex. AAAA-0000...\",\n\t\"password\": \"...password...\"\n}");
Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/auth")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "api.lidia.co.in")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.lidia.co.in/api/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\t\"account\": \"...Account, ex. AAAA-0000...\",\n\t\"password\": \"...password...\"\n}",
CURLOPT_HTTPHEADER => array(
    "Cache-Control: no-cache",
    "Content-Type: application/json",
    "Host: api.lidia.co.in",
    "cache-control: no-cache",
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'POST',
url: 'https://api.lidia.co.in/api/auth',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    'Content-Type': 'application/json' },
body: { account: '...Account, ex. AAAA-0000...', password: '...password...' },
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});

C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/auth");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"account\": \"...Account, ex. AAAA-0000...\",\n\t\"password\": \"...password...\"\n}");

CURLcode ret = curl_easy_perform(hnd);
Swift
import Foundation

let headers = [
"Content-Type": "application/json",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"cache-control": "no-cache"
]
let parameters = [
"account": "...Account, ex. AAAA-0000...",
"password": "...password..."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/auth")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()
Wallet
GET/api/wallet
Receive the wallet information installed
Response
{
    "result": {
        "Account": "...Account ID...",
        "BTCAddress": "...Address...",
        "BTCAddressDemo": "...Address...",
        "PhoneId": "...Phone ID...",
        "XRPAddress": "...Address...",
        "XRPAddressDemo": "...Address..."
    }
}
Request
Bash
curl -X GET https://api.lidia.co.in/api/wallet -H 'Authorization: Bearer ...TOKEN...' -H 'Cache-Control: no-cache'
Java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/wallet")
.get()
.addHeader("Authorization", "Bearer ...TOKEN...")
.addHeader("Cache-Control", "no-cache")
.addHeader("Connection", "keep-alive")
.build();

Response response = client.newCall(request).execute();

PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_PORT => "443",
CURLOPT_URL => "https://api.lidia.co.in/api/wallet",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer ...TOKEN...",
    "Cache-Control: no-cache",
    "Connection: keep-alive",
    "Host: api.lidia.co.in",
    "cache-control: no-cache"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'GET',
url: 'https://api.lidia.co.in/api/wallet',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    Authorization: 'Bearer ...TOKEN...' } };

request(options, function (error, response, body) {
    if (error) throw new Error(error);
        console.log(body);
});

C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/wallet");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Connection: keep-alive");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Authorization: Bearer ...TOKEN...");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);

Swift
import Foundation

let headers = [
"Authorization": "Bearer ...TOKEN...",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"cache-control": "no-cache"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/wallet")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()
Balance
GET/api/balance
Identifies the balance of each network blockchain of the wallet
Response
{
    "err": null,
    "balance": {
        "real_account": {
            "BTCAddress": "...Address...",
            "BTCBalance": ...Balance...,
            "XRPAddress": "...Address...",
            "XRPBalance": ...Balance...
        },
        "demo_account": {
            "BTCAddress": "...Address...",
            "BTCBalance": ...Balance...,
            "XRPAddress": "...Address...",
            "XRPBalance": "...Balance..."
        },
        "btc_price": {
            "price": ...Bitcoin Price...,
            "fiatbase": "USD"
        },
        "xrp_price": {
            "price": ...Ripple Price...,
            "fiatbase": "USD"
        }
    }
}
Request
Bash
curl -X GET https://api.lidia.co.in/api/balance -H 'Authorization: Bearer ...TOKEN...' -H 'Cache-Control: no-cache' -H 'Host: api.lidia.co.in' -H 'cache-control: no-cache'
Java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/balance")
.get()
.addHeader("Authorization", "Bearer ...TOKEN...")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "api.lidia.co.in")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.lidia.co.in/api/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
    "Accept: */*",
    "Authorization: Bearer ...TOKEN...",
    "Cache-Control: no-cache",
    "Host: api.lidia.co.in",
    "cache-control: no-cache"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'GET',
url: 'https://api.lidia.co.in/api/balance',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    Authorization: 'Bearer ...TOKEN...' } };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});

C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/balance");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Authorization: Bearer ...TOKEN...");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
Swift
import Foundation

let headers = [
"Authorization": "Bearer ...TOKEN...",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"cache-control": "no-cache"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/balance")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()
Transactions
GET/api/transactions
List of transactions, payments and receipts
Response
{
    "err": null,
    "transactions": {
        "result": [
            {
                "txid": "...Transaction ID...",
                "phoneid": "...Phone ID...",
                "coin": "...Cryptocurrency Coin Symbol...",
                "totalincoin": ...Transaction value in Cryptocurrency...,
                "totalinfiat": ...Transaction value in Fiat currency,
                "fiatcurrency": "...Fiat currency symbol...",
                "coinvalueinfiat": ...Price of Cryptocurrency in Fiat currency at transaction creation...,
                "minerfee": ... Blockchain Miner Fee...,
                "txidblockchain": "...Blockchain Transaction ID...",
                "status": "...Transaction Status...",
                "paymentdate": ...Payment Date,
                "transactiondate": "...Transaction Creation Date...",
                "demolive": "...D or L...",
                "accountpayer": "...Payer Account ID...",
                "administration_fee": ...Administration Fee...,
                "administration_fee_paid": ...true or false...,
                "phoneidpayer": "...Payer Phone ID..."
            },
            {
                ...Next transaction
            },
            ...Array items
    
}
Request
Bash
curl -X GET https://api.lidia.co.in/api/transactions -H 'Accept: */*' -H 'Authorization: Bearer ...TOKEN...' -H 'Cache-Control: no-cache' -H 'Host: api.lidia.co.in' -H 'cache-control: no-cache'
Java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/transactions")
.get()
.addHeader("Authorization", "Bearer ...TOKEN...")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "api.lidia.co.in")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.lidia.co.in/api/transactions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer ...TOKEN...",
    "Cache-Control: no-cache",
    "Host: api.lidia.co.in",
    "cache-control: no-cache"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'GET',
url: 'https://api.lidia.co.in/api/transactions',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    Authorization: 'Bearer ...TOKEN...' } };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/transactions");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Authorization: Bearer ...TOKEN...");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
Swift
import Foundation

let headers = [
"Authorization": "Bearer ...TOKEN...",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"cache-control": "no-cache"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/transactions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()















Payment Info
GET/api/paymentinfo/{Transaction ID}/{Cashier}
Data of specific payment
Response
{
    "err": null,
    "payment": {
                "txid": "...Transaction ID...",
                "demolive": "...D or L...",
                "accountpayer": "...Payer Account ID...",
                "phoneid": "...Phone ID...",
                "phoneidpayer": "...Payer Phone ID...",
                "coin": "...Cryptocurrency Coin Symbol...",
                "totalincoin": ...Transaction value in Cryptocurrency...,
                "totalinfiat": ...Transaction value in Fiat currency,
                "fiatcurrency": "...Fiat currency symbol...",
                "coinvalueinfiat": ...Price of Cryptocurrency in Fiat currency at transaction creation...,
                "minerfee": ... Blockchain Miner Fee...,
                "administration_fee": ...Administration Fee...,
                "txidblockchain": "...Blockchain Transaction ID...",
                "status": "...Transaction Status...",
                "paymentdate": ...Payment Date,
                "transactiondate": "...Transaction Creation Date...",
                "administration_fee_paid": ...true or false...
            }
    
}
Request
Bash
curl -X GET https://api.lidia.co.in/api/paymentinfo/...Transaction ID.../...Cashier... -H 'Authorization: Bearer ...TOKEN...' -H 'Host: api.lidia.co.in' -H 'Cache-Control: no-cache' -H 'cache-control: no-cache'
Java
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/paymentinfo/...Transaction ID.../...Cashier...")
.get()
.addHeader("Authorization", "Bearer ...TOKEN...")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "api.lidia.co.in")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.lidia.co.in/api/paymentinfo/...Transaction ID.../...Cashier...",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer ...TOKEN...",
    "Cache-Control: no-cache",
    "Host: api.lidia.co.in",
    "cache-control: no-cache"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'GET',
url: 'https://api.lidia.co.in/api/paymentinfo/...Transaction ID.../...Cashier...',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    Authorization: 'Bearer ...TOKEN...' } };

request(options, function (error, response, body) {
    if (error) throw new Error(error);
    console.log(body);
});

C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/paymentinfo/...Transaction ID.../...Cashier...");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Authorization: Bearer ...TOKEN...");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);
Swift
import Foundation

let headers = [
"Authorization": "Bearer ...TOKEN...",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"cache-control": "no-cache"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/paymentinfo/...Transaction ID.../...Cashier...")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()
Request Payment
POST/api/requestpayment
Registers a pending payment
Response
{
    "err": null,
    "transaction": {
        "txid": "...Transaction ID...",
        "totalincoin": ...Total In Cryptocurrency...,
        "totalinfiat": ...Total in Fiat currency...,
        "fiatcurrency": "...3-digit Fiat currency (ex. GBP, USD, BRL, etc.)...",
        "coinvalueinfiat": ...Criptocurrency Price in Fiat at Transaction Creation...,
        "minerfee": ...Blockchain Miner Fee...,
        "administration_fee": ...Administration Fee...
    }
}
Request
Bash
curl -X POST https://api.lidia.co.in/api/requestpayment -H 'Authorization: Bearer ...TOKEN...' -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -H 'Host: api.lidia.co.in' -d '{
    "demolive": "...D or L (Demo or Live)...",
    "coin": "...3-digit crypto coin (BTC or XRP)...",
    "totalinfiat": ...Value in fiat (Float format)...,
    "fiatcurrency": "...3-digit Fiat Currency (ex. GBP, USD, BRL, etc.)..."
}'
Java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"demolive\": \"...D or L (Demo or Live)...\",\n\t\"coin\": \"...3-digit crypto coin (BTC or XRP)...\",\n\t\"totalinfiat\": ...Value in fiat (Float format)...,\n\t\"fiatcurrency\": \"...3-digit Fiat Currency (ex. GBP, USD, BRL, etc.)...\"\n}");
Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/requestpayment")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer ...TOKEN...")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "api.lidia.co.in")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.lidia.co.in/api/requestpayment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\t\"demolive\": \"...D or L (Demo or Live)...\",\n\t\"coin\": \"...3-digit crypto coin (BTC or XRP)...\",\n\t\"totalinfiat\": ...Value in fiat (Float format)...,\n\t\"fiatcurrency\": \"...3-digit Fiat Currency (ex. GBP, USD, BRL, etc.)...\"\n}",
CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer ...TOKEN...",
    "Cache-Control: no-cache",
    "Content-Type: application/json",
    "Host: api.lidia.co.in",
    "cache-control: no-cache"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'POST',
url: 'https://api.lidia.co.in/api/requestpayment',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    Authorization: 'Bearer ...TOKEN...',
    'Content-Type': 'application/json' },
body: 
{ demolive: '...D or L (Demo or Live)...',
    coin: '...3-digit crypto coin (BTC or XRP)...',
    totalinfiat: ...Value in fiat (Float format)...,
    fiatcurrency: '...3-digit Fiat Currency (ex. GBP, USD, BRL, etc.)...' },
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/requestpayment");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Authorization: Bearer ...TOKEN...");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"demolive\": \"...D or L (Demo or Live)...\",\n\t\"coin\": \"...3-digit crypto coin (BTC or XRP)...\",\n\t\"totalinfiat\": ...Value in fiat (Float format)...,\n\t\"fiatcurrency\": \"...3-digit Fiat Currency (ex. GBP, USD, BRL, etc.)...\"\n}");

CURLcode ret = curl_easy_perform(hnd);
Swift
import Foundation

let headers = [
"Content-Type": "application/json",
"Authorization": "Bearer ...TOKEN...",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"cache-control": "no-cache"
]
let parameters = [
"demolive": "...D or L (Demo or Live)...",
"coin": "...3-digit crypto coin (BTC or XRP)...",
"totalinfiat": ...Value in fiat (Float format)...,
"fiatcurrency": "...3-digit Fiat Currency (ex. GBP, USD, BRL, etc.)..."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/requestpayment")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()
Cancel Requested Payment
POST/api/cancelrequestedpayment
Registers a pending payment
Response
{
    "err": null,
    "result": "OK"
}
Request
Bash
curl -X POST https://api.lidia.co.in/api/cancelpayment -H 'Authorization: Bearer ...TOKEN...' -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -H 'Host: api.lidia.co.in' -H 'cache-control: no-cache' -d '{"txid": "...ID of Transaction to Cancel..."}'
Java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"txid\": \"...ID of Transaction to Cancel...\"\n}");
Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/cancelpayment")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer ...TOKEN...")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "api.lidia.co.in")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.lidia.co.in/api/cancelpayment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\t\"txid\": \"...ID of Transaction to Cancel...\"\n}",
CURLOPT_HTTPHEADER => array(
    "Accept: */*",
    "Authorization: Bearer ...TOKEN...",
    "Cache-Control: no-cache",
    "Content-Type: application/json",
    "Host: api.lidia.co.in",
    "cache-control: no-cache"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'POST',
url: 'https://api.lidia.co.in/api/cancelpayment',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    Authorization: 'Bearer ...TOKEN...',
    'Content-Type': 'application/json' },
body: { txid: '...ID of Transaction to Cancel...' },
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/cancelpayment");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Authorization: Bearer ...TOKEN...");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"txid\": \"...ID of Transaction to Cancel...\"\n}");

CURLcode ret = curl_easy_perform(hnd);
Swift
import Foundation

let headers = [
"Content-Type": "application/json",
"Authorization": "Bearer ...TOKEN...",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"Connection": "keep-alive",
"cache-control": "no-cache"
]
let parameters = ["txid": "...ID of Transaction to Cancel..."] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/cancelpayment")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()
Send Payment
POST/api/sendpayment
Makes the payment of a pending request
Response
{
    "err": null,
    "blockchain_transaction_id": "...Blockchain Transaction ID..."
}
Request
Bash
curl -X POST https://api.lidia.co.in/api/sendpayment -H 'Authorization: Bearer ...TOKEN...' -H 'Cache-Control: no-cache' -H 'Content-Type: application/json' -H 'Host: api.lidia.co.in' -H 'cache-control: no-cache' -d '{"account": "...Receiver Account...", "txid": "...ID of Transaction to Pay..."}'
Java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n\t\"account\": \"...Receiver Account...\",\n\t\"txid\": \"...ID of Transaction to Pay...\"\n}");
Request request = new Request.Builder()
.url("https://api.lidia.co.in/api/sendpayment")
.post(body)
.addHeader("Content-Type", "application/json")
.addHeader("Authorization", "Bearer ...TOKEN...")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "api.lidia.co.in")
.addHeader("cache-control", "no-cache")
.build();

Response response = client.newCall(request).execute();
PHP
$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.lidia.co.in/api/sendpayment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\n\t\"account\": \"...Receiver Account...\",\n\t\"txid\": \"...ID of Transaction to Pay...\"\n}",
CURLOPT_HTTPHEADER => array(
    "Accept: */*",
    "Authorization: Bearer ...TOKEN...",
    "Cache-Control: no-cache",
    "Content-Type: application/json",
    "Host: api.lidia.co.in",
    "cache-control: no-cache"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Node.JS
var request = require("request");

var options = { method: 'POST',
url: 'https://api.lidia.co.in/api/sendpayment',
headers: 
{ 'cache-control': 'no-cache',
    Host: 'api.lidia.co.in',
    'Cache-Control': 'no-cache',
    Authorization: 'Bearer ...TOKEN...',
    'Content-Type': 'application/json' },
body: { account: '...Receiver Account...', txid: '...ID of Transaction to Pay...' },
json: true };

request(options, function (error, response, body) {
if (error) throw new Error(error);

console.log(body);
});
C
CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.lidia.co.in/api/sendpayment");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "cache-control: no-cache");
headers = curl_slist_append(headers, "Host: api.lidia.co.in");
headers = curl_slist_append(headers, "Cache-Control: no-cache");
headers = curl_slist_append(headers, "Authorization: Bearer ...TOKEN...");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n\t\"account\": \"...Receiver Account...\",\n\t\"txid\": \"...ID of Transaction to Pay...\"\n}");

CURLcode ret = curl_easy_perform(hnd);
Swift
import Foundation

let headers = [
"Content-Type": "application/json",
"Authorization": "Bearer ...TOKEN...",
"Cache-Control": "no-cache",
"Host": "api.lidia.co.in",
"cache-control": "no-cache"
]
let parameters = ["account": "...Receiver Account...", "txid": "...ID of Transaction to Pay..."] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.lidia.co.in/api/sendpayment")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
if (error != nil) {
    print(error)
} else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
}
})

dataTask.resume()