Name | Description | Type |
---|---|---|
OrderId |
The unique order id you use for your system |
string |
APIKey |
Your public API Key which can be found in your account |
globally unique identifier |
Signature |
Your encrypted signature which includes your APIKey, UserId and Nonce, then salted with your API Secret |
string |
Nonce |
A constantly incrementing integer, you can use a timestamp for example. Example: 34235 |
integer |
Request Formats
application/json, text/json
{ "OrderId": "sample string 1", "APIKey": "3e4941f4-adcb-43ac-867e-439c91fee289", "Signature": "sample string 3", "Nonce": 4 }
application/xml, text/xml
<GetOrderParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models"> <APIKey>3e4941f4-adcb-43ac-867e-439c91fee289</APIKey> <Nonce>4</Nonce> <Signature>sample string 3</Signature> <OrderId>sample string 1</OrderId> </GetOrderParams>
Response Information
Resource Description
Name | Description | Type |
---|---|---|
OrderId |
The unique order id you use for your system |
string |
PaymentAddress |
The BTC address that the order is paid to |
string |
InvoiceAmount |
The invoice amount for the order (denominated in the InvoiceCurrency) |
decimal number |
InvoiceCurrency |
This is the currency symbol that the order will be invoiced in (What the user is displayed), for example if the merchant uses USD on their website, they can set the "InvoiceCurrency" to "USD", meaning the user will see a BTC/USD rate when paying for the order, but in the background the merchant receives whatever is specified in "SettleCurrency" |
string |
SettleAmount |
The amount that would be settled (denominated in the SettleCurrency) |
decimal number |
SettleCurrency |
This is the currency symbol that the order will be settled in (what currency the BTC is flipped to), the only two settle currencies available at the moment are "GBP" and "EUR" |
string |
CryptoAmount |
The BTC amount for the order |
decimal number |
ExpiryDate |
The date at which your order will expire if unpaid |
date |
OrderStatus |
Returns the status code of the order. The id corresponds as follows: |
integer |
OrderStatusText |
The status of your order displayed in text format |
string |
QRCode |
A url linking to a QR code for your order |
string |
IncludeLightning |
Boolean returning whether a lightning invoice is available |
boolean |
LightningInvoice |
The lightning invoice the order can be paid with |
string |
LightningInvoiceQRCode |
A url linking to a QR code for the lightning invoice of the order |
string |
Response Formats
application/json, text/json
{ "OrderId": "sample string 1", "PaymentAddress": "sample string 2", "InvoiceAmount": 3.0, "InvoiceCurrency": "sample string 4", "SettleAmount": 5.0, "SettleCurrency": "sample string 6", "CryptoAmount": 7.0, "ExpiryDate": "2024-11-11T04:24:40.5088795+00:00", "OrderStatus": 1, "OrderStatusText": "Pending Confirmation", "QRCode": "https://api.coincorner.com/QR/Generate?height=300&width=300&address=bitcoin:sample string 2?amount=7.00000000", "IncludeLightning": true, "LightningInvoice": "sample string 12", "LightningInvoiceQRCode": "https://api.coincorner.com/QR/Generate?height=300&width=300&address=sample string 12" }
application/xml, text/xml
<OrderDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models"> <CryptoAmount>7</CryptoAmount> <ExpiryDate>2024-11-11T04:24:40.5088795+00:00</ExpiryDate> <IncludeLightning>true</IncludeLightning> <InvoiceAmount>3</InvoiceAmount> <InvoiceCurrency>sample string 4</InvoiceCurrency> <LightningInvoice>sample string 12</LightningInvoice> <LightningInvoiceQRCode>https://api.coincorner.com/QR/Generate?height=300&width=300&address=sample string 12</LightningInvoiceQRCode> <OrderId>sample string 1</OrderId> <OrderStatus>1</OrderStatus> <OrderStatusText>Pending Confirmation</OrderStatusText> <PaymentAddress>sample string 2</PaymentAddress> <QRCode>https://api.coincorner.com/QR/Generate?height=300&width=300&address=bitcoin:sample string 2?amount=7.00000000</QRCode> <SettleAmount>5</SettleAmount> <SettleCurrency>sample string 6</SettleCurrency> </OrderDetails>
public static async Task GetOrder()
{
string PublicKey = "PublicKey".ToLower();
string nonce = ((int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds).ToString();
string CCSignature = GetHash(nonce);
Dictionary<string, string> values = new Dictionary<string, string>
{
{ "APIKey", PublicKey },
{ "Signature", CCSignature },
{ "Nonce", nonce },
{ "OrderId", "557342" },
};
FormUrlEncodedContent content = new FormUrlEncodedContent(values);
HttpResponseMessage response = await client.PostAsync("https://checkout.coincorner.com/api/GetOrder", content);
string Response = await response.Content.ReadAsStringAsync();
}
<?php
function GetOrder()
{
$nonce = (int)(microtime(true) * 1e6);
$Api_Key = 'PublicKey';
$sig = Generate_Sig($nonce);
$params = array (
'OrderId' => '557342',
'APIKey' => $Api_Key,
'nonce' => $nonce,
'Signature' => $sig,
);
$url = 'https://checkout.coincorner.com/api/GetOrder';
$curl = curl_init();
$curl_options = array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $url);
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
array_merge($curl_options, array(CURLOPT_POST => 1));
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($params));
curl_setopt_array($curl, $curl_options);
curl_setopt($curl, CURLOPT_HTTPHEADER, array());
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
$response = json_decode(curl_exec($curl), TRUE);
$http_status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
print_r($response);
exit();
}
?>
#!/usr/bin/env ruby
require 'httparty'
require 'date'
$APIKey = 'Your CoinCorner APIKey'
$nonce = DateTime.now.strftime('%Q')
$sig = GenerateSig($nonce)
$response = HTTParty.post('https://checkout.coincorner.com/api/GetOrder', body: {
'APIKey' => $APIKey,
'Signature' => $sig,
'Nonce' => $nonce,
'UserId' => $UserId,
'OrderId' => '17',
})
import requests
import time
URL = " https://checkout.coincorner.com/api/GetOrder"
API_KEY = "Your CoinCorner API Key"
nonce = int(time.time())
sig = GenerateSig(nonce)
data = {
'OrderId':'574',
'APIKey': API_KEY,
'Signature': sig,
'Nonce': nonce
}
response = requests.post(url = URL, data = data)
const https = require('https')
var APIKey = 'Your CoinCorner API Key';
var nonce = Date.now();
var sig = GenerateSig(nonce);
const data = JSON.stringify({
'OrderId': '180',
'APIKey': APIKey,
'Signature': sig,
'Nonce': nonce
})
const options = {
host: 'checkout.coincorner.com',
path: '/api/GetOrder',
protocol: 'https:',
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Content-Length': Buffer.byteLength(data)
}
}
const req = https.request(options, (res) => {
res.setEncoding('utf8');
res.on('data', (chunk) => {
console.log(`BODY: ${chunk}`);
});
});
req.write(data);
req.end()