API Documentation

Introduction

Merchant API

Payment Notification

Get started

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).

Payment Mechanism

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.

CurrencyConfirmations
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

Authentication

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.

Rate Limit

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.

Requests

APIURL
REST APIhttps://api.cryptosteroid.com

All requests and responses are application/json content type and follow typical HTTP response status codes for success and failure.

Errors

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.

Success

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:

CodeReason
200OK - Data extracted successfully.
201Created - Object created successfully.
400Bad Request - Invalid request format.
401Unauthorized - Invalid API Key.
403Forbidden - You do not have access to the requested resource.
404Not Found - The requested resource is not found.
500Internal Server Error - We had a problem with our server.

Get a list of currencies and commission

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:

GET /v1/currency/list

RESPONSE PARAMETERS

FieldTypeDescription
percentProcessingNumberTransaction processing percent fee for all cryptocurrency.
percentWithdrawalNumberWithdrawal commission percentage for all cryptocurrency.
listArrayList of currency objects with current data.
This API endpoint is public and does not require an authorization header.

Price and Converter

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:

GET /v1/currency/price

REQUEST PARAMETERS

ParameterTypeDescription
amountFloatoptional Amount in cryptocurrency to convert in local price.

RESPONSE PARAMETERS

FieldTypeDescription
priceObjectCurrent cryptocurrency prices in local currency.
This API endpoint is public and does not require an authorization header.

Merchant Details

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:

GET /v1/merchants/{id}

PATH PARAMETERS

ParameterTypeDescription
idStringrequired Merchant ID.

RESPONSE PARAMETERS

FieldTypeDescription
idStringMerchant ID.
userIdStringUser associated with this merchant.
createdAtnumberTimestamp when the merchant was created.
statusBooleanMerchant enabled or disabled.
urlStringMerchant URL address.
nameStringName of merchant.
settingsObjectMerchant settings.
walletsArrayList of merchant crypto wallets.
This API endpoint is private and requires an authorization header.

Webhook

A webhook is a HTTP POST message sent from our servers to the merchant’s e-commerce server with received transaction data.

FieldMeaning
typeTransaction type received.
merchantIdUnique Merchant Id associated with the payment address in the format UUID4.
walletIdUnique Wallet Id associated with the payment address in the format UUID4.
createdAtTimestamp when the payment was detected. Timezone UTC.
confirmedAtTimestamp when the payment is completed. Timezone UTC. null if the payment status is waiting.
currencyCryptocurrency in which the payment was received.BTC,ETH,TRX,BCH,LTC,DOGE,USDT.
networkCryptocurrency network.mainnet,ERC20,TRC20.
grossAmount received from buyer.
feeTransaction processing fee.
netNet amount after processing fee.
addressThe address where payment was received.
txTransaction Id or hash, a unique string of characters given to every transaction.
statusOnce the payment is completed, it will set the payment status confirmed, otherwise it will be as waiting.
identifyThe data you provided to link a payment to a user or order.
pricePrice 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).