Quickstart
Introduction
CryptoChill offers several ways for integration:
- SDK - Ideal for quick client-side integrations.
- WordPress WooCommerce Plugin - Easy integration for WordPress sites.
- API - Best for full-featured integrations.
- Through Payment Orchestration Platforms (Cashiers).
Invoice / Address
Use the SDK or API to generate invoice and retrieve address from it.
An invoice consists of an address and metadata like amount, description, fiat and cryptocurrencies, passthrough data, etc.
Configuration Profiles
When creating an Invoice you need to specify configuration Profile ID which defines essential information such as: where to send callbacks related to transaction to this address, what fee policies to apply, which coins are enabled on this profile and many more.
On a newly created account, you will find a default configuration profile already created. You can modify this profile to suit your requirements in Dashboard under Profiles navigation item.
Invoice Creation
Use the Create Invoice endpoint to create an invoice.
When creating an invoice, you can specify the fiat currency and cryptocurrency and optionally the amount. Leave the amount blank if the intention is to allow address reuse. Additional fields like passthrough
data can be used as needed.
Address Retrieval
The response in Create Invoice endpoint will include the address and other useful fields, such as the amount in cryptocurrency (if any amount specified). You can assign this address to your user on your platform or generate a new address for each deposit to keep privacy at highest level.
Callbacks Handling
Whenever there is a transaction, CryptoChill will send a callback to the URL defined in the configuration profile used to create the invoice.
There are two types of callbacks:
- Transaction Callbacks - Sent for every transaction to the address. Providing most flexibility and control. Allows unlimited address reuse.
- Invoice Callbacks - Intended for tracking the completion of the specified amount. Once invoice is fully paid, there will be no more callbacks about the invoice/address.
User Deposits
To display pending transactions (ones found in the chain mempool, but are not yet confirmed) listen to the transaction_pending
callbacks. When you receive transaction_confirmed
or transaction_complete
callbacks, you will get a fiat equivalent quote of the crypto amount the user has sent. This is the amount you can credit to the user on your platform.
You can control amount of confirmations required for transaction_confirmed
callback in configuration profile.
Testing Callbacks
The best way to test callbacks is to send a test transaction with the Callback URL defined in the configuration profile. This allows you to view the full callback format in the dashboard and resend callbacks as many times as needed during development.
For more details on callbacks and their format, visit the API Reference.
Payouts Note
Authentication
To sign requests, you can use following code:
import base64
import hashlib
import hmac
import json
import time
import requests
API_URL = 'https://api.cryptochill.com'
API_KEY = 'my_api_key'
API_SECRET = 'my_api_secret'
def encode_hmac(key, msg, digestmod=hashlib.sha256):
return hmac.new(key.encode(), msg=msg, digestmod=digestmod).hexdigest()
def cryptochill_api_request(endpoint, payload=None, method='GET'):
payload_nonce = str(int(time.time() * 1000))
request_path = '/v1/%s/' % endpoint
payload = payload or {}
payload.update({'request': request_path, 'nonce': payload_nonce})
# Encode payload to base64 format and create signature using your API_SECRET
encoded_payload = json.dumps(payload).encode()
b64 = base64.b64encode(encoded_payload)
signature = encode_hmac(API_SECRET, b64)
# Add your API key, encoded payload and signature to following headers
request_headers = {
'X-CC-KEY': API_KEY,
'X-CC-PAYLOAD': b64,
'X-CC-SIGNATURE': signature,
}
# Make request
response = requests.request(method, API_URL + request_path, headers=request_headers)
return response.json()
profiles = cryptochill_api_request('profiles')
print(json.dumps(profiles, indent=2))
const axios = require('axios');
const Base64 = require('js-base64').Base64;
const crypto = require('crypto');
const API_URL = 'https://api.cryptochill.com';
const API_KEY = 'my_api_key';
const API_SECRET = 'my_api_secret';
function encode_hmac(key, msg) {
return crypto.createHmac('sha256', key).update(msg).digest('hex');
}
function cryptochill_api_request(endpoint, payload = {}, method = 'GET') {
const request_path = '/v1/' + endpoint + '/'
payload.request = request_path;
payload.nonce = (new Date).getTime();
// Encode payload to base64 format and create signature using your API_SECRET
const encoded_payload = JSON.stringify(payload);
const b64 = Base64.encode(encoded_payload);
const signature = encode_hmac(API_SECRET, b64);
// Add your API key, encoded payload and signature to following headers
let request_headers = {
'X-CC-KEY': API_KEY,
'X-CC-PAYLOAD': b64,
'X-CC-SIGNATURE': signature,
};
return axios({
method: method,
url: API_URL + request_path,
headers: request_headers,
});
}
cryptochill_api_request('profiles').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
You can obtain API Keys by logging in and creating a key in Settings > API Keys. This will give you both an "API Key" that will serve as your user name, and an "API Secret" that you will use to sign messages.
All requests must contain a nonce, a number that will never be repeated and must increase between requests. This is to prevent an attacker who has captured a previous request from simply replaying that request. We recommend using a timestamp at millisecond or higher precision. The nonce need only be increasing with respect to the session that the message is on.
PAYLOAD
The payload of the requests must be a JSON object, which will be described in the documentation below. Rather than being sent as the body of the POST request, it will be base-64 encoded and stored as a header in the request.
The following three headers is all that is required to make requests to CryptoChill API:
Header | Value |
---|---|
X-CC-KEY | Your CryptoChill API Key |
X-CC-PAYLOAD | Base64-encoded JSON payload |
X-CC-SIGNATURE | hex(HMAC_SHA256(base64(payload), key=api_secret)) |
Supported Coins
Following are support list of coins and its various kinds. Across majority of API endpoints kind
parameter is widely
used. Here are all the possible values:
Kind | Description |
---|---|
BTC |
Bitcoin On-chain (Format based on Wallet address format setting) |
BTC_P2SH |
Bitcoin On-Chain (P2SH Segwit / Starts with 3...) |
BTC_BECH32 |
Bitcoin On-Chain (Bech32 / Native Segwit) |
BTC_LIGHTNING |
Bitcoin Lightning Network invoice. |
LTC |
Litecoin |
XRP |
Ripple |
DOGE |
Dogecoin |
TON |
The Open Network |
SOL |
Solana (See tokens) |
ETH |
Ethereum (See tokens) |
ETH-BASE |
Ethereum on Base Network (See tokens) |
ETH-ARBITRUM |
Ethereum on Arbitrum Network (See tokens) |
POL |
Polygon POL (See tokens) |
BNB |
Binance Coin (on BSC) (See tokens) |
TRX |
Tron (See tokens) |
CELO |
Celo main asset on Celo Network (See tokens) |
- | Liquid Network (See tokens) |
Kind | Description | More info |
---|---|---|
ETH_USDT |
Tether | Contract |
ETH_USDC |
USD Coin | Contract |
ETH_TUSD |
True USD | Contract |
ETH_PAX |
Paxos Standard | Contract |
ETH_GUSD |
Gemini Dollar | Contract |
ETH_SAND |
The Sandbox | Contract |
ETH_SHIB |
Shiba Inu | Contract |
ETH_BUSD |
Binance USD | Contract |
Kind | Description | More info |
---|---|---|
USDT-POLYGON |
Tether | Contract |
USDC-POLYGON |
USD Coin | Contract |
USDCE-POLYGON |
USD Coin Bridged | Contract |
Kind | Description | More info |
---|---|---|
USDC-BASE |
USD Coin | Contract |
Kind | Description | More info |
---|---|---|
USDT-ARBITRUM |
Tether | Contract |
USDC-ARBITRUM |
USD Coin | Contract |
USDCE-ARBITRUM |
USD Coin Bridged | Contract |
Kind | Description | More info |
---|---|---|
CELO-CELO |
Celo Token | Contract |
CUSD-CELO |
Celo Dollar | Contract |
USDT-CELO |
Tether | Contract |
USDC-CELO |
USD Coin | Contract |
Kind | Description | More info |
---|---|---|
USDT-TRX |
Tether | Contract |
USDC-TRX |
USD Coin | Contract |
Kind | Description | More info |
---|---|---|
USDT-SOL |
Tether | Contract |
USDC-SOL |
USD Coin | Contract |
WSOL-SOL |
Wrapped Solana | Contract |
BONK-SOL |
Bonk | Contract |
TRUMP-SOL |
Official Trump | Contract |
Binance Smart Chain (BSC) BEP-20 Tokens:
Kind | Description | More info |
---|---|---|
USDT-BSC |
Tether | Contract |
USDC-BSC |
USD Coin | Contract |
ETH-BSC |
Binance-pegged Ethereum | Contract |
DAI-BSC |
DAI | Contract |
SHIB-BSC |
Shiba Inu | Contract |
BUSD |
Binance USD | Contract |
WBNB |
Wrapped BNB | Contract |
Liquid Network More Info
Kind | Description | More info |
---|---|---|
L-BTC |
Bitcoin on Liquid network | Asset |
L-USDT |
Tether on Liquid network | Contract |
TON More Info
Kind | Description | More info |
---|---|---|
USDT-TON |
Tether Jetton on TON | Contract |
NOT-TON |
Notcoin on TON | Contract |
Invoices
Invoices are payment requests addressed to specific buyers or payers. Invoice has a unique receiving address and optional fixed price, typically denominated in fiat currency. It also has a crypto equivalent price, calculated by CryptoChill, with an optional expiration time. If you need just an address you can leave amount blank.
List Invoices
invoices = cryptochill_api_request('invoices')
cryptochill_api_request('invoices').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"pagination": {
"num_pages": 1,
"count": 12,
"page": 1,
"next_page": null,
"previous_page": null,
"per_page": 25
},
"result": [
{
"id": "123",
"kind": "BTC",
"created_at": "2019-01-23T14:31:20.750500+00:00",
"profile_id": "bb519172-5823-4170-a1ba-b94143eaaaea",
"address": "3Q2sdSVxqQCyYUt4NvX2y4XNmn7PRF77PZ",
"lightning": null,
"network": "mainnet",
"status": "paid",
"amount": {
"requested": {
"amount": "99.00000000",
"currency": "USD"
},
"invoiced": {
"amount": "0.02732120",
"currency": "BTC",
"rate_usd": "3624.886995160658"
},
"paid": {
"amount": "0.02731120",
"currency": "BTC"
},
"paid_total": {
// If custom fee is used
"amount": "0.02732120",
"currency": "BTC"
}
},
"custom_fee": {
"amount": "0.00001",
"currency": "BTC"
},
"min_confirmations": null,
"zero_conf_enabled": null,
"notes": null,
"passthrough": "{\"user_id\":1}"
}
]
}
This endpoint retrieves all invoices. Endpoint uses pagination and returns 25
invoices per page. Invoices are sorted
by creation time in descending order.
HTTP Request
GET https://api.cryptochill.com/v1/invoices/
Query Parameters
Parameter | Default | Description |
---|---|---|
p | None | Page number. |
txid | None | Filter invoices by txid . |
address | None | Filter invoices by receiving address. |
status | None | Filter invoices by status. Available values: "new", "pending", "complete", "expired". |
profile_id | None | Filter invoices by Profile ID. |
Get Invoice
invoice = cryptochill_api_request('invoices/42dbee1d-8659-44c3-aab2-6e414c5825a5')
cryptochill_api_request('invoices/42dbee1d-8659-44c3-aab2-6e414c5825a5').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "42dbee1d-8659-44c3-aab2-6e414c5825a5",
"kind": "BTC",
"created_at": "2019-02-08T01:06:11.799601+00:00",
"profile_id": "bb519172-5823-4170-a1ba-b94143eaaaea",
"address": "3Q2sdSVxqQCyYUt4NvX2y4XNmn7PRF77PZ",
"lightning": null,
"network": "mainnet",
"status": "new",
"amount": {
"requested": {
"amount": "10.00",
"currency": "USD"
},
"invoiced": {
"amount": "0.00292111",
"currency": "BTC"
},
"paid": null
},
"custom_fee": null,
"min_confirmations": null,
"zero_conf_enabled": null,
"notes": null,
"passthrough": "{\"user_id\": 123}",
"transactions": []
}
}
This endpoint retrieves a specific invoice.
HTTP Request
GET https://api.cryptochill.com/v1/invoices/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the invoice to retrieve. |
Create Invoice
import json
payload = {
"amount": "10",
"currency": "USD",
"kind": "BTC",
"profile_id": "456",
"passthrough": json.dumps({"user_id": 123})
}
invoice = cryptochill_api_request('invoices', payload, 'POST')
print(json.dumps(invoices, indent=2))
var payload = {
"amount": "10",
"currency": "USD",
"kind": "BTC",
"profile_id": "456",
"passthrough": JSON.stringify({"user_id": 123})
}
cryptochill_api_request('invoices', payload, 'POST').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Invoice endpoint:
{
"result": {
"id": "42dbee1d-8659-44c3-aab2-6e414c5825a5",
"kind": "BTC",
"created_at": "2019-02-08T01:06:11.799601+00:00",
"profile_id": "bb519172-5823-4170-a1ba-b94143eaaaea",
"address": "3Q2sdSVxqQCyYUt4NvX2y4XNmn7PRF77PZ",
"lightning": null,
"network": "mainnet",
"status": "new",
"amount": {
"requested": {
"amount": "10.00",
"currency": "USD"
},
"invoiced": {
"amount": "0.00292111",
"currency": "BTC"
},
"paid": {
"amount": "0.00292111",
"currency": "BTC"
}
},
"custom_fee": null,
"min_confirmations": null,
"zero_conf_enabled": null,
"notes": null,
"passthrough": "{\"user_id\": 123}",
"transactions": [
{
"id": "9094fefe-3ac2-49b3-99ec-9b719331316c",
"kind": "BTC",
"txid": "7f96054005c8aab5101d48211cb23070b6a9d9b7ea25b3422de2c109eb57fad9",
"confirmations": 6,
"amount": "0.00292111",
"created_at": "2019-02-08T01:08:11.799601+00:00"
}
]
}
}
This endpoint creates an invoice. Response is identical to Get Invoice endpoint response.
HTTP Request
POST https://api.cryptochill.com/v1/invoices/
Payload Parameters
Parameter | Description | Required |
---|---|---|
profile_id | Profile ID to use for settings, callback and wallet address generation. | Yes |
amount | Quoted decimal payment amount. Do not specify amount to use address as never-expiring deposit address. Only Transactions Callbacks will be sent if no amount is specified while creating invoice. To increase users privacy level we strongly advise creating new invoice/address for each new deposit. | No |
currency | Currency for the specified payment amount. Available values: BTC, LTC, ETH, TRX, POL, XRP, DOGE, USDT, TUSD, USDC, PAX, GUSD, BUSD, WBNB, SAND, DAI, SHIB, L-BTC, L-USDT, USD, EUR, GBP, AUD, CAD, CHF, ZAR, NOK, SOL. | Yes |
kind | Invoice kind / currency. Available Values | No |
passthrough | String. Meta-data you wish to store with the invoice. Will be sent alongside all callbacks associated with the invoice. | No |
fee_amount | Custom fee amount in same currency as specified in kind field that will be deducted from paid amount response. |
No |
min_confirmations | Minimum confirmations required to change status to "confirmed" and trigger callback. Available values: 1-5. Default: Profile min_confirmations setting value. |
No |
notes | Can be product or service name or any other notes. Visible in dashboard and in public invoice link. | No |
zero_conf_enabled | Boolean. Enables instant zero confirmation deposits. Available for Bitcoin On-chain only. Default: False. | No |
exchange_rate_limit | Object. Enables comparison and validation between provided exchange rates and CryptoChill exchange rates. Rejects request if difference is greater than what is specified in allowed_difference field. Full specification of exchange_rate_limit object see in the table below. |
No |
exchange_rate_limit object parameters
Parameter | Description | Required |
---|---|---|
pair | String. Colon separated crypto to fiat pair name. Example: "BTC:USD". | Yes |
exchange_rate | Decimal. Your exchange rate. | Yes |
allowed_difference | Decimal. Allowed difference. Example for 5% use 0.05. | Yes |
Lightning Network
JSON response for Create Invoice with kind=lightning endpoint:
{
"result": {
...
"kind": "lightning",
"lightning": {
"payment_request": "...",
"payment_hash": "..."
},
...
}
}
If you specify lightning
for invoice kind
field then address won't be generated, instead lightning
key will
be present in response having two sub-keys: payment_request
and
payment_hash
:
Parameter | Description |
---|---|
payment_request | Payment request string required for client to pay lightning network payment request. |
payment_hash | Unique ID of payment request. |
Expiration
Payment requests are valid for exact amount specified in payload data and will expire after time set in Profile Details -> Invoice Expiration or as set per specific invoice.
Ripple
All our invoices on Ripple network uses destination tag. Account address and destination tag are combined as single field separated by colon. Ripple X-address format is also supported.
JSON response for Create Invoice endpoint Ripple:
{
"result": {
...
"address": "rQ9zXuCaJfrW1tNiGk9t57GyKB5dmNHdof:1402",
"x_address": "XVmrpsnjrbc2wamZxxbkSnEn3hGXDRpUzKCnh54gcHPYdsm",
...
}
}
For Ripple invoices you will receive extra x_address
field:
Parameter | Description |
---|---|
address | Combined address of account address and destination tag. |
x_address | Ripple X-address format. |
Liquid Network
Liquid Network is a sidechain-based settlement network for traders & exchanges. Liquid enables faster, more confidential Bitcoin and Tether transactions, and the issuance of digital assets. Read more on Liquid.net
JSON response for Create Invoice endpoint for any of currencies on Liquid Network:
{
"result": {
...
"address": "VJLJhm3NhyvgnahxMNkV2BfaLktKSwJWxh96qDNYjuxzuqqGzW7GWUJNiJEstVdzVbzzXix1j9Kgu94k",
"public_address": "GvQH26UTNZacuUf3mBXTbBmcnQ24u3fdkm",
...
}
}
For Liquid invoices you will receive extra public_address
field:
Parameter | Description |
---|---|
address | Liquid confidential address (default). |
public_address | Liquid non-confidential address. |
Liquid Confidential Transactions
Liquid uses Confidential Transactions, which hides the amounts and asset types within transactions from all third parties. This information is only known by the parties involved in the transaction and other third parties they designate. Liquid transactions use confidential addresses that include a public blinding key and a base address. Only the receiver alone can decrypt the amount sent in a transaction. The receiver can share the private blinding key with any third party in order for that party to be able to validate the amount and asset type.
Invoice Callbacks
Callbacks provide same exact response format as in Get Invoice
API endpoint in result
field plus three extra
fields specified in Callbacks Documentation.
Only Transactions Callbacks will be sent if no amount is specified while creating invoice.
You can view history of callbacks (if any) in CryptoChill in Invoice detail view.
Invoice Callback Statuses
Status | Description |
---|---|
invoice_pending | Sum of all incoming transactions matches requested amount (0 confirmations). |
invoice_confirmed | Sum of all incoming transactions matches requested amount (at last 1 confirmations). |
invoice_complete | Sum of all incoming transactions matches requested amount (6+ confirmations). |
invoice_incomplete | Transaction(s) were made, but amount is less than requested in the invoice. Requires manual handling. |
Public Link
All invoices can be accessed on a Public link using address format: https://cryptochill.com/invoice/INVOICE_ID
/. Where INVOICE_ID
can be unchanged invoice ID as returned in API call or it can also be Invoice ID value, but with all dashes removed and all letters in uppercase.
If you would like to have an invoice URL with fiat price being renewed when link is opened, you can add renew/
suffix in the end of the URL: https://cryptochill.com/invoice/INVOICE_ID
/renew/. This is useful when sending an invoice to a client and you want the invoice to reflect the most up-to-date fiat price rates. Additionally, the countdown will only start once the client opens the invoice link.
To redirect users to another page after successful payment use ?success_url=URL_HERE
URL parameter.
QR Code
For a QR image that represents invoice address and metadata, you can use following image endpoint:
https://cryptochill.com/sdk/v1/invoices/qr/INVOICE_ID
/
Add ?address_only=1
to URL if you'd like to have address only QR code without any metadata, like amount, etc.
Transactions
Transactions are incoming Bitcoin transactions paid for invoices or any transactions deposited to any of wallets addresses.
List Transactions
transactions = cryptochill_api_request('transactions')
cryptochill_api_request('transactions').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"pagination": {
"num_pages": 1,
"count": 12,
"page": 1,
"next_page": null,
"previous_page": null,
"per_page": 25
},
"result": [
{
"id": "9094fefe-3ac2-49b3-99ec-9b719331316c",
"kind": "BTC",
"txid": "7f96054005c8aab5101d48211cb23070b6a9d9b7ea25b3422de2c109eb57fad9",
"invoice": {
"id": "47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa",
"kind": "BTC",
"created_at": "2019-02-07T22:13:15.093624+00:00",
"profile_id": "bb519172-5823-4170-a1ba-b94143eaaaea",
"address": "3Q2sdSVxqQCyYUt4NvX2y4XNmn7PRF77PZ",
"lightning": null,
"network": "mainnet",
"amount": {
"requested": {
"amount": "10.00",
"currency": "USD"
},
"invoiced": {
"amount": "0.00293528",
"currency": "BTC"
}
},
"custom_fee": null,
"min_confirmations": null,
"zero_conf_enabled": null,
"notes": null,
"passthrough": "{\"test\":123}"
},
"amount": {
"paid": {
"amount": "0.00293528",
"currency": "BTC",
"quotes": {
"USD": "10.00"
}
}
},
"currency_rates": {
"BTC": {
"USD": "3406.83001280968"
}
},
"created_at": "2019-02-07T22:13:28.681005+00:00",
"executed_at": "2019-02-07T22:21:59+00:00",
"confirmed_at": "2019-02-07T23:09:31.983230+00:00",
"confirmations": 6,
"status": "complete",
"zero_conf_status": null,
"network": "mainnet",
"risk_level": "low"
}
]
}
This endpoint retrieves all transactions. Endpoint uses pagination and returns 25
transactions per page.
Transactions are sorted by creation time in descending order.
HTTP Request
GET https://api.cryptochill.com/v1/transactions/
Query Parameters
Parameter | Default | Description |
---|---|---|
p | None | Page number. |
txid | None | Filter transactions by txid . |
address | None | Filter transactions by receiving address. |
invoice_id | None | Filter transactions by Invoice ID. |
profile_id | None | Filter transactions by Profile ID. |
Get Transaction
transaction = cryptochill_api_request('transactions/asd123')
cryptochill_api_request('transactions/asd123').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "9094fefe-3ac2-49b3-99ec-9b719331316c",
"kind": "BTC",
"txid": "7f96054005c8aab5101d48211cb23070b6a9d9b7ea25b3422de2c109eb57fad9",
"invoice": {
"id": "47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa",
"kind": "BTC",
"created_at": "2019-02-07T22:13:15.093624+00:00",
"profile_id": "bb519172-5823-4170-a1ba-b94143eaaaea",
"address": "3Q2sdSVxqQCyYUt4NvX2y4XNmn7PRF77PZ",
"lightning": null,
"network": "mainnet",
"amount": {
"requested": {
"amount": "10.00",
"currency": "USD"
},
"invoiced": {
"amount": "0.00293528",
"currency": "BTC"
}
},
"custom_fee": null,
"min_confirmations": null,
"zero_conf_enabled": null,
"notes": null,
"passthrough": "{\"test\":123}"
},
"amount": {
"paid": {
"amount": "0.00293528",
"currency": "BTC",
"quotes": {
"USD": "10.00"
}
}
},
"currency_rates": {
"BTC": {
"USD": "3406.83001280968"
}
},
"created_at": "2019-02-07T22:13:28.681005+00:00",
"executed_at": "2019-02-07T22:21:59+00:00",
"confirmed_at": "2019-02-07T23:09:31.983230+00:00",
"confirmations": 6,
"status": "complete",
"zero_conf_status": null,
"network": "mainnet",
"risk_level": "low"
}
}
This endpoint retrieves a specific transaction.
HTTP Request
GET https://api.cryptochill.com/v1/transactions/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the transaction to retrieve. |
Retrieve Confirmations
import json
payload = {
"id": [
"9094fefe-3ac2-49b3-99ec-9b719331316c",
"47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa"
]
}
confirmations = cryptochill_api_request('transactions/confirmations', payload, 'POST')
print(json.dumps(confirmations, indent=2))
var payload = {
"id": [
"9094fefe-3ac2-49b3-99ec-9b719331316c",
"47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa"
]
}
cryptochill_api_request('transactions/confirmations', payload, 'POST').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "9094fefe-3ac2-49b3-99ec-9b719331316c",
"confirmations": 2
},
{
"id": "47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa",
"confirmations": 7
}
]
}
This endpoint returns confirmations for specified transaction ID(s).
HTTP Request
POST https://api.cryptochill.com/v1/transactions/confirmations/
Payload Parameters
Parameter | Description | Required |
---|---|---|
id | Array/list of transaction ID. |
Custom Fees
Example response if custom fees are applied.
{
"result": {
"id": "9094fefe-3ac2-49b3-99ec-9b719331316c",
"kind": "BTC",
"txid": "7f96054005c8aab5101d48211cb23070b6a9d9b7ea25b3422de2c109eb57fad9",
"invoice": {
"id": "cab4f4ff-6654-46c7-b22e-7d31da1eebcd",
"kind": "BTC",
"created_at": "2019-02-08T12:36:21.130435+00:00",
"profile_id": "bb519172-5823-4170-a1ba-b94143eaaaea",
"address": "3Q2sdSVxqQCyYUt4NvX2y4XNmn7PRF77PZ",
"lightning": null,
"network": "mainnet",
"amount": {
"requested": {
"amount": "100.00",
"currency": "USD"
},
"invoiced": {
"amount": "0.02967564",
"currency": "BTC"
}
},
"custom_fee": {
"amount": "0.00050000",
"currency": "BTC"
},
"min_confirmations": null,
"notes": null,
"passthrough": "{\"user_id\": 123}"
},
"amount": {
"paid": {
"amount": "0.02917564",
"currency": "BTC",
"quotes": {
"USD": "100.00"
}
},
"paid_total": {
"amount": "0.02967564",
"currency": "BTC",
"quotes": {
"USD": "101.71"
}
}
},
"currency_rates": {
"BTC": {
"USD": "3406.83001280968"
}
},
"created_at": "2019-02-08T12:36:21.200127+00:00",
"executed_at": null,
"confirmed_at": null,
"confirmations": 6,
"status": "complete",
"zero_conf_status": null,
"network": "testnet",
"risk_level": "low"
}
}
With "Custom Fees" feature merchants can charge extra fee on top of every invoice. If "fee_amount" field is specified while creating invoice, extra fee will be added to invoiced amount and later on deducted from "paid" field. In such case response will also have extra "paid_total" key with an actual transaction values and relevant quotes.
Transaction Statuses
Status | Description |
---|---|
pending | Transaction is broadcast on the network (0 confirmations). |
confirmed | Transaction is included in the first block (1 confirmation). |
complete | Transaction has 6+ confirmations. |
unconfirmed | Transaction hasn't been confirmed for more than 24 hours. If it get's confirmed later, status will be updated to "Confirmed". |
failed | Transaction failed on network (might be that due to low fees, etc.) |
replaced | Transaction was replaced by another transaction and will not get confirmed. |
Transaction Callbacks
Callbacks provide same exact response format as in Get Transaction
API endpoint in result
field plus three extra
fields specified in Callbacks Documentation.
You can view history of callbacks (if any) in CryptoChill in Transaction detail view.
Transaction Callback Statuses
Status | Description |
---|---|
transaction_pending | Transaction was found on mempool, but not yet confirmed (0 confirmations). |
transaction_confirmed | Transaction was confirmed (at least 1 confirmation or based on minimum confirmation settings). |
transaction_complete | Transaction has maximum confirmations needed to consider it completely final. |
transaction_replaced | Special callback if transaction has been replaced by another transaction. |
transaction_zero_conf_confirmed | Special callback if transaction has been confirmed even with 0 confirmations. In such case "zero_conf_status=confirmed" field will be present. |
0-Confirmation Statuses
If zero confirmation feature for invoice is enabled, it is possible to verify its validity even with 0 confirmations, in
such case zero_conf_status
field will be present in response. Possible zero_conf_status
values:
Status | Description |
---|---|
null | Transaction verification with 0 confirmations has not been done. |
confirmed | Transaction with 0 confirmations is confirmed and can be safely treated as confirmed. |
unconfirmed | Transaction with 0 confirmations is confirmed is not safe to be treated as confirmed therefore it should await blockchain confirmations. |
unknown | Transaction verification with 0 confirmations has failed and status is unknown therefore it should await blockchain confirmations. |
If transaction with 0 confirmations is confirmed using 0-conf verification
special transaction_zero_conf_confirmed
callback will be sent.
0-confirmation status can be enabled globally in Profiles in Dashboard UI or by specifying zero_conf_enabled=true
while creating invoice in API.
Payouts
Payouts are Bitcoin withdrawals or payments to customers, partners, etc.
List Payouts
payouts = cryptochill_api_request('payouts')
cryptochill_api_request('payouts').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
This endpoint retrieves all payouts. Endpoint uses pagination and returns 25
payouts per page. Payouts are sorted by creation time in descending order.
HTTP Request
GET https://api.cryptochill.com/v1/payouts/
Query Parameters
Parameter | Default | Description |
---|---|---|
p | None | Page number. |
txid | None | Filter payouts by txid . |
address | None | Filter payouts by recipient address. |
reference_id | None | Filter payouts by reference_id . |
profile_id | None | Filter payouts by Profile ID. |
Get Payout
payout = cryptochill_api_request('payouts/42dbee1d-8659-44c3-aab2-6e414c5825a5')
cryptochill_api_request('payouts/42dbee1d-8659-44c3-aab2-6e414c5825a5').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
This endpoint retrieves a specific payout.
HTTP Request
GET https://api.cryptochill.com/v1/payouts/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the payout to retrieve. |
Create Payout
import json
payload = {
"profile_id": "e4e197bf-486d-4f57-a064-2d047c6cafae",
"kind": "BTC",
"passthrough": json.dumps({"user_id": 123}),
"reference_id": "unique-payout-id-123",
"recipients": [
{
"amount": "20",
"currency": "USD",
"address": "2N38koyyonVDAZJRV4GwnuFPxcGTymzn9HQ",
"notes": "Notes 1"
},
{
"amount": "10",
"currency": "GBP",
"address": "2MzCZNNDrmUB55LzdXnmdaXH2h2nJJ9EhrL",
"notes": "Notes 2"
},
{
"amount": "0.01",
"currency": "BTC",
"address": "2NC3zgngjjRWR7kbKzKYYPR2jpWh3QZHRML",
"notes": "Notes 3"
}
]
}
payout = cryptochill_api_request('payouts', payload, 'POST')
print(json.dumps(payout, indent=2))
var payload = {
"profile_id": "e4e197bf-486d-4f57-a064-2d047c6cafae",
"kind": "BTC",
"passthrough": JSON.stringify({"user_id": 123}),
"reference_id": "unique-payout-id-123",
"recipients": [
{
"amount": "20",
"currency": "USD",
"address": "2N38koyyonVDAZJRV4GwnuFPxcGTymzn9HQ",
"notes": "Notes 1"
},
{
"amount": "10",
"currency": "GBP",
"address": "2MzCZNNDrmUB55LzdXnmdaXH2h2nJJ9EhrL",
"notes": "Notes 2"
},
{
"amount": "0.01",
"currency": "BTC",
"address": "2NC3zgngjjRWR7kbKzKYYPR2jpWh3QZHRML",
"notes": "Notes 3"
}
]
}
cryptochill_api_request('payouts', payload, 'POST').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
JSON response for Create Payout endpoint:
{
"result": {
"id": "2f065e32-8b11-4081-b302-57f9f9dbd2e4",
"kind": "BTC",
"txid": "7efa4998d0b6d62c13154e53bed0b6c5283c73ac5412ce09c2ac437be031fb9d",
"created_at": "2019-02-11T03:04:51.113794+00:00",
"executed_at": "2019-02-11T03:05:15.110291+00:00",
"profile_id": "e4e197bf-486d-4f57-a064-2d047c6cafae",
"wallet_id": "9ebdef36-71dd-4fdf-b02d-e5f836b4052f",
"confirmations": 0,
"status": "new",
"network": "testnet",
"amount": {
"total": "0.01901596",
"network_fee": "0.00001000"
},
"network_fee_pays": "merchant",
"network_fee_preset": "normal",
"network_fee": 5,
"passthrough": "{\"user_id\": 123}",
"reference_id": "unique-payout-id-123",
"recipients": [
{
"id": "912c9225-eb7f-4697-a5ab-7d28acfb9168",
"address": "2N38koyyonVDAZJRV4GwnuFPxcGTymzn9HQ",
"amount": {
"requested": {
"amount": "20.00000000",
"currency": "USD"
},
"received": {
"amount": "0.00546744",
"currency": "BTC"
}
},
"custom_fee": null,
"notes": "Notes 1"
},
{
"id": "d49d2ef4-6613-4870-9fcf-6becce855761",
"address": "2MzCZNNDrmUB55LzdXnmdaXH2h2nJJ9EhrL",
"amount": {
"requested": {
"amount": "10.00000000",
"currency": "GBP"
},
"received": {
"amount": "0.00353852",
"currency": "BTC"
}
},
"custom_fee": null,
"notes": "Notes 2"
},
{
"id": "b827813f-389e-457e-81c5-13cd1cf49d27",
"address": "2NC3zgngjjRWR7kbKzKYYPR2jpWh3QZHRML",
"amount": {
"requested": {
"amount": "0.01000000",
"currency": "BTC"
},
"received": {
"amount": "0.01000000",
"currency": "BTC"
}
},
"custom_fee": null,
"notes": "Notes 3"
}
]
}
}
This endpoint creates a payout. Response is identical to Get Payout endpoint response.
HTTP Request
POST https://api.cryptochill.com/v1/payouts/
Payload Parameters
Parameter | Description | Required |
---|---|---|
kind | Available Values Special kind values: BTC_LIGHTNING_TO_BTC – Lightning Network to On-Chain.BTC_LIGHTNING_TO_LIGHTNING – Lightning Network to Lightning Network payout. |
Yes |
profile_id | Profile ID for settings, callbacks and wallet selection if wallet_id not specified. |
Yes |
wallet_id | Wallet ID for funds selection. If not specified, default profile wallet is used. | No |
passthrough | String. Meta-data you wish to store with the payout. If provided and no reference_id is specified, must be a unique value to avoid accidental duplicate payouts. Will be sent alongside all callbacks associated with the payout. |
No |
reference_id | String. Unique reference ID. Field is being indexed and is useful for lookups. If provided must be a unique value to avoid accidental duplicate payouts. Will be sent alongside all callbacks associated with the payout. | No |
recipients | Array/list of recipient objects. | Yes |
network_fee_pays | Who pays network fee. Available values: merchant (default) or recipient . In case of recipient value network fee will be deducted from first recipient. |
No |
network_fee_preset | Network fee preset. Available values: high , normal (default) , economy . |
No |
network_fee | Custom network fee in satoshi/byte. Integer. | No |
Recipient Object Parameters
Parameter | Description | Required |
---|---|---|
amount | Quoted decimal payment amount. Optional for BTC_LIGHTNING_TO_LIGHTNING kind. |
Yes |
currency | Currency for the specified payment amount. Available values: BTC, LTC, ETH, XRP, DOGE, USDT, TUSD, USDC, PAX, GUSD, L-BTC, L-USDT, USD, EUR, GBP, AUD, CAD, CHF, ZAR, NOK, SOL. | Yes |
address | Address of the recipient or payment request for BTC_LIGHTNING_TO_LIGHTNING kind. |
Yes |
fee_amount | Custom fee amount that will be deducted from "received" amount. | No |
fee_currency | Custom fee currency. Available values: Same values as for currency field. |
No |
destination_tag | Only for XRP and TON kind. Integer. |
No |
notes | Any internal notes. Use memo: prefix to send chain level message (ETH, BSC and TON only). |
No |
exchange_rate_limit | Object. Enables comparison and validation between provided exchange rates and CryptoChill exchange rates. Rejects request if difference is greater than what is specified in allowed_difference field. Full specification of exchange_rate_limit object see here |
No |
Ripple
Ripple X-address format is also supported as address
field.
Approve or Reject Payout
import json
payload = {
"approve": True
}
payout = cryptochill_api_request('payouts/42dbee1d-8659-44c3-aab2-6e414c5825a5', payload, 'PUT')
print(json.dumps(payout, indent=2))
var payload = {
"approve": true
}
cryptochill_api_request('payouts/42dbee1d-8659-44c3-aab2-6e414c5825a5', payload, 'PUT').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
JSON response for Approve Payout endpoint:
{
"result": {
"id": "2f065e32-8b11-4081-b302-57f9f9dbd2e4",
"status": "new",
# ... [rest of the payout object]
}
}
This endpoint approves or rejects a payout draft. API key must have special "Approve" permissions. Response is identical to Get Payout endpoint response where the status
field should be new
now. If rejected status
should be rejected
.
API Keys with "Approve" permissions can only approve or reject payout drafts and can never create payouts. API Keys with limited "Max Payout" amount, can never approve payout drafts – separate keys are required for approving payout drafts.
HTTP Request
PUT https://api.cryptochill.com/v1/payouts/<ID>/
Payload Parameters
Parameter | Description | Required |
---|---|---|
approve | Boolean. Allowed values: true or false |
Yes |
Payout Confirmations
import json
payload = {
"id": [
"9094fefe-3ac2-49b3-99ec-9b719331316c",
"47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa"
]
}
confirmations = cryptochill_api_request('payouts/confirmations', payload, 'POST')
print(json.dumps(confirmations, indent=2))
var payload = {
"id": [
"9094fefe-3ac2-49b3-99ec-9b719331316c",
"47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa"
]
}
cryptochill_api_request('payouts/confirmations', payload, 'POST').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "9094fefe-3ac2-49b3-99ec-9b719331316c",
"confirmations": 2
},
{
"id": "47ad5fa7-0754-4ba8-bc2d-1cdd0dbcddaa",
"confirmations": 7
}
]
}
This endpoint returns confirmations for specified payout ID(s).
HTTP Request
POST https://api.cryptochill.com/v1/payouts/confirmations/
Payload Parameters
Parameter | Description | Required |
---|---|---|
id | Array/list of payout ID. |
Payout Statuses
Status | Description |
---|---|
draft | Either payout was created manually in the app and is not yet approved or payout was made by an API, but the payout amount was larger than "Max Payout" value for current API key - in such case requires manual approval in the app. |
new | Payout is just created and is awaiting further processing. |
pending | Payout transaction is broadcast on the Bitcoin network (0 confirmations). |
confirmed | Payout transaction is included in the first block (1 confirmation). |
complete | Payout transaction has 6+ confirmations. |
rejected | Payout draft requiring approval has been rejected through API. |
unconfirmed | Payout have been unconfirmed for more that 24h. |
awaiting_funds | Payout is using "reserve wallet" functionality and is awaiting for funds to be converted and added to wallet balance. |
Payout Callbacks
Callbacks provide same exact response format as in Get Payout
API endpoint in result
field plus three extra fields specified in Callbacks Documentation.
You can view history of callbacks (if any) in CryptoChill in Payout detail view.
Payout Callback Statuses
Status | Description |
---|---|
payout_pending | Payment transaction is broadcast on the Bitcoin network (0 confirmations). |
payout_confirmed | Payout transaction is included in the first block (1 confirmation). |
payout_complete | Payout transaction has 6+ confirmations. |
payout_failed | Payout has failed. |
Conversions
List Conversions
auto_conversions = cryptochill_api_request('conversions')
cryptochill_api_request('conversions').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"amount": "50",
"to_amount": "49.5",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"status": "draft",
"is_approved": false,
"approved_by": null
},
{
"id": "a667298e-ff10-4e16-bb06-4394552264ca",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "fce22564-bf58-481f-a66d-9bcb4dc764e1",
"name": "Ethereum"
},
"from_kind": "ETH",
"to_wallet": {
"id": "fce22564-bf58-481f-a66d-9bcb4dc764e1",
"name": "Ethereum"
},
"to_kind": "ETH_USDT",
"amount": "0.01809803",
"to_amount": "42.48",
"exchange": {
"id": "9994a4fe-1367-4143-a696-b236f34c653a",
"title": null
},
"status": "draft",
"is_approved": false,
"approved_by": "<user_email>"
}
]
}
This endpoint retrieves all conversions.
HTTP Request
GET https://api.cryptochill.com/v1/conversions/
Get Conversion
auto_conversions = cryptochill_api_request('conversions/<id>')
cryptochill_api_request('conversions/<id>').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"amount": "50",
"to_amount": "49.5",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"status": "draft",
"is_approved": false
"approved_by": null,
"transaction": null,
"payout": null
}
}
This endpoint retrieves a specific conversion.
HTTP Request
GET https://api.cryptochill.com/v1/conversions/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the conversion to retrieve |
Create Conversion
import json
payload = {
'is_approved': False,
'from_wallet': '<wallet_id>',
'from_kind': 'USDT-TRX',
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'amount': 50,
'exchange': '<exchange_id>',
}
auto_conversion = cryptochill_api_request('conversions', payload, 'POST')
print(json.dumps(auto_conversion, indent=2))
var payload = {
'is_approved': false,
'from_wallet': '<wallet_id>',
'from_kind': 'USDT-TRX',
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'amount': 50,
'exchange': '<exchange_id>',
}
cryptochill_api_request('conversions', payload, 'POST').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Conversion endpoint:
{
"result": {
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"amount": "50",
"to_amount": "49.5",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_approved": false,
}
}
This endpoint allows creating conversion.
Only one conversion per wallet per kind is allowed.
Editable fields: from_wallet
,from_kind
,to_wallet
,to_kind
,amount
,exchange
,is_approved
.
HTTP Request
POST https://api.cryptochill.com/v1/conversions/
Payload Parameters
Parameter | Description | Required |
---|---|---|
is_approved | Approve conversion | No |
from_wallet | Wallet ID | Yes |
from_kind | Available Values | Yes |
to_wallet | Wallet ID | Yes |
to_kind | Available Values | Yes |
exchange | Exchange ID | No |
amount | Amount to convert | Yes |
Update Conversion
import json
payload = {
'is_approved': False,
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'amount': 50,
'exchange': '<exchange_id>',
}
auto_conversion = cryptochill_api_request('conversions/<id>', payload, 'PUT')
print(json.dumps(auto_conversion, indent=2))
var payload = {
'is_approved': False,
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'amount': 50,
'exchange': '<exchange_id>',
}
cryptochill_api_request('conversions/<id>', payload, 'PUT').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Conversion endpoint:
{
"result": {
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"amount": "50",
"to_amount": "49.5",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_approved": false,
}
}
This endpoint allows updating conversion.
Editable
Editable fields: to_wallet
,to_kind
,amount
,exchange
,is_approved
.
HTTP Request
PUT https://api.cryptochill.com/v1/conversions/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the conversion to retrieve |
Payload Parameters
Parameter | Description |
---|---|
is_approved | Enable / Disable conversion execution |
to_wallet | Wallet ID |
to_kind | Available Values |
exchange | Exchange ID |
amount | Amount to convert |
Delete Conversion
import json
payload = None
auto_conversion = cryptochill_api_request('conversions/<id>', payload, 'DELETE')
print(json.dumps(auto_conversion, indent=2))
var payload = null
cryptochill_api_request('conversions/<id>', payload, 'DELETE').then(function(response) {
//
}).catch(function(error) {
console.log(error);
});
This endpoint allows delete conversion.
HTTP Request
DELETE https://api.cryptochill.com/v1/conversions/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the conversion to delete |
Profiles
Profiles define which wallet will be used for address generation and to which callback URL related events should be sent.
List Profiles
profiles = cryptochill_api_request('profiles')
cryptochill_api_request('profiles').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<id>",
"account": "SUB ACCOUNT",
"account_id": "<account-id>",
"name": "My Profile",
"invoice_expiration": 600,
"addresses_expiration": 3600,
"allow_smart_contract_payouts": false,
"stablecoin_precision": 6,
"currencies": [
{
"kind": "BTC",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6,
"zero_conf_max_amount": "100000000000000000000"
},
{
"kind": "BTC_LIGHTNING",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6
},
{
"kind": "TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
},
{
"kind": "USDC-TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
}
],
"reserve_wallet": {
"kind": "TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>"
},
"acceptance_range": {
"positive_difference": "0.0010",
"negative_difference": "10.0000"
},
"notification_email": null,
"notification_email_kinds": [
"payout_complete",
"payout_confirmed"
],
"callback_url": "https://localhost:8000",
"onramper_api_key": "<api-key>"
}
]
}
This endpoint retrieves all profiles.
HTTP Request
GET https://api.cryptochill.com/v1/profiles/
Get Profile
profiles = cryptochill_api_request('profiles/123')
cryptochill_api_request('profiles/123').then(function (response) {
console.log(response);
}).catch(function (error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<id>",
"account": "SUB ACCOUNT",
"account_id": "<account-id>",
"name": "My Profile",
"invoice_expiration": 600,
"addresses_expiration": 3600,
"allow_smart_contract_payouts": false,
"stablecoin_precision": 6,
"currencies": [
{
"kind": "BTC",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6,
"zero_conf_max_amount": "100000000000000000000"
},
{
"kind": "BTC_LIGHTNING",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6
},
{
"kind": "TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
},
{
"kind": "USDC-TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
}
],
"reserve_wallet": {
"kind": "TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>"
},
"acceptance_range": {
"positive_difference": "0.0010",
"negative_difference": "10.0000"
},
"notification_email": null,
"notification_email_kinds": [
"payout_complete",
"payout_confirmed"
],
"callback_url": "https://localhost:8000",
"onramper_api_key": "<api-key>"
}
}
This endpoint retrieves a specific profile.
HTTP Request
GET https://api.cryptochill.com/v1/profiles/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the profile to retrieve |
Create Profile
import json
payload = {
'name': 'My Profile',
'invoice_expiration': 600,
'addresses_expiration': 3600,
'notification_email_kinds': 'payout_complete,payout_confirmed',
'onramper_api_key': 'XXXXXXXXXXXXXX',
'allow_smart_contract_payouts': False,
'stablecoin_precision': 6,
'acceptance_range': {
'negative_difference': 10,
'positive_difference': '0.001',
},
'callback_url': 'https://localhost:8000',
'reserve_wallet': {
'wallet': '<wallet_id>',
'kind': 'TRX',
},
'currencies': [
{
'kind': 'BTC',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
'zero_conf_max_amount': '1000',
},
{
'kind': 'BTC_LIGHTNING',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
},
{
'kind': 'TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
{
'kind': 'USDC-TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
],
}
profile = cryptochill_api_request('profiles', payload, 'POST')
print(json.dumps(profile, indent=2))
let payload = {
name: 'My Profile',
invoice_expiration: 600,
addresses_expiration: 3600,
notification_email_kinds: 'payout_complete,payout_confirmed',
onramper_api_key: 'XXXXXXXXXXXXXX',
allow_smart_contract_payouts: false,
stablecoin_precision: 6,
acceptance_range: {
'negative_difference': 10,
'positive_difference': '0.001',
},
callback_url: 'https://localhost:8000',
reserve_wallet: {
wallet: '<wallet_id>',
kind: 'TRX',
},
currencies: [
{
'kind': 'BTC',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
'zero_conf_max_amount': '1000',
},
{
'kind': 'BTC_LIGHTNING',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
},
{
'kind': 'TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
{
'kind': 'USDC-TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
],
}
cryptochill_api_request('profiles', payload, 'POST').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})
JSON response for Create profile endpoint:
{
"result": {
"id": "<id>",
"account": "SUB ACCOUNT",
"account_id": "<account-id>",
"name": "My Profile",
"notification_email": null,
"invoice_expiration": 600,
"addresses_expiration": 3600,
"notification_email_kinds": [
"payout_complete",
"payout_confirmed"
],
"onramper_api_key": "XXXXXXXXXXXXXX",
"allow_smart_contract_payouts": false,
"stablecoin_precision": 6,
"acceptance_range": {
"positive_difference": "0.0010",
"negative_difference": "10.0000"
},
"reserve_wallet": {
"kind": "TRX",
"network": "mainnet",
"wallet": "<wallet_id>"
},
"callback_url": "https://localhost:8000",
"currencies": [
{
"kind": "BTC",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6
},
{
"kind": "TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
},
{
"kind": "USDC-TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
},
{
"kind": "BTC_LIGHTNING",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6
}
]
}
}
This endpoint allows creating profile.
Editable fields: name
,notification_email
,invoice_expiration
,addresses_expiration
,notification_email_kinds
,onramper_api_key
,allow_smart_contract_payouts
,stablecoin_precision
,acceptance_range
,reserve_wallet
,callback_url
,currencies
.
HTTP Request
POST https://api.cryptochill.com/v1/profiles/
Payload Parameters
Parameter | Description | Required |
---|---|---|
name | Text field maximum length 256 | Yes |
notification_email | Must be valid email | No |
invoice_expiration | Integer representing value in seconds. Valid values are: 60 – 1 min120 – 2 min300 – 5 min 600 – 10 min900 – 15 min1800 – 30 min3600 – 1 hours7200 – 2 hours21600 – 6 hours43200 – 12 hours86400 – 24 hours172800 – 2 days604800 – 7 days1209600 – 14 days |
No |
addresses_expiration | Integer representing value in seconds. Valid values are: 3600 – 1 hour7200 – 2 hours21600 – 6 hours 43200 – 12 hours86400 – 24 hours172800 – 2 days604800 – 7 days1209600 – 14 days |
No |
notification_email_kinds | String representing notification email triggers. Valid values are invoice_pending , invoice_confirmed , invoice_complete , invoice_incomplete , transaction_pending , transaction_confirmed , transaction_complete , payout_pending , payout_confirmed , payout_complete Multiple values can be separated by comma. To clear set value to null |
No |
onramper_api_key | String representing API key. To enable Onramper integration for IFRAME widget provide https://www.onramper.com/ API key. To clear set value to null |
No |
allow_smart_contract_payouts | Boolean, True/False | No |
stablecoin_precision | Integer, Range: 0-6 | No |
acceptance_range | Object representing negative and positive % difference of Acceptance Range. | No |
reserve_wallet | Object representing reserve wallet. If there are not sufficient funds for requested payout then specified reserve wallet will be used to perform an auto conversion into necessary cryptocurrency and once done payout will be auto processed. | No |
callback_url | String representing valid URL where callbacks will be sent | No |
currencies | Object representing enabled currencies in profile. Must contain currency kind key object with keys wallet,custom_fee, min_confirmations. Available values for currency key: BTC – Bitcoin On-chain conversion.BTC_LIGHTNING_TO_BTC – Lightning Network to On-Chain.LTC – Litecoin.ETH – Ethereum.BNB – Binance Coin (on BSC).TRX – Tron.SOL – Solana.XRP – Ripple.DOGE – Dogecoin.Liquid network: L-BTC – Liquid Bitcoin.L-USDT – Tether on Liquid.Ethereum ERC-20 Tokens: ETH_USDT – Tether.ETH_TUSD – True USD.ETH_USDC – USD Coin.ETH_PAX – Paxos Standard.ETH_GUSD – Gemini Dollar.ETH_DAI – DAI.ETH_SAND – The Sandbox.ETH_SHIB – Shiba Inu.ETH_BUSD – Binance USDBinance Smart Chain (BSC) BEP-20 Tokens: ETH-BSC – Binance-pegged Ethereum.USDC-BSC – USD Coin.DAI-BSC – DAI.SHIB-BSC – Shiba Inu.BUSD – Binance USD.WBNB – Wrapped BNB.Tron TRC-20 Tokens: USDT-TRX – Tether.USDC-TRX – USD Coin.Solana SPL Tokens: USDT-SOL – Tether.USDC-SOL – USD Coin.Not provided currencies will be disabled. |
Yes |
Update Profile
import json
payload = {
'name': 'My Profile',
'invoice_expiration': 600,
'addresses_expiration': 3600,
'notification_email_kinds': 'payout_complete,payout_confirmed',
'onramper_api_key': 'XXXXXXXXXXXXXX',
'allow_smart_contract_payouts': False,
'stablecoin_precision': 6,
'acceptance_range': {
'negative_difference': 10,
'positive_difference': '0.001',
},
'callback_url': 'https://localhost:8000',
'reserve_wallet': {
'wallet': '<wallet_id>',
'kind': 'TRX',
},
'currencies': [
{
'kind': 'BTC',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
'zero_conf_max_amount': '1000',
},
{
'kind': 'BTC_LIGHTNING',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
},
{
'kind': 'TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
{
'kind': 'USDC-TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
],
}
profile = cryptochill_api_request('profiles/<id>', payload, 'PUT')
print(json.dumps(profile, indent=2))
let payload = {
name: 'My Profile',
invoice_expiration: 600,
addresses_expiration: 3600,
notification_email_kinds: 'payout_complete,payout_confirmed',
onramper_api_key: 'XXXXXXXXXXXXXX',
allow_smart_contract_payouts: false,
stablecoin_precision: 6,
acceptance_range: {
'negative_difference': 10,
'positive_difference': '0.001',
},
callback_url: 'https://localhost:8000',
reserve_wallet: {
wallet: '<wallet_id>',
kind: 'TRX',
},
currencies: [
{
'kind': 'BTC',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
'zero_conf_max_amount': '1000',
},
{
'kind': 'BTC_LIGHTNING',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 6,
},
{
'kind': 'TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
{
'kind': 'USDC-TRX',
'wallet_id': '<wallet_id>',
'custom_fee': None,
'min_confirmations': 20,
},
],
}
cryptochill_api_request('profiles/<id>', payload, 'PUT').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})
JSON response for Create profile endpoint:
{
"result": {
"id": "<id>",
"account": "SUB ACCOUNT",
"account_id": "<account-id>",
"name": "My Profile",
"notification_email": null,
"invoice_expiration": 600,
"addresses_expiration": 3600,
"notification_email_kinds": [
"payout_complete",
"payout_confirmed"
],
"onramper_api_key": "XXXXXXXXXXXXXX",
"allow_smart_contract_payouts": false,
"stablecoin_precision": 6,
"acceptance_range": {
"positive_difference": "0.0010",
"negative_difference": "10.0000"
},
"reserve_wallet": {
"kind": "TRX",
"network": "mainnet",
"wallet": "<wallet_id>"
},
"callback_url": "https://localhost:8000",
"currencies": [
{
"kind": "BTC",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6
},
{
"kind": "TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
},
{
"kind": "USDC-TRX",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 20
},
{
"kind": "BTC_LIGHTNING",
"network": "mainnet",
"wallet_id": "<wallet_id>",
"custom_fee": null,
"min_confirmations": 6
}
]
}
}
This endpoint allows updating profile.
Editable fields: name
,notification_email
,invoice_expiration
,addresses_expiration
,notification_email_kinds
,onramper_api_key
,allow_smart_contract_payouts
,stablecoin_precision
,acceptance_range
,reserve_wallet
,callback_url
,currencies
.
HTTP Request
PUT https://api.cryptochill.com/v1/profiles/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the profile to retrieve |
Payload Parameters
Parameter | Description |
---|---|
name | Text field maximum length 256 |
notification_email | Must be valid email |
invoice_expiration | Integer representing value in seconds. Valid values are: 60 – 1 min120 – 2 min300 – 5 min 600 – 10 min900 – 15 min1800 – 30 min3600 – 1 hours7200 – 2 hours21600 – 6 hours43200 – 12 hours86400 – 24 hours172800 – 2 days604800 – 7 days1209600 – 14 days |
addresses_expiration | Integer representing value in seconds. Valid values are: 3600 – 1 hour7200 – 2 hours21600 – 6 hours 43200 – 12 hours86400 – 24 hours172800 – 2 days604800 – 7 days1209600 – 14 days |
notification_email_kinds | String representing notification email triggers. Valid values are invoice_pending , invoice_confirmed , invoice_complete , invoice_incomplete , transaction_pending , transaction_confirmed , transaction_complete , payout_pending , payout_confirmed , payout_complete Multiple values can be separated by comma. To clear set value to null |
onramper_api_key | String representing API key. To enable Onramper integration for IFRAME widget provide https://www.onramper.com/ API key. To clear set value to null |
allow_smart_contract_payouts | Boolean, True/False |
acceptance_range | Object representing negative and positive % difference of Acceptance Range. |
reserve_wallet | Object representing reserve wallet. If there are not sufficient funds for requested payout then specified reserve wallet will be used to perform an auto conversion into necessary cryptocurrency and once done payout will be auto processed. |
callback_url | String representing valid URL where callbacks will be sent |
currencies | Object representing enabled currencies in profile. Must contain currency kind key object with keys wallet,custom_fee, min_confirmations. Available values for currency key: BTC – Bitcoin On-chain conversion.BTC_LIGHTNING_TO_BTC – Lightning Network to On-Chain.LTC – Litecoin.ETH – Ethereum.BNB – Binance Coin (on BSC).TRX – Tron.SOL – Solana.XRP – Ripple.DOGE – Dogecoin.Liquid network: L-BTC – Liquid Bitcoin.L-USDT – Tether on Liquid.Ethereum ERC-20 Tokens: ETH_USDT – Tether.ETH_TUSD – True USD.ETH_USDC – USD Coin.ETH_PAX – Paxos Standard.ETH_GUSD – Gemini Dollar.ETH_DAI – DAI.ETH_SAND – The Sandbox.ETH_SHIB – Shiba Inu.ETH_BUSD – Binance USDBinance Smart Chain (BSC) BEP-20 Tokens: ETH-BSC – Binance-pegged Ethereum.USDC-BSC – USD Coin.DAI-BSC – DAI.SHIB-BSC – Shiba Inu.BUSD – Binance USD.WBNB – Wrapped BNB.Tron TRC-20 Tokens: USDT-TRX – Tether.USDC-TRX – USD Coin.Solana SPL Tokens: USDT-SOL – Tether.USDC-SOL – USD Coin.Not provided currencies will be disabled. |
No |
Delete Profile
import json
payload = None
profile = cryptochill_api_request('profiles/<id>', payload, 'DELETE')
print(json.dumps(profile, indent=2))
var payload = null
cryptochill_api_request('profiles/<id>', payload, 'DELETE').then(function(response) {
//
}).catch(function(error) {
console.log(error);
});
This endpoint allows delete profile.
HTTP Request
DELETE https://api.cryptochill.com/v1/profiles/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the profile to delete |
Wallets
List Wallets
wallets = cryptochill_api_request('wallets')
cryptochill_api_request('wallets').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<id>",
"name": "Bitcoin",
"balances": {
"available": "0",
"pending": "0",
"currency": "BTC",
"zero_confirmed": "0"
}
},
{
"id": "<id>",
"name": "Ethereum",
"balances": {
"available": "0",
"pending": "0",
"to_consolidate": "0",
"currency": "ETH"
},
"token_balances": [
{
"available": "0",
"pending": "0",
"to_consolidate": "0",
"currency": "USDT"
}
]
}
]
}
This endpoint retrieves all wallets.
HTTP Request
GET https://api.cryptochill.com/v1/wallets/
Query Parameters
Parameter | Default | Description |
---|---|---|
profile_id | None | Filter wallets by profile_id |
Get Wallet
wallets = cryptochill_api_request('wallets/123')
cryptochill_api_request('wallets/123').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"id": "<id>",
"name": "Ethereum",
"balances": {
"available": "0",
"pending": "0",
"to_consolidate": "0",
"currency": "ETH"
},
"token_balances": [
{
"available": "0",
"pending": "0",
"to_consolidate": "0",
"currency": "USDT"
}
]
}
This endpoint retrieves a specific wallet.
HTTP Request
GET https://api.cryptochill.com/v1/wallets/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the wallet to retrieve |
Auto Payouts
Automatic payout automatically sends wallet funds to defined recipient address and keeps defined minimum amount in the wallet. Creation of new automatic payouts is allowed only through Dashboard UI.
List Auto Payouts
auto_payouts = cryptochill_api_request('automatic-payouts')
cryptochill_api_request('automatic-payouts').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<id>",
"wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"kind": "USDC-TRX",
"recipient_address": "TLTsfAwsq8vsyhYWQUMRRUggP38aUyJYv8",
"is_enabled": true,
"is_api_editable": true,
"min_amount": "33",
"keep_amount": "1",
"interval": 360
}
]
}
This endpoint retrieves all automatic payouts.
HTTP Request
GET https://api.cryptochill.com/v1/automatic-payouts/
Get Auto Payout
auto_payouts = cryptochill_api_request('automatic-payouts/<id>')
cryptochill_api_request('automatic-payouts/<id>').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<id>",
"wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"kind": "USDC-TRX",
"recipient_address": "TLTsfAwsq8vsyhYWQUMRRUggP38aUyJYv8",
"is_enabled": true,
"is_api_editable": true,
"min_amount": "33",
"keep_amount": "1",
"interval": 360
}
}
This endpoint retrieves a specific automatic payout.
HTTP Request
GET https://api.cryptochill.com/v1/automatic-payouts/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic payout to retrieve |
Create Auto Payout
import json
payload = {
'is_enabled': True,
'wallet': '<wallet_id>',
'kind': 'USDT-TRX',
'keep_amount': 23,
'min_amount': 11,
'recipient_address': 'TLTsfAwsq8vsyhYWQUMRRUggP38aUyJYv8',
'interval': 30,
}
auto_payout = cryptochill_api_request('automatic-payouts', payload, 'POST')
print(json.dumps(auto_payout, indent=2))
var payload = {
'is_enabled': True,
'wallet': '<wallet_id>',
'kind': 'USDT-TRX',
'keep_amount': 23,
'min_amount': 11,
'recipient_address': 'TLTsfAwsq8vsyhYWQUMRRUggP38aUyJYv8',
'interval': 30,
}
cryptochill_api_request('automatic-payouts', payload, 'POST').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Payout endpoint:
{
"result": {
"id": "<id>",
"wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"kind": "USDC-TRX",
"recipient_address": "TLTsfAwsq8vsyhYWQUMRRUggP38aUyJYv8",
"is_enabled": true,
"is_api_editable": true,
"min_amount": "33",
"keep_amount": "1",
"interval": 360
}
}
This endpoint allows creating automatic payout.
Only one automatic payout per wallet per kind is allowed.
Editable fields: wallet
,keep_amount
,recipient_address
,kind
,is_enabled
,min_amount
,interval
.
In order to edit automatic payout through API it must have "API Editable" checkbox enabled in UI.
HTTP Request
POST https://api.cryptochill.com/v1/automatic-payouts/
Payload Parameters
Parameter | Description | Required |
---|---|---|
wallet | Wallet ID | Yes |
keep_amount | Amount to keep in wallet | Yes |
recipient_address | Recipient address. | Yes |
kind | Available Values | No |
is_enabled | Enable / Disable automatic payout execution | No |
min_amount | Minimal amount to execute automatic payout | No |
interval | Execution interval in minutes. Supported: 5, 10, 15, 30, 60, 120, 240, 360. | No |
Update Auto Payout
import json
payload = {
'is_enabled': True,
'kind': 'USDT-TRX',
'keep_amount': 23,
'min_amount': 11,
'recipient_address': 'TLTsfAwsq8vsyhYWQUMRRUggP38aUyJYv8',
'interval': 30,
}
auto_payout = cryptochill_api_request('automatic-payouts/<id>', payload, 'PUT')
print(json.dumps(auto_payout, indent=2))
var payload = {
'is_enabled': True,
'kind': 'USDT-TRX',
'keep_amount': 23,
'min_amount': 11,
'recipient_address': 'TLTsfAwsq8vsyhYWQUMRRUggP38aUyJYv8',
'interval': 30,
}
cryptochill_api_request('automatic-payouts/<id>', payload, 'PUT').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Payout endpoint:
{
"result": {
"id": "<id>",
"wallet": {
"id": "<wallet_id>",
"name": "Bitcoin Testnet"
},
"recipient_address": "3Q2sdSVxqQCyYUt4NvX2y4XNmn7PRF77PZ",
"keep_amount": "1000"
}
}
This endpoint allows updating automatic payout.
Editable fields: wallet
,keep_amount
,recipient_address
,kind
,is_enabled
,min_amount
,interval
.
In order to edit automatic payout through API it must have "API Editable" checkbox enabled in UI.
HTTP Request
PUT https://api.cryptochill.com/v1/automatic-payouts/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic payout to retrieve |
Payload Parameters
Parameter | Description |
---|---|
keep_amount | Amount to keep in wallet |
recipient_address | Recipient address. |
kind | Available Values |
is_enabled | Enable / Disable automatic payout execution |
min_amount | Minimal amount to execute automatic payout |
interval | Execution interval in minutes. Supported: 5, 10, 15, 30, 60, 120, 240, 360. |
Delete Auto Payout
import json
payload = None
auto_payout = cryptochill_api_request('automatic-payouts/<id>', payload, 'DELETE')
print(json.dumps(auto_payout, indent=2))
var payload = null
cryptochill_api_request('automatic-payouts/<id>', payload, 'DELETE').then(function(response) {
//
}).catch(function(error) {
console.log(error);
});
This endpoint allows delete automatic payout.
HTTP Request
DELETE https://api.cryptochill.com/v1/automatic-payouts/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic payout to delete |
Auto Conversions
Multiple times a day wallets balances will be checked and if balance exceeds amount specified in "Keep Amount" by at least "Minimum Amount" it will be automatically converted into desirable currency. "Maximum Amount" limits what is the maximum amount per one conversion.
List Auto Conversions
auto_conversions = cryptochill_api_request('automatic-conversions')
cryptochill_api_request('automatic-conversions').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_enabled": true
}
]
}
This endpoint retrieves all automatic conversions.
HTTP Request
GET https://api.cryptochill.com/v1/automatic-conversions/
Get Auto Conversion
auto_conversions = cryptochill_api_request('automatic-conversions/<id>')
cryptochill_api_request('automatic-conversions/<id>').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
"id": "<exchange_id>", "title": "Binance"
},
"is_enabled": true
}
}
This endpoint retrieves a specific automatic conversion.
HTTP Request
GET https://api.cryptochill.com/v1/automatic-conversions/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic conversion to retrieve |
Create Auto Conversion
import json
payload = {
'is_enabled': True,
'from_wallet': '<wallet_id>',
'from_kind': 'USDT-TRX',
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
auto_conversion = cryptochill_api_request('automatic-conversions', payload, 'POST')
print(json.dumps(auto_conversion, indent=2))
var payload = {
'is_enabled': True,
'from_wallet': '<wallet_id>',
'from_kind': 'USDT-TRX',
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
cryptochill_api_request('automatic-conversions', payload, 'POST').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Conversion endpoint:
{
"result": {
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_enabled": true
}
}
This endpoint allows creating automatic conversion.
Only one automatic conversion per wallet per kind is allowed.
Editable fields: to_wallet
,to_kind
,keep_amount
,min_amount
,exchange
,is_enabled
.
HTTP Request
POST https://api.cryptochill.com/v1/automatic-conversions/
Payload Parameters
Parameter | Description | Required |
---|---|---|
is_enabled | Enable / Disable automatic conversion execution | No |
from_wallet | Wallet ID | Yes |
from_kind | Available Values | Yes |
to_wallet | Wallet ID | Yes |
to_kind | Available Values | Yes |
min_amount | Minimal amount to execute automatic conversion | Yes |
max_amount | Maximum amount to execute automatic conversion | Yes |
keep_amount | Amount to keep in wallet | Yes |
exchange | Exchange ID | No |
Update Auto Conversion
import json
payload = {
'is_enabled': True,
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
auto_conversion = cryptochill_api_request('automatic-conversions/<id>', payload, 'PUT')
print(json.dumps(auto_conversion, indent=2))
var payload = {
'is_enabled': True,
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
cryptochill_api_request('automatic-conversions/<id>', payload, 'PUT').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Conversion endpoint:
{
"result": {
"id": "<id>",
"created_at": "2024-09-19T16:18:22.057617+00:00",
"created_by": "<user_email>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_enabled": true
}
}
This endpoint allows updating automatic conversion.
Editable
fields: is_enabled
,to_wallet
,to_kind
,keep_amount
,min_amount
,max_amount
,exchange
.
HTTP Request
PUT https://api.cryptochill.com/v1/automatic-conversions/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic conversion to retrieve |
Payload Parameters
Parameter | Description |
---|---|
is_enabled | Enable / Disable automatic conversion execution |
to_wallet | Wallet ID |
to_kind | Available Values |
exchange | Exchange ID |
min_amount | Minimal amount to execute automatic conversion |
max_amount | Maximum amount to execute automatic conversion |
keep_amount | Amount to keep in wallet |
Delete Auto Conversion
import json
payload = None
auto_conversion = cryptochill_api_request('automatic-conversions/<id>', payload, 'DELETE')
print(json.dumps(auto_conversion, indent=2))
var payload = null
cryptochill_api_request('automatic-conversions/<id>', payload, 'DELETE').then(function(response) {
//
}).catch(function(error) {
console.log(error);
});
This endpoint allows delete automatic conversion.
HTTP Request
DELETE https://api.cryptochill.com/v1/automatic-conversions/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic conversion to delete |
Auto Funding
Multiple times a day a wallet's balances will be checked, and if the balance is smaller than the amount specified in " Keep Amount" by at least "Minimum Amount" it will be automatically refilled from your specified funding wallet or wallet with the largest balance when its funds drop below the designated "Minimum Amount". This action will only execute if the funding source has a sufficient balance.
List Auto Funding
auto_funding = cryptochill_api_request('automatic-funding')
cryptochill_api_request('automatic-funding').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<id>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_enabled": true
}
]
}
This endpoint retrieves all automatic funding's.
HTTP Request
GET https://api.cryptochill.com/v1/automatic-funding/
Get Auto Funding
auto_funding = cryptochill_api_request('automatic-funding/<id>')
cryptochill_api_request('automatic-funding/<id>').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<id>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_enabled": true
}
}
This endpoint retrieves a specific automatic funding.
HTTP Request
GET https://api.cryptochill.com/v1/automatic-funding/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic funding to retrieve |
Create Auto Funding
import json
payload = {
'is_enabled': True,
'from_wallet': '<wallet_id>',
'from_kind': 'USDT-TRX',
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
auto_funding = cryptochill_api_request('automatic-funding', payload, 'POST')
print(json.dumps(auto_funding, indent=2))
var payload = {
'is_enabled': True,
'from_wallet': '<wallet_id>',
'from_kind': 'USDT-TRX',
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
cryptochill_api_request('automatic-funding', payload, 'POST').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Funding endpoint:
{
"result": {
"id": "<id>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_enabled": true
}
}
This endpoint allows creating automatic funding.
Only one automatic funding per wallet per kind is allowed.
Editable fields: to_wallet
,to_kind
,keep_amount
,min_amount
,exchange
,is_enabled
.
HTTP Request
POST https://api.cryptochill.com/v1/automatic-funding/
Payload Parameters
Parameter | Description | Required |
---|---|---|
is_enabled | Enable / Disable automatic funding execution | No |
from_wallet | Wallet ID | Yes |
from_kind | Available Values | Yes |
to_wallet | Wallet ID | Yes |
to_kind | Available Values | Yes |
min_amount | Minimal amount to execute automatic funding | Yes |
max_amount | Maximum amount to execute automatic funding | Yes |
keep_amount | Amount to keep in wallet | Yes |
exchange | Exchange ID | No |
Update Auto Funding
import json
payload = {
'is_enabled': True,
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
auto_funding = cryptochill_api_request('automatic-funding/<id>', payload, 'PUT')
print(json.dumps(auto_funding, indent=2))
var payload = {
'is_enabled': True,
'to_wallet': '<wallet_id>',
'to_kind': 'USDC-TRX',
'min_amount': 50,
'max_amount': 50,
'keep_amount': 50,
'exchange': '<exchange_id>',
}
cryptochill_api_request('automatic-funding/<id>', payload, 'PUT').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
JSON response for Create Automatic Funding endpoint:
{
"result": {
"id": "<id>",
"from_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"from_kind": "USDT-TRX",
"to_wallet": {
"id": "<wallet_id>",
"name": "Tron"
},
"to_kind": "USDC-TRX",
"keep_amount": "50",
"min_amount": "50",
"max_amount": "50",
"exchange": {
"id": "<exchange_id>",
"title": "Binance"
},
"is_enabled": true
}
}
This endpoint allows updating automatic funding.
Editable
fields: is_enabled
,to_wallet
,to_kind
,keep_amount
,min_amount
,max_amount
,exchange
.
HTTP Request
PUT https://api.cryptochill.com/v1/automatic-funding/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic funding to retrieve |
Payload Parameters
Parameter | Description |
---|---|
is_enabled | Enable / Disable automatic funding execution |
to_wallet | Wallet ID |
to_kind | Available Values |
exchange | Exchange ID |
min_amount | Minimal amount to execute automatic funding |
max_amount | Maximum amount to execute automatic funding |
keep_amount | Amount to keep in wallet |
Delete Auto Funding
import json
payload = None
auto_funding = cryptochill_api_request('automatic-funding/<id>', payload, 'DELETE')
print(json.dumps(auto_funding, indent=2))
var payload = null
cryptochill_api_request('automatic-funding/<id>', payload, 'DELETE').then(function(response) {
//
}).catch(function(error) {
console.log(error);
});
This endpoint allows delete automatic funding.
HTTP Request
DELETE https://api.cryptochill.com/v1/automatic-funding/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the automatic funding to delete |
Exchange Rates
Get latest exchange rates between fiat and cryptocurrencies.
List Rates
rates = cryptochill_api_request('exchange-rates')
cryptochill_api_request('exchange-rates').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "united-states-dollar",
"kind": "fiat",
"symbol": "USD",
"rate_usd": "1",
"rate_btc": "0.000292111117128",
"sign": "$"
},
{
"id": "euro",
"kind": "fiat",
"symbol": "EUR",
"rate_usd": "1.1424784928423721",
"rate_btc": "2996.4282380088874310",
"sign": "€"
},
{
"id": "bitcoin",
"kind": "crypto",
"symbol": "BTC",
"rate_usd": "3423.3548172707183421",
"rate_btc": "1",
"sign": "₿"
}
]
}
Get all exchange rates:
HTTP Request
GET https://api.cryptochill.com/v1/exchange-rates/
Get Rate
Get exchange rate for specific fiat currency only.
rates = cryptochill_api_request('exchange-rates/EUR')
cryptochill_api_request('exchange-rates/EUR').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "euro",
"kind": "fiat",
"symbol": "EUR",
"rate_usd": "1.1424784928423721",
"rate_btc": "2996.4282380088874310",
"sign": "€"
}
}
HTTP Request
GET https://api.cryptochill.com/v1/exchange-rates/<SYMBOL>/
URL Parameters
Parameter | Description |
---|---|
SYMBOL | Symbol of the currency to retrieve |
Account
Get Account
account = cryptochill_api_request('account/settings/')
cryptochill_api_request('account/settings/').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<id>",
"name": "Your Account (Testnet)",
"is_testnet": true,
"url": "https://cryptochill.com/app/your-account-testnet/"
}
}
This endpoint retrieves account.
HTTP Request
GET https://api.cryptochill.com/v1/account/settings/
Sub Accounts
Sub Account endpoints are only accessible using special "Integrator API" keys and are available upon request.
List Sub Accounts
account = cryptochill_api_request('accounts/')
cryptochill_api_request('accounts/').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<id>",
"name": "SUB ACCOUNT",
"slug": "sub-account",
"is_testnet": false,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://cryptochill-dev.local.adventure.lv:8030/app/sub-account/"
}
]
}
This endpoint retrieves sub accounts.
HTTP Request
GET https://api.cryptochill.com/v1/accounts/
Get Sub Account
accounts = cryptochill_api_request('accounts/<id>')
cryptochill_api_request('accounts/<id>').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<id>",
"name": "SUB ACCOUNT",
"slug": "sub-account",
"is_testnet": false,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://cryptochill-dev.local.adventure.lv:8030/app/sub-account/"
}
}
This endpoint retrieves a specific account.
HTTP Request
GET https://api.cryptochill.com/v1/accounts/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the sub account to retrieve |
Create Account
import json
payload = {
'name': 'My Account',
'can_add_exchange': True,
'show_internal_tx': False,
'whitelabel_fee': '0.1',
}
account = cryptochill_api_request('accounts', payload, 'POST')
print(json.dumps(account, indent=2))
let payload = {
name: 'My Account',
can_add_exchange: true,
show_internal_tx: false,
whitelabel_fee: '0.1',
}
cryptochill_api_request('accounts', payload, 'POST').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})
JSON response for Create account endpoint:
{
"result": {
"id": "<id>",
"name": "My Account",
"slug": "my-account",
"is_testnet": true,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://cryptochill-dev.local.adventure.lv:8030/app/my-account/"
}
}
This endpoint allows creating account.
Editable fields: name
,can_add_exchange
,show_internal_tx
, whitelabel_fee
.
HTTP Request
POST https://api.cryptochill.com/v1/accounts/
Payload Parameters
Parameter | Description | Required |
---|---|---|
name | Text field maximum length 64 | Yes |
can_add_exchange | True or False | No |
show_internal_tx | True or False | No |
whitelabel_fee | Whitelabel fee (decimal, 0.1=10%) | No |
Update Account
import json
payload = {
'name': 'My Account',
'can_add_exchange': True,
'show_internal_tx': False,
}
account = cryptochill_api_request('accounts/<id>', payload, 'PUT')
print(json.dumps(account, indent=2))
let payload = {
name: 'My Account',
can_add_exchange: true,
show_internal_tx: false,
whitelabel_fee: '0.1',
}
cryptochill_api_request('accounts/<id>', payload, 'PUT').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})
JSON response for Create account endpoint:
{
"result": {
"id": "<id>",
"name": "My Account",
"slug": "my-account",
"is_testnet": true,
"can_add_exchange": true,
"show_internal_tx": false,
"whitelabel_fee": "0.1",
"profiles": [
"<profile-id>"
],
"callback_token": "<TOKEN>",
"url": "https://cryptochill-dev.local.adventure.lv:8030/app/my-account/"
}
}
This endpoint allows updating account.
Editable fields: name
,can_add_exchange
,show_internal_tx
, whitelabel_fee
.
HTTP Request
PUT https://api.cryptochill.com/v1/accounts/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the account to retrieve |
Payload Parameters
Parameter | Description |
---|---|
name | Text field maximum length 64 |
can_add_exchange | True or False |
show_internal_tx | True or False |
whitelabel_fee | Whitelabel fee (decimal, 0.1=10%) |
Api Keys
Api Key create, edit, delete endpoints and api_secret
and callback_token
fields are only accessible using special "
Integrator API" keys and are available upon request.
List Api Keys
This endpoint retrieves api keys.
Fields api_secret
and callback_token
are only fully accessible when using special "Integrator API" keys, which are
available upon request.
Using any API key other than the special 'Integrator API' key results in the values of
the api_secret
and callback_token
fields being displayed as ********
.
This measure is implemented to maintain security and confidentiality, ensuring sensitive information is only fully accessible through the designated Integrator API key.
response = cryptochill_api_request('api-keys/')
cryptochill_api_request('api-keys/').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": [
{
"id": "<ID>",
"api_key": "<API_KEY>",
"api_secret": "<SECRET>",
"name": "KEY 1700572804",
"created_by": "user@example.com",
"updated_at": "2023-11-21T13:46:50.843596+00:00",
"is_integrator_key": true,
"account_id": "<ACCOUNT_ID>",
"max_payout": "55.00",
"whitelist_ip": [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:write",
"transactions:write",
"payouts:write",
"auto-payouts:write",
"profiles:write",
"wallets:write",
"exchange-rates:write",
"auto-conversions:write",
"auto-funding:write",
"conversions:write",
"account:write",
"api-keys:write"
]
}
]
}
HTTP Request
GET https://api.cryptochill.com/v1/api-keys/
Get Api Key
response = cryptochill_api_request('api-keys/<id>')
cryptochill_api_request('api-keys/<id>').then(function(response) {
console.log(response);
}).catch(function(error) {
console.log(error);
});
The above command returns JSON structured like this:
{
"result": {
"id": "<ID>",
"api_key": "<API_KEY>",
"api_secret": "<SECRET>",
"name": "Production Api Key",
"created_by": "user@example.com",
"updated_at": "2023-11-21T13:46:50.843596+00:00",
"is_integrator_key": true,
"account_id": "<ACCOUNT_ID>",
"max_payout": "55.00",
"whitelist_ip": [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:write",
"transactions:write",
"payouts:write",
"auto-payouts:write",
"profiles:write",
"wallets:write",
"exchange-rates:write",
"auto-conversions:write",
"auto-funding:write",
"conversions:write",
"account:write",
"api-keys:write"
]
}
}
This endpoint retrieves a specific api-key.
Field api_secret
are only fully accessible when using special "Integrator API" keys, which are
available upon request.
Using any API key other than the special 'Integrator API' key results in the values of
the api_secret
fields being displayed as ********
.
This measure is implemented to maintain security and confidentiality, ensuring sensitive information is only fully accessible through the designated Integrator API key.
HTTP Request
GET https://api.cryptochill.com/v1/api-keys/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the api-key to retrieve |
Create Api Key
This endpoint allows creating api-key. This is only accessible using special "Integrator API" keys and are available upon request.
import json
payload = {
'name': 'Production Api Key',
'max_payout': "55",
"account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
'whitelist_ip': [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:read",
"transactions:read",
"payouts:read",
"auto-payouts:read",
"profiles:read",
"wallets:read",
"exchange-rates:read",
"auto-conversions:read",
"auto-funding:read",
"conversions:read",
"account:read",
"api-keys:read"
]
}
response = cryptochill_api_request('api-keys', payload, 'POST')
print(json.dumps(response, indent=2))
let payload = {
'name': 'Production Api Key',
'max_payout': "55",
"account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
'whitelist_ip': [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:read",
"transactions:read",
"payouts:read",
"auto-payouts:read",
"profiles:read",
"wallets:read",
"exchange-rates:read",
"auto-conversions:read",
"auto-funding:read",
"conversions:read",
"account:read",
"api-keys:read"
]
}
cryptochill_api_request('api-keys', payload, 'POST').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})
JSON response for Create api-key endpoint:
{
"result": {
"id": "<ID>",
"api_key": "<API_KEY>",
"api_secret": "<SECRET>",
"name": "Production Api Key",
"created_by": "user@example.com",
"updated_at": "2023-11-21T13:46:50.843596+00:00",
"is_integrator_key": true,
"account_id": "<ACCOUNT_ID>",
"max_payout": "55.00",
"whitelist_ip": [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:write",
"transactions:write",
"payouts:write",
"auto-payouts:write",
"profiles:write",
"wallets:write",
"exchange-rates:write",
"auto-conversions:write",
"auto-funding:write",
"conversions:write",
"account:write",
"api-keys:write"
]
}
}
HTTP Request
POST https://api.cryptochill.com/v1/api-keys/
Payload Parameters
Parameter | Description | Required |
---|---|---|
name | Text field maximum length 64 | Yes |
account_id | Sub Account ID | Yes |
max_payout | Decimal number | No |
whitelist_ip | Array of strings | No |
permissions | Array of strings Available Values | Yes |
Update Api Key
import json
payload = {
'name': 'Production Api Key',
'max_payout': "55",
"account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
'whitelist_ip': [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:read",
"transactions:read",
"payouts:read",
"auto-payouts:read",
"profiles:read",
"wallets:read",
"exchange-rates:read",
"auto-conversions:read",
"auto-funding:read",
"conversions:read",
"account:read",
"api-keys:read"
]
}
response = cryptochill_api_request('api-keys/<id>', payload, 'PUT')
print(json.dumps(response, indent=2))
let payload = {
'name': 'Production Api Key',
'max_payout': "55",
"account_id": "8dd75ab0-9f11-4c7f-9bd2-77eb2fb84963",
'whitelist_ip': [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:read",
"transactions:read",
"payouts:read",
"auto-payouts:read",
"profiles:read",
"wallets:read",
"exchange-rates:read",
"auto-conversions:read",
"auto-funding:read",
"conversions:read",
"account:read",
"api-keys:read"
]
}
cryptochill_api_request('api-keys/<id>', payload, 'PUT').then(function(response) {
console.log(response)
}).catch(function(error) {
console.log(error)
})
JSON response for Create api-key endpoint:
{
"result": {
"id": "<ID>",
"api_key": "<API_KEY>",
"api_secret": "<SECRET>",
"name": "Production Api Key",
"created_by": "user@example.com",
"updated_at": "2023-11-21T13:46:50.843596+00:00",
"is_integrator_key": true,
"account_id": "<ACCOUNT_ID>",
"max_payout": "55.00",
"whitelist_ip": [
"127.0.0.1",
"123.123.123.123"
],
"permissions": [
"invoices:write",
"transactions:write",
"payouts:write",
"auto-payouts:write",
"profiles:write",
"wallets:write",
"exchange-rates:write",
"auto-conversions:write",
"auto-funding:write",
"conversions:write",
"account:write",
"api-keys:write"
]
}
}
This endpoint allows updating api-key. This is only accessible using special "Integrator API" keys and are available upon request.
Editable fields: name
,max_payout
,whitelist_ip
,permissions
.
HTTP Request
PUT https://api.cryptochill.com/v1/api-keys/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the api-key to retrieve |
Payload Parameters
Parameter | Description |
---|---|
name | Text field maximum length 64 |
account_id | Sub Account ID |
max_payout | Decimal number |
whitelist_ip | Array of strings |
permissions | Array of strings Available Values |
Delete Api Key
import json
payload = None
response = cryptochill_api_request('api-keys/<id>', payload, 'DELETE')
print(json.dumps(response, indent=2))
var payload = null
cryptochill_api_request('api-keys/<id>', payload, 'DELETE').then(function(response) {
//
}).catch(function(error) {
console.log(error);
});
This endpoint allows deleting api-key. This is only accessible using special "Integrator API" keys and are available upon request.
HTTP Request
DELETE https://api.cryptochill.com/v1/api-keys/<ID>/
URL Parameters
Parameter | Description |
---|---|
ID | The ID of the api-key to delete |
Callbacks
Callbacks are POST
(as JSON
encoded request body) requests made by CryptoChill to URL endpoint specified in
Profile that was used for related invoice creation.
Callback expects HTTP 200
OK success status response code (any 20X
status will work too). For any other status code or timeout it will try to reach
endpoint again with exponential time increase between retries. If after 72 hours
endpoint will be still unreachable
callback sender will stop trying.
You can view history of callbacks in CryptoChill app under every instance that have callbacks.
Callbacks Verification
import hashlib
import hmac
import json
# You will find your callback token under Settings
CALLBACK_TOKEN = 'your_callback_token'
# You can reuse same method used in API auth signature generation
def encode_hmac(key, msg, digestmod=hashlib.sha256):
return hmac.new(key.encode(), msg=msg, digestmod=digestmod).hexdigest()
# Decode request json body
payload = json.loads(request.body)
# Get signature and callback_id fields from provided data
signature = payload['signature']
callback_id = payload['callback_id']
# Compare signatures
is_valid = signature == encode_hmac(CALLBACK_TOKEN, callback_id.encode())
assert is_valid, 'Failed to verify CryptoChill callback signature.'
# Debug callback data
print(json.dumps(payload, indent=2))
const Base64 = require('js-base64').Base64;
const crypto = require('crypto');
// You will find your callback token under Settings
const CALLBACK_TOKEN = 'your_callback_token';
// You can reuse same method used in API auth signature generation
function encode_hmac(key, msg) {
return crypto.createHmac('sha256', key).update(msg).digest('hex');
}
// Decode request json body
var payload = JSON.parse(request.body);
// Get signature and callback_id fields from provided data
const signature = payload['signature'];
const callback_id = payload['callback_id'];
// Compare signatures
const is_valid = signature === encode_hmac(CALLBACK_TOKEN, callback_id);
if (!is_valid) {
throw new Error('Failed to verify CryptoChill callback signature.');
}
// Debug callback data
console.log(payload);
To verify callback and make sure it really comes from CryptoChill you must use Callback Token which you can find in CryptoChill app under Settings > API Keys.
Always verify if signature provided in callback POST data matches the one you generate on your own by
signing callback_id
value with callback_token
using following hashing algorithm:
signature = hex(HMAC_SHA256(<callback_id>, key=<callback_token>))
Callbacks Response
All callbacks have these fields in common:
Key | Meaning |
---|---|
callback_id | Unique callback ID. If callback fails to reach endpoint, it will retry with the same ID. |
callback_status | Callback status identifying specific event. |
signature | CryptoChill signature for verification. |
For event specific response documentation see Callback section under specific endpoint.
Testnets
For all our supported coins except "Liquid Bitcoin" there is testnet available. You can switch between Testnet and Mainnet accounts under Account switch in the header in top left side. Testnet and mainnet accounts are complete separated and have its own settings, users, API keys, etc.
Faucets are online resources where you can receive free testnet coins.
Bitcoin Testnet
Explorer: blockstream.info/testnet/
Faucets: Faucet 1, Faucet 2 , Faucet 3, Faucet 4
Litecoin Testnet
Explorer: blockstream.info/testnet/
Ethereum Testnet
Network: Sepolia (chain id: 11155111)
Explorer: sepolia.etherscan.io
If you’d like to test USDT on testnet, use WEENUS token. You can send 0 value testnet ETH to contract address and in return you will receive back WEENUS tokens for testing which are treated as USDT on CryptoChill testnet account. Let us know if you have problems receiving Sepolia testnet coins and we will provide you with some.
Polygon Testnet
Network: Amoy (chain id: 80002)
Explorer: amoy.polygonscan.com
Faucets:
Supported Contracts on Testnet: USDC (ERC20 token)
Base Network Testnet
Network: Sepolia (chain id: 84532)
Explorer: sepolia.basescan.org
Faucets: Faucet 1 (ETH)
Supported Contracts on Testnet: None
Arbitrum Network Testnet
Network: Sepolia (chain id: 421614)
Explorer: sepolia.arbiscan.io
Faucets: Faucet 1 (ETH)
Supported Contracts on Testnet: None
BSC Testnet
Binance Smart Chain Testnet.
Chain ID: 97.
Explorer: testnet.bscscan.com
Faucets: Faucet 1
Supported Contracts on Testnet: USDT
USDT Faucet (USDT under "Peggy tokens" dropdown).
Tron Testnet
Network: Nile
Explorer: nile.tronscan.org
Faucets: Faucet 1 (TRX and USDT)
Supported Contracts on Testnet: USDT
Solana Devnet
Network: Devnet
Explorer: explorer.solana.com
Faucets:
faucet.solana.com - A public web faucet hosted by the Solana Foundation
SolFaucet.com - Web UI for airdrops from the public RPC endpoints
QuickNode - A web faucet operated by QuickNode
Supported Contracts on Devnet: USDC
Ripple Testnet
Explorer: testnet.xrpl.org
Faucets Faucet 1
Dogecoin Testnet
Explorer: sochain.com/testnet/doge
Errors
Error payload
Example of error response:
{
"result": "error",
"reason": "ObjectNotFound",
"message": "Object by specified ID not found"
}
In the event of an error, a non-200 error code will be returned, and the response body will be a json object with three fields:
result
– which will always be "error".reason
– which will be one of the string constants.message
– a human-readable string with additional error information.
HTTP error codes
Error Code | Meaning |
---|---|
400 | Bad Request – Your request is invalid. |
401 | Unauthorized – Your API key or signature is wrong. |
403 | Forbidden – Not enough permissions. |
404 | Not Found – The specified page could not be found. |
405 | Method Not Allowed – You tried to access endpoint with an invalid method. |
500 | Internal Server Error – We had a problem with our server. |
503 | Service Unavailable – We're temporarily offline for maintenance. |
Integrations
CryptoChill can be also used through various payment/orchestration platforms.
Currently following platforms have direct CryptoChill integrations:
Steps to complete integration is same for all platforms:
- Provide configuration
Profile ID
,API Key
andAPI Secret
andAPI Callback Token
to payment platform provider.- You can find
Profile ID
on Profiles list. - You can find
API Keys
andAPI Callback Token
under Settings > API Keys.
- You can find
- Add
Callback URL
provided by platform provider to CryptoChill configuration profile.
If you are using or would like to use other payment platform, please let us know.
-
Api Key permissions
Following are the supported list of Api Key
permissions:
invoices:read
, invoices:write
,
transactions:read
, transactions:write
,
payouts:read
, payouts:write
, payouts:approve
,
auto-payouts:read
, auto-payouts:write
,
profiles:read
, profiles:write
,
wallets:read
, wallets:write
,
exchange-rates:read
, exchange-rates:write
,
auto-conversions:read
, auto-conversions:write
,
auto-funding:read
, auto-funding:write
,
conversions:read
, conversions:write
,
account:read
, account:write
,
api-keys:read