NameDescriptionType
OrderId

The unique order id you use for your system

string
Amount

The amount you want to refund (denominated in the invoice currency of the order)

decimal number
Address

The BTC address you want to refund to

string
RefundType

The type of refund you want to process

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:
{
  "OrderId": "sample string 1",
  "Amount": 2.0,
  "Address": "sample string 3",
  "RefundType": 0,
  "APIKey": "1f15e238-053c-4ef0-8a20-f9b6ef804aba",
  "Signature": "sample string 5",
  "Nonce": 6
}

application/xml, text/xml

Sample:
<RefundOrderParams xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CCPayments.Models">
  <APIKey>1f15e238-053c-4ef0-8a20-f9b6ef804aba</APIKey>
  <Nonce>6</Nonce>
  <Signature>sample string 5</Signature>
  <Address>sample string 3</Address>
  <Amount>2</Amount>
  <OrderId>sample string 1</OrderId>
  <RefundType>BuyNew</RefundType>
</RefundOrderParams>

Response Information

Resource Description

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.

            
    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", "55" },
            { "Amount", "10.00" },
            { "Address", "Bitcoin Wallet Address" },
            { "RefundType", "1" },
        };
        FormUrlEncodedContent content = new FormUrlEncodedContent(values);
        HttpResponseMessage response = await client.PostAsync("https://checkout.coincorner.com/api/RefundOrder", content);
        string Response = await response.Content.ReadAsStringAsync();
    }
                
        
            
    <?php

        function RefundOrder()
        {

            $nonce = (int)(microtime(true) * 1e6);
            $Api_Key = 'Your API Key';

            $sig = Generate_Sig($nonce);

            $params  = array (
                'OrderId' => '923',
                'APIKey' => $Api_Key,
                'nonce' => $nonce,
                'Signature' => $sig,
                'RefundType' => '1',
                'Amount' => '10.00',
                'Address' => 'Bitcoin Wallet Address'
            );

            $url  = 'https://checkout.coincorner.com/api/RefundOrder';

            $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);

            exit();
        }
    ? >
                
            
    #!/usr/bin/env ruby

    require 'httparty'
    require 'date'
          
    $APIKey = 'Your API Key'
    $nonce = DateTime.now.strftime('%Q')

    $sig = GenerateSig($nonce)

    $response = HTTParty.post('https://checkout.coincorner.com/api/RefundOrder', body: {
        'APIKey' => $APIKey,
        'Signature' => $sig,
        'Nonce' => $nonce,
        'UserId' => $UserId,
        'OrderId' => '54',
        'Amount' => '10.00',
        'Address' => 'Bitcoin Wallet Address',
        'RefundType' => '1',
    })

                
        
            
    import requests
    import time
        
    URL = "https://checkout.coincorner.com/api/RefundOrder"

    API_KEY = "Your API Key"

    nonce = int(time.time())

    sig = GenerateSig(nonce)

    data = {
        'OrderId':'575',
        'APIKey': API_KEY,
        'Signature': sig,
        'Nonce': nonce,
        'Address':'Bitcoin Wallet Address',
        'RefundType': '1',
        'Amount': '25.00'
    }

    response = requests.post(url = URL, data = data)
                
            
            
    const https = require('https')
                 
    var APIKey = 'Your API Key';

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

    const data = JSON.stringify({
        'APIKey': APIKey,
        'Signature': sig,
        'Nonce': nonce,
        'OrderId':'456',
        'Amount':'25.00',
        'RefundType':'1',
        'Address':'Bitcoin Wallet Address'

    })

    const options = {
        host: 'checkout.coincorner.com',
        path: '/api/RefundOrder',
        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()