NameDescriptionType
InvoiceAmount

The the order total

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
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"

Example: User can deposit $100 -> pay in BTC -> merchant receives GBP equivalent in CoinCorner account.

string
OrderId

The unique order id you use for your system

string
SuccessRedirectURL

Optional - Where to redirect to when the order is successful

string
FailRedirectURL

Optional - Where to redirect to when the order is canceled/failed

string
NotificationURL

Optional - The URL to callback to with events(authorising,fail,success,refunded)

string
ItemDescription

Optional - The description which will be shown on the checkout page

string
ItemCode

Optional - The itemcode which will be shown on the checkout page

string
WebsiteId

Optional - A unique identifier for your website

string
CustomerId

Optional - A unique identifier for you customer

string
Confirmations

Optional - Amount of Bitcoin Transaction confirmations you want to wait for until payment is complete (more confirmations means more secure).

integer
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

Sample:
{
  "InvoiceAmount": 1.0,
  "SettleCurrency": "sample string 2",
  "InvoiceCurrency": "sample string 3",
  "OrderId": "sample string 4",
  "SuccessRedirectURL": "sample string 5",
  "FailRedirectURL": "sample string 6",
  "NotificationURL": "sample string 7",
  "ItemDescription": "sample string 8",
  "ItemCode": "sample string 9",
  "WebsiteId": "sample string 10",
  "CustomerId": "sample string 11",
  "Confirmations": 12,
  "APIKey": "c0f59724-d6ad-472b-aa2a-88fc99b9a4ec",
  "Signature": "sample string 14",
  "Nonce": 15
}

application/xml, text/xml

Sample:
<CreateOrderParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">
  <APIKey>c0f59724-d6ad-472b-aa2a-88fc99b9a4ec</APIKey>
  <Nonce>15</Nonce>
  <Signature>sample string 14</Signature>
  <Confirmations>12</Confirmations>
  <CustomerId>sample string 11</CustomerId>
  <FailRedirectURL>sample string 6</FailRedirectURL>
  <InvoiceAmount>1</InvoiceAmount>
  <InvoiceCurrency>sample string 3</InvoiceCurrency>
  <ItemCode>sample string 9</ItemCode>
  <ItemDescription>sample string 8</ItemDescription>
  <NotificationURL>sample string 7</NotificationURL>
  <OrderId>sample string 4</OrderId>
  <SettleCurrency>sample string 2</SettleCurrency>
  <SuccessRedirectURL>sample string 5</SuccessRedirectURL>
  <WebsiteId>sample string 10</WebsiteId>
</CreateOrderParams>

Response Information

Resource Description

string

Response Formats

application/json, text/json

Sample:
"sample string 1"

application/xml, text/xml

Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>
            
    const https = require('https')
    const crypto = require('crypto');
    var APIKey = 'Your CoinCorner API Key';

    var nonce = Date.now();
    var sig = GenerateSig(nonce);

    const data = JSON.stringify({
        'InvoiceAmount': '25.00',
        'SettleCurrency': 'GBP',
        'InvoiceCurrency': 'USD',
        'OrderId': '180',
        'SuccessRedirectURL': 'https://www.YourSite.com/Checkout/Success',
        'FailRedirectURL': 'https://www.YourSite.com/Checkout/Failed',
        'NotificationURL': 'https://www.YourSite.com/Checkout/CheckOrder',
        'ItemDescription': '1 x Toaster',
        'ItemCode': '28',
        'APIKey': APIKey,
        'Signature': sig,
        'Nonce': nonce
    })

    const options = {
        host: 'checkout.coincorner.com',
        path: '/api/CreateOrder',
        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()
            
        
            
    public static async Task CreateOrderAsync()
    {
        string SecretKey = "SecretKey".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" },
            { "InvoiceAmount", "22.00" },
            { "InvoiceCurrency", "USD" },
            { "SettleCurrency", "GBP" },
            { "SuccessRedirectURL", "Your Success Redirect URL" },
            { "FailRedirectURL", "Your Fail Redirect URL" },
            { "NotificationURL", "Your call back URL" },
            { "ItemDescription", "Sony DVD player" },
            { "ItemCode", "45" },
        };

        FormUrlEncodedContent content = new FormUrlEncodedContent(values);
        HttpResponseMessage response = await client.PostAsync("https://checkout.coincorner.com/api/CreateOrder", content);
        string responseString = await response.Content.ReadAsStringAsync();
    }
            
            
    import requests
    import hmac
    import hashlib
    import time

    URL = "https://checkout.coincorner.com/api/CreateOrder"

    API_KEY = "Your CoinCorner API Key"

    nonce = int(time.time())
    data = str(nonce) + UserId + API_KEY

    sig = GenerateSig(nonce)

    data = {'InvoiceAmount': '25.00',
        'SettleCurrency':'GBP',
        'InvoiceCurrency':'USD',
        'OrderId':'574',
        'SuccessRedirectURL':'http://www.YourSite.com/Checkout/Success',
        'FailRedirectURL': 'http://www.YourSite.com/Checkout/Failed',
        'NotificationURL': 'https://www.YourSite.com/Checkout/CheckOrder',
        'ItemDescription': 'Flip Flops',
        'ItemCode': '45',
        'APIKey': API_KEY,
        'Signature': sig,
        'Nonce': nonce
    }

    response = requests.post(url = URL, data = data)
            
        
            
    <?php

        function CreateOrder()
        {

            $nonce = (int)(microtime(true) * 1e6);
            $api_key = 'PublicKey';

            
            $sig = Generate_Sig($nonce);

            $params  = array (
                'OrderId' => '55733',
                'InvoiceAmount'  => '22.00',
                'SettleCurrency' => 'GBP',
                'InvoiceCurrency' => 'USD',
                'SuccessRedirectURL' => 'Your Success Redirect URL',
                'FailRedirectURL' => 'Your Fail Redirect URL',
                'NotificationURL' => '"Your call back URL"',
                'ItemDescription' => 'Sony DVD player',
                'ItemCode' =>  '45',
                'APIKey' => $api_key,
                'nonce' => $nonce,
                'Signature' => $sig,
            );

            $url  = 'https://checkout.coincorner.com/api/CreateOrder';
            $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);
            header('Location:' . $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/CreateOrder', body: {
        'APIKey' => $APIKey,
        'Signature' => $sig,
        'Nonce' => $nonce,
        'UserId' => $UserId,
        'OrderId' => '17',
        'InvoiceAmount' => '25.00',
        'SettleCurrency' => 'GBP',
        'InvoiceCurrency' => 'USD',
        'SuccessRedirectURL':'http://www.YourSite.com/Checkout/Success',
        'FailRedirectURL': 'http://www.YourSite.com/Checkout/Failed',
        'NotificationURL': 'https://www.YourSite.com/Checkout/CheckOrder',
        'ItemDescription' => ' 1 x DVD Player'

    })