The Cryptorch API follows RESTful architecture standards, offering clear and consistent resource-based endpoints. All requests and responses are transmitted in JSON format, leveraging standard HTTP verbs, status codes, and authentication protocols to enable secure, efficient, and scalable integrations.

API Base URL

Please note that Cryptorch does not provide a sandbox or test environment. All API requests are processed in the live environment, so ensure that all request data and parameters are accurate before making any calls.

string
https://www.cryptorch.com/api

All requests to the Cryptorch API require authentication. Each API request must include a valid client-id and client-secret to the request header, which can be obtained from your Cryptorch Dashboard under Developer Tools.

In addition to credentials, Cryptorch enforces IP-based security. You must register and enable your server’s public IP address in the IP Whitelist section of the dashboard. Requests originating from non-whitelisted IP addresses will be automatically rejected.

Both valid API credentials and an approved IP address are mandatory. Without completing these two steps, authentication will fail and API access will not be granted.

All responses from the Cryptorch API are returned in JSON format. Each response follows a consistent structure and includes a status indicator, message, and relevant data payload when applicable. Standard HTTP status codes are used to represent the outcome of each request.

Sample Success Response

JSON
{
"status": "success",
"remark": "invoice_created",
"message":[
    "Invoice created successfully"
],
"data": {
   ...you get all data here
    }
}
                    

Error Sample Response

JSON
{
    "remark": "Unauthorized",
    "status": "error",
    "message": [
        "The client secret is required"
    ]
}
                    
JSON
 {
    "remark": "Unauthorized",
    "status": "error",
    "message": [
        "Access to this API endpoint is restricted to IP addresses that have been explicitly whitelisted.",
        "In order to access this API endpoint, please add your IP address (::1) to the white list from the user dashboard."
    ]
}
                    
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.cryptorch.com/api/invoice-list',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

 
                                
                        
Query Parameters

Query parameters that allow you to customize the API response.

Name Description Required Default
page Specifies the page number to retrieve. No 1
paginate Defines the number of items returned per page. No 20
search Search by invoice ID. No -
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.cryptorch.com/api/invoice-details/:invoice_id',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.cryptorch.com/api/invoice-status/:invoice_id',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.cryptorch.com/api/payment-list',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

 
                                
                        
Query Parameters

Query parameters that allow you to customize the API response.

Name Description Required Default
page Specifies the page number to retrieve. No 1
paginate Defines the number of items returned per page. No 20
search Search by payment ID/TRX. No -
php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.cryptorch.com/api/payment-status/payment_id',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.cryptorch.com/api/supported-currencies',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'client-id: YOUR-CLIENT-ID',
    'client-secret: YOUR-CLIENT-SECRET',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

 
                                
                        
Query Parameters

Query parameters that allow you to customize the API response.

Name Description Required Default
page Specifies the page number to retrieve. No 1
paginate Defines the number of items returned per page. No 20
search Search by currency name or code. No -
php

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://www.cryptorch.com/api/payment-initiate',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_POST => true, // <- Use POST
    CURLOPT_POSTFIELDS => array(
        'amount'            => 100,
        'currency'          => '1',
        'merchant_trx'      => 'TX123456',
        'success_url'       => 'https://example.com/success',
        'failed_url'        => 'https://example.com/failed',
        'ipn_url'           => 'https://example.com/ipn',
        'order_description' => 'Payment for Order #9876',
    ),
    CURLOPT_HTTPHEADER => array(
        'client-id: YOUR-CLIENT-ID',
        'client-secret: YOUR-CLIENT-SECRET',
    ),
));

$response = curl_exec($curl);
curl_close($curl);
echo $response;

Required Fields

The following fields are required to create a new contact in the system.

Name Required Description
amount Required The total amount to be charged for the invoice.
currency_id Required The currency identifier in which the invoice will be processed.
merchant_trx Required A unique transaction reference provided by the merchant.
success_url Required The URL where the customer will be redirected after a successful payment.
failed_url Required The URL where the customer will be redirected if the payment fails.
ipn_url Required The endpoint URL that will receive Instant Payment Notification (IPN) callbacks. This URL only call when payment is successful. This URl must post method and ensure the exclude CSRF or similar token
order_description Required A brief description of the order or service associated with this invoice.