Download OpenAPI specification:Download
It is designed with the intent to allow you to integrate multiple coin payments in your service with the least effort possible.
There are no sign-ups, lengthy implementations or API keys required, it is as easy as a simple CURL request to create a new payment address.
The only thing required is that you implement the logic on your server to handle the callbacks
sent to your server when the transaction from the client is confirmed.
These endpoints provide a convenient way to generate unique payment addresses for every transaction. By using these endpoints, you can easily keep track of and manage your payments in a more efficient manner.
This method is used to generate a new address to give your clients, where they can send payments.
Please make sure when sending a transaction you consult the minimum transfer value for the crypto/token you wish to use. If the value you send is bellow our minimums, CryptAPI will ignore the transaction.
Before delving into the documentation, why not check if the libraries already have the functionality you need? It could save you time and effort in the long run!
Notice: The length of this request can't surpass the 8192
characters!
ticker required | string The ticker parameter in this CryptAPI request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, token, and its blockchain.
For instance, the ticker for Bitcoin is Notes:
Example: btc |
callback required | string The URL where the callbacks will be sent to. Must be a valid URL. Notes:
|
address required | string Address(es) where the payment will be forwarded to. If using multiple addresses (you may use up to Addresses must be valid for the ticker you are using. Otherwise, the API will reject the payment. For example, if you try to use a Bitcoin address while requesting a USDT TRC-20 address, the API will throw an error. Notes:
Example: address=bc1qhfn0lw2kdu6umgf08x54y0ha7wclsj3g5sp6t3 |
pending | integer Default: 0 Set the parameter to pending=1 to enable this feature. When enabled you will be notified of pending transactions (were sent by the customer but not yet confirmed by the blockchain).
Notes:
Example: pending=1 |
confirmations | integer Default: 1 To determine the number of blockchain confirmations required before receiving the confirmed callback, you need to specify the desired value. Min: 1
Example: confirmations=3 |
string E-mail address to receive payment notifications Notes:
Example: email=info@cryptapi.io | |
post | |
json | |
priority | string Default: "default" Provides you with the ability to specify for forwarding funds to the designated address .
It determines the level of fees paid to the blockchain network and can impact the speed at which the transaction is confirmed.
Notes:
Example: priority=fast |
multi_token | integer Default: 0 This feature allows customers to make payments using any token supported by the CryptAPI, even if the token differs from the one initially specified by the user. However, it is important to ensure that your Wallet supports the tokens you expect customers to pay with, and that your system can handle price conversions. For instance, if a customer wants to receive 1000 USDT (or its equivalent), but a client sends 1000 TRX, your system should be able to handle this scenario. Notes:
Example: multi_token=1 |
convert | integer Default: 0 When enabled, returns the converted value converted to FIAT in the callback, with the parameters value_coin_convert
and value_forwared_coin_convert .
Notes:
Example: convert=1 |
Address was created
Error creating address
{- "address_in": "14PqCsA7KMgseZMPwg6mJy754MtQkrgszu",
- "address_out": "1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP (single address)\n\n{1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP: 0.70, 1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3: 0.30} (multiple addresses)\n",
- "priority": "default",
- "status": "success"
}
ticker required | string The ticker parameter in this CryptAPI request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, token, and its blockchain.
For instance, the ticker for Bitcoin is Notes:
Example: btc |
List of payments sent to this callback.
address_in | string Generated address for the callback URL provided. |
address_out | string Your address(es), where the payment will be forwarded to, should be the same address(es) you provided. Notes:
|
callback_url | string The callback URL you provided. |
status | string Status of the request. Should be `success` if the request didn't fail. |
notify_pending | boolean Shows if you enabled the pending callback when creating the address. |
notify_confirmations | integer Number of confirmations required before sending the confirmed callback. |
priority | string The confirmation priority you requested. |
Array of objects (log_items) List of payments made to this address, together with the logs of the callbacks to your system. |
Your request couldn't be processed, please try again later
No request or no payment callbacks found
{- "address_in": "14PqCsA7KMgseZMPwg6mJy754MtQkrgszu",
- "address_out": "1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP",
- "callback_url": "example.com/invoice/1234?payment_id=5678",
- "status": "success",
- "notify_pending": true,
- "notify_confirmations": 1,
- "priority": "default",
- "callbacks": [
- {
- "txid_in": "33f11611f863d7475eb10daada2f225f0877561cf58cdfff175e99635dfd9120",
- "txid_out": "5ea53d5e728bfdb56b54c0b945990b69ae1e66cec56ab24679c9a622c4695276",
- "value_coin": 0.1,
- "value_forwarded_coin": 0.1,
- "confirmations": 13,
- "last_update": "14/10/2022 12:47:18",
- "result": "done",
- "fee_percent": 1,
- "fee_coin": 0.02,
- "prices": 55.59,
- "logs": [
- {
- "responses": "*ok*",
- "response_status": "200",
- "next_try": "14/10/2022 12:47:18",
- "pending": false,
- "confirmed": true
}
]
}
]
}
Endpoint that provides information regarding CryptAPI Service (e.g supported blockchains, cryptocurrencies and tokens).
Info fetched successfully.
object | |
object |
{- "btc": {
- "coin": "Bitcoin",
- "ticker": "btc",
- "minimum_transaction_coin": "0.00008000",
- "minimum_fee_coin": "0.00000546",
- "fee_percent": "1.00",
- "network_fee_estimation": "0.006548837643539048",
- "prices": "{'DKK': '56281.94', 'CAD': '10985.14', 'AED': '30517.01', 'BRL': '34243.36', 'USD': '8308.47', 'MXN': '160193.26', 'CNY': '58740.88', 'INR': '591471.72', 'JPY': '899719.16', 'HKD': '65173.93', 'GBP': '6616.08', 'EUR': '7535.35'}",
- "prices_updated": "2019-10-14T13:00:09.585Z"
}, - "trc20": {
- "usdt": {
- "coin": "USDT",
- "ticker": "usdt",
- "minimum_transaction_coin": "3.00000000",
- "minimum_fee_coin": "0.00000546",
- "fee_percent": "1.00",
- "network_fee_estimation": "31.89800000",
- "prices": "{'DKK': '56281.94', 'CAD': '10985.14', 'AED': '30517.01', 'BRL': '34243.36', 'USD': '8308.47', 'MXN': '160193.26', 'CNY': '58740.88', 'INR': '591471.72', 'JPY': '899719.16', 'HKD': '65173.93', 'GBP': '6616.08', 'EUR': '7535.35'}",
- "prices_updated": "2019-10-14T13:00:09.585Z"
}
}
}
This endpoint is used to fetch information of the cryptocurrency/token you provided in the ticker
parameter.
ticker required | string The ticker parameter in this CryptAPI request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, token, and its blockchain.
For instance, the ticker for Bitcoin is Notes:
Example: btc |
Info fetched successfully.
Error fetching info.
{- "coin": "Bitcoin",
- "fee_percent": "1.00",
- "prices_updated": "2019-10-14T13:00:09.585Z",
- "status": "success",
- "prices": "{'DKK': '56281.94', 'CAD': '10985.14', 'AED': '30517.01', 'BRL': '34243.36', 'USD': '8308.47', 'MXN': '160193.26', 'CNY': '58740.88', 'INR': '591471.72', 'JPY': '899719.16', 'HKD': '65173.93', 'GBP': '6616.08', 'EUR': '7535.35'}"
}
This method generates a base64-encoded QR Code image for payments.
ticker required | string The ticker parameter in this CryptAPI request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, token, and its blockchain.
For instance, the ticker for Bitcoin is Notes:
Example: btc |
address required | string The payment address ( address_in from our system).
|
value | integer Value to request the user. Not mandatory and can be left empty. Notes:
|
size | integer Default: 512 Size of the QR Code image in pixels. Min: 64 Max: 1024
Example: size=300 |
The QR Code.
{- "status": "success",
- "qr_code": "...",
- "payment_uri": "..."
}
Notes:
ticker required | string The ticker parameter in this CryptAPI request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, token, and its blockchain.
For instance, the ticker for Bitcoin is Notes:
Example: btc |
addresses | integer Default: 1 The number of addresses to forward the funds to. Should be the same you set in the address parameter.
Notes:
Example: addresses=3 |
priority | string Default: "default" This parameter enables you to specify the priority for forwarding funds to the given address. It determines the level of fees paid to the blockchain network and can impact the speed of transaction confirmation. It's important to note that the priority value varies depending on the currency/network. Notes:
Example: priority=fast |
Estimated cost.
status | string Status of the request. |
estimated_cost | integer Estimated transaction cost in the blockchain’s native cryptocurrency. Notes:
|
estimated_cost_currency | object Object with the estimated cost in various FIAT currencies. Keys are the names of the currencies, values are the estimated costs. |
Your request couldn't be processed, please try again later
{- "status": "success",
- "estimated_cost": "0.00001",
- "estimated_cost_currency": "{'USD': '0.09', 'EUR': '0.08', 'GBP': '0.07', 'CAD': '0.11', 'JPY': '10.21', 'AED': '0.33', 'DKK': '0.58', 'BRL': '0.46', 'CNY': '0.56', 'HKD': '0.69', 'INR': '6.67', 'MXN': '1.81', 'UGX': '310.74', 'PLN': '0.35', 'PHP': '4.56', 'CZK': '1.91', 'HUF': '27.95', 'BGN': '0.15', 'RON': '0.39', 'LKR': '18.02'}"
}
This method allows for seamless conversion of prices between FIAT currencies and cryptocurrencies, as well as between different cryptocurrencies. Note:
ticker required | string The ticker parameter in this CryptAPI request refers to the unique identifier of the cryptocurrency to which you are making the request. It is included in the URL of the request and helps to specify the exact cryptocurrency that you want to retrieve data for. The ticker is typically a short code that uniquely identifies the cryptocurrency, token, and its blockchain.
For instance, the ticker for Bitcoin is Notes:
Example: btc |
value required | number The value that you intend to convert, using the cryptocurrency or token associated with the ticker you are utilizing. Example: value=10 |
from required | string Specify the type of currency you wish to convert, whether it is a FIATs currency or a cryptocurrency. For a complete list of the cryptocurrencies we support, please refer to our cryptocurrencies page. In case your desired FIAT currency is not included in the list of supported currencies, please don't hesitate to reach out to us so that we can add it to our service:
Example: from=usd |
{- "value_coin": "0.01",
- "exchange_rate": "47000",
- "status": "success"
}
These callbacks are dispatched by our API to your platform when a user sends a payment to the address generated by our system.
Your platform should be ready to handle these callbacks which are requests made to the URL provided in the callback
parameter.
Each callback is sent with an additional header, x-ca-signature
.
This is a base64-encoded 1024-bit RSA-SHA256 signature of the callback.
The specific data signed depends on the type of callback you're receiving.
For callbacks sent via GET, the entire request URL to your system (including all GET parameters) is signed.
If the callback is sent via POST, then the entire body of the request is signed.
The Public Key
for verification can be retrieved from this this endpoint.
Check our knowledge base to learn how to verify the callback with code samples.
CryptAPI will stop sending callbacks under one of these two circumstances:
*ok*
message or an HTTP 200 status code, indicating that the callback has been successfully received and processed.Every time funds are received in a generated address, callbacks are sent. If you are experiencing difficulties receiving our callbacks, it could be attributed to the following reasons:
callback
parameter may not be accessible online. It is essential to ensure that the URL is reachable and functional.Note: To avoid any issues with the callbacks, we strongly recommend whitelisting our server IPs. The IPs that should be whitelisted are: 145.239.119.223
and 135.125.112.47
Callback issued when a client's transaction is pending confirmation.
Notes:
post
parameter is set to 1
, when creating a new address.POST
if post=1
parameter set, else sent via GET
.uuid | string This is an unique identifier to each payment your clients have made, so you can easily track any duplicate callbacks sent, in the case our system doesn't mark the callback as successful Example: uuid=dbfcb40e-5a6b-4305-9fa2-b0fbda6e3ff2 |
address_in | string Address generated by CryptAPI, where your customer sent the payment. Example: address_in=14PqCsA7KMgseZMPwg6mJy754MtQkrgszu |
address_out | string Address(es) where CryptAPI forwarded the payment. Example: address_out=1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP (single address)<br/>
{1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP: 0.70, 1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3: 0.30} (multiple addresses)
|
txid_in | string Transaction hash of your customer's payment. Example: txid_in=a2174ffd39289100709f2a07b129cdbba69df2e22e5be1830221dab1fd4e332c |
confirmations | integer Number of confirmations of the current transaction. Example: confirmations=1 |
value_coin | number This is the payment amount sent by your customer prior to deducting any fees. Note:
Example: value_coin=0.05 |
value_coin_convert | string Converted value to various FIAT currencies of the value_coin .
Notes:
Example: value_coin_convert={"USD": "3.20", "EUR": "3.05", "GBP": "2.62", "CAD": "4.16", "JPY": "431.90", "AED": "11.77", "DKK": "22.67", "BRL": "16.52", "CNY": "21.43", "HKD": "25.16", "INR": "249.97", "MXN": "64.95", "UGX": "11975.46", "PLN": "14.25", "PHP": "173.14", "CZK": "75.37", "HUF": "1220.10", "BGN": "5.94", "RON": "15.02", "LKR": "1153.30", "TRY": "55.54", "ZAR": "51.36", "RUB": "181.24"} |
coin | string Ticker of the coin used for the payment: ['btc', 'bch', 'ltc'', 'eth', 'trx'] For ERC-20 (ETH) Tokens, this parameter will be For TRC-20 (Tron) Tokens, this parameter will be For BEP-20 (BSC) Tokens, this parameter will be For Polygon Tokens, this parameter will be Example: coin=btc |
price | number Coin price in USD at the time of the callback. Example: price=55.59 |
pending | integer Being the pending callback, this value should be 1 .
Example: pending=1 |
Expected response from your server.
*ok*
Callback issued when a client's transaction has been confirmed by the network.
uuid | string This is an unique identifier to each payment your clients have made, so you can easily track any duplicate callbacks sent, in the case our system doesn't mark the callback as successful. Example: uuid=dbfcb40e-5a6b-4305-9fa2-b0fbda6e3ff2 |
address_in | string Address generated by CryptAPI, where your customer sent the payment. Example: address_in=14PqCsA7KMgseZMPwg6mJy754MtQkrgszu |
address_out | string Address(es) where CryptAPI forwarded the payment. Example: address_out=1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP (single address)<br/>
{1H6ZZpRmMnrw8ytepV3BYwMjYYnEkWDqVP: 0.70, 1PE5U4temq1rFzseHHGE2L8smwHCyRbkx3: 0.30} (multiple addresses)
|
txid_in | string Transaction hash of your customer's payment. Example: txid_in=a2174ffd39289100709f2a07b129cdbba69df2e22e5be1830221dab1fd4e332c |
txid_out | string Transaction hash of the payment forwarded to your address(es) by CryptAPI. Example: txid_out=a2174ffd39289100709f2a07b129cdbba69df2e22e5be1830221dab1fd4e332c |
confirmations | integer Number of blockchain confirmations of the current transaction. Notes:
Example: confirmations=1 |
value_coin | number This is the payment amount sent by your customer prior to deducting any fees. Note:
Example: value_coin=0.05 |
value_coin_convert | string Converted value to various FIAT currencies of the value_coin .
Notes:
Example: value_coin_convert={"USD": "3.20", "EUR": "3.05", "GBP": "2.62", "CAD": "4.16", "JPY": "431.90", "AED": "11.77", "DKK": "22.67", "BRL": "16.52", "CNY": "21.43", "HKD": "25.16", "INR": "249.97", "MXN": "64.95", "UGX": "11975.46", "PLN": "14.25", "PHP": "173.14", "CZK": "75.37", "HUF": "1220.10", "BGN": "5.94", "RON": "15.02", "LKR": "1153.30", "TRY": "55.54", "ZAR": "51.36", "RUB": "181.24"} |
value_forwarded_coin | number Value forwarded to you, after fees deducted. Example: value_forwarded_coin=0.05 |
value_forwarded_coin_convert | string Converted value to various FIAT currencies of the value_forwarded_coin .
Notes:
Example: value_forwarded_coin_convert={"USD": "3.17", "EUR": "3.01", "GBP": "2.59", "CAD": "4.12", "JPY": "427.16", "AED": "11.64", "DKK": "22.41", "BRL": "16.33", "CNY": "21.20", "HKD": "24.88", "INR": "247.19", "MXN": "64.25", "UGX": "11855.29", "PLN": "14.08", "PHP": "171.25", "CZK": "74.50", "HUF": "1206.19", "BGN": "5.88", "RON": "14.86", "LKR": "1140.51", "TRY": "54.93", "ZAR": "50.82", "RUB": "179.22"} |
fee_coin | |
coin | string Ticker of the coin used for the payment: ['btc', 'bch', 'ltc'', 'eth', 'trx'] For ERC-20 (ETH) Tokens, this parameter will be For TRC-20 (Tron) Tokens, this parameter will be For BEP-20 (BSC) Tokens, this parameter will be For Polygon Tokens, this parameter will be Example: coin=btc |
price | number Coin price in USD at the time of the callback. Example: price=55.59 |
pending | integer Being the confirmed callback, this value should be 0 .
Payment was confirmed by the blockchain. Example: pending=0 |
Expected response from your server.
The callback will be marked as successful when it receives the following response from your server.
*ok*