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": "6e970e9f-f9f9-47e8-b132-a9a6d532d151", "Signature": "sample string 3", "Nonce": 4 }
application/xml, text/xml
<CheckOrderParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Controllers"> <APIKey xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">6e970e9f-f9f9-47e8-b132-a9a6d532d151</APIKey> <Nonce xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">4</Nonce> <Signature xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">sample string 3</Signature> <OrderId>sample string 1</OrderId> </CheckOrderParams>
Response Information
Resource Description
Name | Description | Type |
---|---|---|
OrderId |
The unique order id you use for your system |
string |
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 |
Response Formats
application/json, text/json
{ "OrderId": "sample string 1", "OrderStatus": 1, "OrderStatusText": "Pending Confirmation" }
application/xml, text/xml
<MerchantOrder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models"> <OrderId>sample string 1</OrderId> <OrderStatus>1</OrderStatus> <OrderStatusText>Pending Confirmation</OrderStatusText> </MerchantOrder>
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/CheckOrder',
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()
internal class OrderResponse
{
public string OrderStatus { get; set; }
public string OrderStatusText { get; set; }
public string Error { get; set; }
}
public static async Task CheckOrderAsync()
{
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" , "1b" },
};
FormUrlEncodedContent content = new FormUrlEncodedContent(values);
HttpResponseMessage response = await client.PostAsync("https://checkout.coincorner.com/api/CheckOrder", content);
string OrderResponse = await response.Content.ReadAsStringAsync();
OrderResponse result = JsonConvert.DeserializeObject<OrderResponse>(OrderResponse);
}
import requests
import time
URL = "https://checkout.coincorner.com/api/CheckOrder"
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)
<?php
function CheckOrder()
{
$nonce = (int)(microtime(true) * 1e6);
$api_key = 'PublicKey';
$sig = Generate_Sig($nonce);
$params = array(
'OrderId' => '55734',
'APIKey' => $api_key,
'nonce' => $nonce,
'Signature' => $sig,
);
$url = 'https://checkout.coincorner.com/api/CheckOrder';
$curl = curl_init();
$curl_options = array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $url);
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);
$order_status = $response['OrderStatus'];
}
?>
#!/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/CheckOrder', body: {
'APIKey' => $APIKey,
'Signature' => $sig,
'Nonce' => $nonce,
'UserId' => $UserId,
'OrderId' => '17',
})