API Reference

Documentation for API V2. Major update is addresses with exchange crypto to fiat and vice versa abilities.

General information

API endpoint for all requests in production environment is:

https://app.cryptoprocessing.com/api/v2

API endpoint for all requests in test environment is:

https://app.sandbox.cryptoprocessing.com/api/v2

Deposit flow

  1. You obtain new address from CoinsPaid API (for some currencies it may be address and tag) and store it somewhere on your side. After that you show this address to your customer in order to make a deposit.

  2. Customer sends some funds to this address.

  3. When transaction is sent by a customer - CoinsPaid sends a callback to your callback url with transaction details. It contains status, address, currency, amount and fees. If status is successful, you should deposit respective amount to customer balance on your side.

Withdrawal flow

  1. You request to send amount of money to address.

  2. Your request is validated on our side. If signature is correct, address is valid and you have enough balance - CoinsPaid responds you with the transaction object.

  3. You will receive a callback when transaction status is updated.

Please note that the final status and all calculations on your side shall be applied only after receiving a final callback from Cryptoprocessing's side, hence in case a connection disruption takes place and you do not see a transaction on your side, kindly wait for a final callback or check a transaction in the back-office.

Deposit with exchange flow

You don't want to touch or store cryptocurrency, but only use it as a payment method. Your customer deposits BTC, Coinspaid instantly converts it to EUR so that you would receive EUR on your CoinsPaid account.

  1. You obtain new address from CoinsPaid API same as in deposit flow, but additionally pass another parameter "convert_to" in your request specifying resulting currency.

  2. When new deposit is arriving, CoinsPaid converts all arriving funds to destination funds, and sends notifications as in regular deposit

Withdrawal with exchange flow

You wish to send Cryptocurrency from your Fiat currency balance. For example you want to send EUR amount but your customer receives money in BTC.

  1. You do exactly same as in withdrawals, but you specify 2 currencies. One is a currency of your sending balance and Second is a cryptocurrency your Customer wishes to receive.

  2. Your request is validated on our side. If signature is correct, address is valid and you have enough balance - CoinsPaid responds you with the transaction object.

  3. You will receive a callback when transaction status is updated.

Invoice flow

Invoices allow to conduct deposits with a fixed rate within a limited period of time disregarding the exchange rate fluctuations. In case it’s necessary to convert funds in fiat currency or convert it to another crypto currency this option will allow to visualize the exact amount of a sender’s currency required to receive the exact amount in a receiver’s currency. When a deposit is processed through this flow, a user is being redirected to the respective Invoice page via the preset link and just needs to follow instructions specified on it. It also allows to conduct refunds in case a user fails to manage to deposit within an established timeframe or discovers non-sufficient balance. All is required in that case is to follow the link with the respective instructions sent to an e-mail of a customer. Detailed information can be found here.

API Endpoints

Ping

GET https://app.cryptoprocessing.com/api/v2/ping

Test if API is up and running and your authorization is working

OK

Body must be a valid json object or array, example: {}

Get list of supported currencies

POST https://app.cryptoprocessing.com/api/v2/currencies/list

Get a list of all supported currencies

Request Body

{
  "data": [
    {
      "id": 1,
      "type": "crypto",
      "currency": "BTC",
      "minimum_amount": "0.001",
      "deposit_fee_percent": "0.99",
      "withdrawal_fee_percent": "0",
      "precision": 8
    }
  ]
}

Get list of exchangeable currency pairs

POST https://app.cryptoprocessing.com/api/v2/currencies/pairs

Get list of currency exchange pairs.

Please be advised that this endpoint is intended for reference purposes to obtain informational rates only. It shall not be used for exchange emulation in production or live environments.

Request Body

{
  "data": [
    {
      "currency_from": {
        "currency": "BTC",
        "type": "crypto",
        "min_amount": "0.00300000",
        "min_amount_deposit_with_exchange": "0.00010000"
      },
      "currency_to": {
        "currency": "EUR",
        "type": "fiat"
      },
      "rate_from": "1",
      "rate_to": "8795.80000000"
    },
    {
      "currency_from": {
        "currency": "EUR",
        "type": "fiat",
        "min_amount": "25.00000000"
      },
      "currency_to": {
        "currency": "BTC",
        "type": "crypto"
      },
      "rate_from": "1",
      "rate_to": "8885.72951839"
    },
    {
      "currency_from": {
        "currency": "BCH",
        "type": "crypto",
        "min_amount": "0.00020000",
        "min_amount_deposit_with_exchange": "0.00100000"
      },
      "currency_to": {
        "currency": "USD",
        "type": "fiat"
      },
      "rate_from": "1",
      "rate_to": "332.28264751"
    },
    {
      "currency_from": {
        "currency": "USD",
        "type": "fiat",
        "min_amount": "30.00000000"
      },
      "currency_to": {
        "currency": "BCH",
        "type": "crypto"
      },
      "rate_from": "1",
      "rate_to": "335.94361522"
    }
  ]
}

Get list of currencies rates

POST https://app.cryptoprocessing.com/api/v2/currencies/rates

Get a particular pair and its price.

Please be advised that this endpoint is intended for reference purposes to obtain informational rates only. It shall not be used for exchange emulation in production or live environments.

Path Parameters

{
    "data": [
        {
            "currency_from": {
                "currency": "BTC",
                "type": "crypto",
                "min_amount": "0.00010000",
                "min_amount_deposit_with_exchange": "0.00010000"
            },
            "currency_to": {
                "currency": "EUR",
                "type": "fiat"
            },
            "rate_from": "1",
            "rate_to": "48715.61680000"
        }
    ]
}

Get list of balances

POST https://app.cryptoprocessing.com/api/v2/accounts/list

Get list of all the balances (including zero balances).

{
    "data": [
        {
            "currency": "DOGE",
            "type": "crypto",
            "balance": "13234.91276375"
        },
        {    
            "currency": "ADA",
            "type": "crypto",
            "balance": "7272.36400468"
        },
        {
            "currency": "EUR",
            "type": "fiat",
            "balance": "5973.97568920"
        },
        {
            "currency": "USDT",
            "type": "crypto",
            "balance": "0.00000000"
        }
    ]
}

Receive cryptocurrency

POST https://app.cryptoprocessing.com/api/v2/addresses/take

Take address for depositing crypto and (it depends on specified params) exchange from crypto to fiat on-the-fly.

Request Body

User identifier provided within the end_user_reference parameter will be used for aggregating and analysing the operations and activities performed by certain user. Please ensure to provide the correct unique id of the appropriate users within this parameter. Providing wrong data may lead to unexpected transactions delays or their blocking.

Please make sure your user id does not contain personal data.

{
  "data": {
    "id": 1,
    "currency": "BTC",
    "convert_to": "EUR",
    "address": "12983h13ro1hrt24it432t",
    "tag": tag-123,
    "foreign_id": "user-id:2048",
    "end_user_reference": "12345"
  }
}

Business logic for using cryptocurrency as a deposit method: You are willing to let your customer fund his EUR balance on your platform or website. You will have to generate an address in the desired cryptocurrency and specify EUR as a "convert_to" currency. This will allow you to let your Customer pay if his favorite currency and fund his balance in EUR. At the same time you will see respective EUR amount in your CoinsPaid merchant account. Hint: you don't have to generate new address for this customer anymore, address can be reused unlimited amount of times.

  • Make sure to use Bitcoin URI format bitcoin: in QR. Works the same way as "mailto:".

  • We do recommend making this QR clickable as customers may have a wallet set up on their computer or mobile phone.

  • We recommend specifying the approximate current exchange rate.

Withdraw cryptocurrency

POST https://app.cryptoprocessing.com/api/v2/withdrawal/crypto

Withdraw in crypto to any specified address. You can send Cryptocurrency from your Fiat currency balance by using "convert_to" parameter.

Request Body

User identifier provided within the end_user_reference parameter will be used for aggregating and analysing the operations and activities performed by certain user. Please ensure to provide the correct unique id of the appropriate users within this parameter. Providing wrong data may lead to unexpected transactions delays or their blocking.

Please make sure your user id does not contain personal data.

{
  "data": {
    "id": 1,
    "foreign_id": "122929",
    "end_user_reference": "12345",
    "type": "withdrawal",
    "status": "processing",
    "amount": "0.01000000",
    "sender_amount": "0.01000000",
    "sender_currency": "ETH",
    "receiver_amount": "0.01000000",
    "receiver_currency": "ETH"
  }
}

Calculate exchange rates

POST https://app.cryptoprocessing.com/api/v2/exchange/calculate

Get info about exchange rates. Please note, this endpoint has limitation up to 30 requests per minute from one IP address, in case this amount is exceeded a new successful response can only be obtained after one minute break.

Request Body

{
  "data": {
    "sender_amount": 1,
    "sender_currency": "BTC",
    "receiver_amount": "8549.81680000",
    "receiver_currency": "EUR",
    "fee_amount": "85.49816800",    
    "fee_currency": "BTC",
    "price": "8549.81680000",
    "ts_fixed": 1564293159,
    "ts_release": 1564293219,
    "fix_period": 60
  }
}

Exchange on fixed exchange rate

POST https://app.cryptoprocessing.com/api/v2/exchange/fixed

Make exchange on a given fixed exchange rate.

Request Body

{
  "data": {
     "id": 2687667,
     "foreign_id": "knwi24op9",
     "type": "exchange",
     "sender_amount": "0.01",
     "sender_currency": "BTC",
     "receiver_amount": "63.52069015",
     "receiver_currency": "EUR",
     "fee_amount": "6.98727592",
     "fee_currency": "EUR",
     "price": "6352.06901520",
     "status": "processing"
    }
}

Exchange regardless the exchange rate

POST https://app.cryptoprocessing.com/api/v2/exchange/now

Make exchange without mentioning the price.

Request Body

{
  "data": {
     "id": 2687669,
     "foreign_id": "wph27bmsp81",
     "type": "exchange",
     "sender_amount": "0.001",
     "sender_currency": "BTC",
     "receiver_amount": "6.33984642",
     "receiver_currency": "EUR",
     "fee_amount": "0.69738311",
     "fee_currency": "EUR",
     "price": "6339.84642127",
     "status": "processing"
    }
}

Create Invoice

POST https://app.cryptoprocessing.com/api/v2/invoices/create

Create invoice for the client for a specified amount.

Make sure that the URLs that you provide in the url_success and url_failed fields use the secure HTTPS protocol, use domain names (not IP addresses) and are considered clean by VirusTotal and similar scanners.

Request Body

User identifier provided within the end_user_reference parameter will be used for aggregating and analysing the operations and activities performed by certain user. Please ensure to provide the correct unique id of the appropriate users within this parameter. Providing wrong data may lead to unexpected transactions delays or their blocking.

Please make sure your user id does not contain personal data.

{
   "data":{
      "id":79,
      "url":"https://app.coinspaid.com/invoice/RB9NZv",
      "foreign_id":164,
      "end_user_reference": "12345",
      "name":"TEST NAME",
      "status":"created",
      "currency":"EUR",
      "amount":"106.75",
      "sender_currency":"BTC",
      "sender_amount":null,
      "fixed_at":1581929889,
      "release_at":1581930789
   }
}

Transaction statuses

"transaction_type" parameter values

Transitions

Last updated