Introduction
Merchant API
Payment Notification
API host
https://api.cryptosteroid.com
Welcome to the CryptoSteroid developer documentation. This guide describes the payment gateway and API reference.
Using this API, you can create and manage payment addresses, get real-time cryptocurrency price information, view merchant details, and more.
Developers may call the API directly over HTTPS using the language of their choice (Java, C#, PHP, JavaScript etc).
To start accept crypto payments and create a payment address you need to claim api key. Once you get an API key, you can create payment addresses of any available cryptocurrency.
The created payment addresses have no limit on the number of payments processed and also have no limit on the validity period. Therefore, you can link the payment address to a specific internal user or order on side of your application.
In blockchain with UTXO architecture (Bitcoin, BitcoinCash, Litecoin, etc.), the transaction hash and the output number in the transaction are considered as a unique payment identifier. For account-based blockchain (Ethereum, Tron), the unique payment identifier is considered the transaction hash.
For each generated payment address, you can request the current status and statistics, as well as a list of all events the address.
To receive notifications of new and confirmed payments to your addresses, when creating a payment address you must specify the URL address where your payment handler is located. To which we will send notifications when funds are received.
For security reason request to create a new address must contain the parameter secureToken
. This must be a unique string, it can be stored in the configuration file or database of your application and when you receive a payment notification as webhook, make sure that the data from the Token
header matches the local value, then process the incoming transaction.
When a new payment is detected or payment is completed, we will immediately send a payment notification to your server at the specified URL in the parameter callback
. You do not need to additionally verify the transaction. We consider the payment completed when the required number of confirmations in the blockchain is reached.
Currency | Confirmations |
---|---|
Bitcoin (BTC) | 3 |
Bitcoin Cash (BCH) | 6 |
Litecoin (LTC) | 6 |
Dogecoin (DOGE) | 6 |
Ethereum (ETH) | 35 |
Tron (TRX) | 20 |
Tether (USDT-ERC20) | 35 |
Tether (USDT-TRC20) | 20 |
Example cURL request
curl -X GET \
-H "Content-Type: application/json" \
-H "X-Api-Key: d45b954fd5f59f49f71b9d93735045ab4888a8d2293ffe3f0841c7d198d13572" \
--url "https://api.cryptosteroid.com/v1/currency/price"
Most API requests require authentication, send a valid access token of your merchant in the authorization header, using the API key authentication scheme. When you make a requests to our API servers, please use this token in authorization header X-Api-Key
, to retrieve data you requested.
The Authentication API is subject to rate limiting. The limits differ per endpoint. If you exceed the provided rate limit for a given endpoint, you will receive the 429 Too Many Requests
response.
Endpoints: 5 requests per second per IP address.
Mass Payments: 1 withdrawal request at a time.
API | URL |
---|---|
REST API | https://api.cryptosteroid.com |
All requests and responses are application/json
content type and follow typical HTTP response status codes for success and failure.
Unless otherwise stated, errors to bad requests respond with HTTP 4xx or status codes. The body also contains a message
parameter indicating the cause. Your language's http library should be configured to provide message bodies for non-2xx requests so that you can read the message field from the body.
A successful response is indicated by HTTP status code 200 or 201 and may contain an optional body. If the response has a body it is documented under each resource below. Response data is in the result
field.
Common Status Codes:
Code | Reason |
---|---|
200 | OK - Data extracted successfully. |
201 | Created - Object created successfully. |
400 | Bad Request - Invalid request format. |
401 | Unauthorized - Invalid API Key. |
403 | Forbidden - You do not have access to the requested resource. |
404 | Not Found - The requested resource is not found. |
500 | Internal Server Error - We had a problem with our server. |
Example response
{
"statusCode": 200,
"message": "OK",
"result": {
"percentProcessing": 2,
"percentWithdrawal": 0,
"list": [
{
"currency": "BTC",
"name": "Bitcoin",
"network": "mainnet"
"token": false
"decimal": 8
"processingAmount": 0
"minPaymentAmount": 0.000001
"payoutNetworkFee": 0.0002
},
{
"currency": "USDT",
"name": "Tether",
"network": "ERC20"
"token": true
"decimal": 6
"processingAmount": 5
"minPaymentAmount": 5.50
"payoutNetworkFee": 3.50
}
]
}
}
The service data API is associated with supported currencies, our service commission and other information. Limits, commissions and fees are updated periodically and are immediately displayed on this endpoint.
There is no need to request this method every second; the frequency of updating and saving data to the cache is no earlier than every 30 seconds.
To get the service data such as minimum payment amount or transaction fee, you need to make a GET
request to the following endpoint:
Field | Type | Description |
---|---|---|
percentProcessing | Number | Transaction processing percent fee for all cryptocurrency. |
percentWithdrawal | Number | Withdrawal commission percentage for all cryptocurrency. |
list | Array | List of currency objects with current data. |
Example response
{
"statusCode": 200,
"message": "OK",
"result": {
"amount": 1,
"price": {
"BTC": {
"USD": 27194.19885,
"EUR": 25333.804314,
"RUB": 2624919.908025
},
"ETH": {
"USD": 1629.683685,
"EUR": 1518.194663,
"RUB": 157305.209546
},
"USDT": {
"USD": 1.000125,
"EUR": 0.931705,
"RUB": 96.53706
}
}
}
}
The price service data API allows you to get live prices and convert the amount of cryptocurrency to local currency. Data provider is most popular exchanges, we are update and cache every 20 seconds.
To get the cryptocurrency live data, you need to make a GET
request to the following endpoint:
Parameter | Type | Description |
---|---|---|
amount | Float | optional Amount in cryptocurrency to convert in local price. |
Field | Type | Description |
---|---|---|
price | Object | Current cryptocurrency prices in local currency. |
Example response
{
"statusCode": 200,
"message": "OK",
"result": {
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"userId": "b642b4217b34b1e8d3bd915fc65c4451",
"createdAt": 1693859537,
"status": true,
"url": "https://cryptosteroid.com",
"name": "CryptoSteroid",
"wallets": []
"settings": {
"ApiKey": null,
"PayoutKey": true,
"EmailNotifyReceive": true
"EmailNotifyWithdraw": true
},
}
}
Information about the merchant, including current status.
To get the merchant details, you need to provide the merchant ID and make a GET
request to the following endpoint:
Parameter | Type | Description |
---|---|---|
id | String | required Merchant ID. |
Field | Type | Description |
---|---|---|
id | String | Merchant ID. |
userId | String | User associated with this merchant. |
createdAt | number | Timestamp when the merchant was created. |
status | Boolean | Merchant enabled or disabled. |
url | String | Merchant URL address. |
name | String | Name of merchant. |
settings | Object | Merchant settings. |
wallets | Array | List of merchant crypto wallets. |
A webhook is a HTTP POST message sent from our servers to the merchant’s e-commerce server with received transaction data.
Field | Meaning |
---|---|
type | Transaction type received . |
merchantId | Unique Merchant Id associated with the payment address in the format UUID4 . |
walletId | Unique Wallet Id associated with the payment address in the format UUID4 . |
createdAt | Timestamp when the payment was detected. Timezone UTC. |
confirmedAt | Timestamp when the payment is completed. Timezone UTC. null if the payment status is waiting. |
currency | Cryptocurrency in which the payment was received.BTC ,ETH ,TRX ,BCH ,LTC ,DOGE ,USDT . |
network | Cryptocurrency network.mainnet ,ERC20 ,TRC20 . |
gross | Amount received from buyer. |
fee | Transaction processing fee. |
net | Net amount after processing fee. |
address | The address where payment was received. |
tx | Transaction Id or hash, a unique string of characters given to every transaction. |
status | Once the payment is completed, it will set the payment status confirmed , otherwise it will be as waiting . |
identify | The data you provided to link a payment to a user or order. |
price | Price data object. Currency code with calculated payment amount value (ISO 4217 3-character currency code).USD ,EUR ,RUB . |
To secure your payment handler, the webhook will contain a header Token
. Please, before processing the payment of the received transaction, you need to make sure that the header data match the secureToken
specified when your generate the payment address. If you skip this check, it may affect to security of your application.
The webhook will be sent twice, when new payment is detected and when the payment is completed (the required number of confirmations has been reached).