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:
API endpoint for all requests in test environment is:
Deposit flow
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.
Customer sends some funds to this address.
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
You request to send amount of money to address.
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.
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.
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.
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.
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.
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.
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
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
Name | Type | Description |
---|---|---|
visible | boolean | Allows to get a list of currently enabled/disabled currencies |
Get list of exchangeable currency pairs
POST
https://app.cryptoprocessing.com/api/v2/currencies/pairs
Get list of currency exchange pairs.
Request Body
Name | Type | Description |
---|---|---|
currency_from | string | Filter by currency ISO that exchanges from, example: BTC |
currency_to | string | Filter by currency ISO that can be converted to, example: EUR |
Get list of currencies rates
POST
https://app.cryptoprocessing.com/api/v2/currencies/rates
Get a particular pair and its price.
Path Parameters
Name | Type | Description |
---|---|---|
currency_from | string | Filter by currency ISO that exchanges from, example: BTC |
currency_to | string | Filter by currency ISO that can be converted to, example: EUR |
Get list of balances
POST
https://app.cryptoprocessing.com/api/v2/accounts/list
Get list of all the balances (including zero balances).
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
Name | Type | Description |
---|---|---|
foreign_id | string | Your info for this address, will returned as reference in Address responses, example: user-id:2048. Must not contain personal data, such as the user's name or email address. |
end_user_reference | string | The persistent ID of the end user. Must not contain personal data, such as the user's name or email address. |
currency | string | ISO of currency to receive funds in, example: BTC |
convert_to | string | If you need auto exchange all incoming funds for example to EUR, specify this param as EUR or any other supported currency ISO, to see list of pairs see previous method. |
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.
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
Name | Type | Description |
---|---|---|
foreign_id | string | Unique foreign ID in your system, example: "122929". Must not contain personal data, such as the user's name or email address. |
end_user_reference | string | The persistent ID of the end user. Must not contain personal data, such as the user's name or email address. |
amount | numeric | Amount of funds to withdraw, example: "1" |
currency | string | Currency ISO to be withdrawn, example: "BTC" |
convert_to | string | If you want to auto convert for example EUR to BTC, specify this param as BTC or any other currency supported (see list of exchangeable pairs API method). |
address | string | Cryptocurrency address where you want to send funds. |
tag | string | If it’s XRP or BNB, both an address and a tag/memo are required to send cryptocurrency. If you send funds without a tag/memo or with an incorrect Tag/Memo, your funds may be lost (for more info go to FAQ). |
amount_to | numeric | Amount of funds to send in the transaction in the convert_to currency, for example: 0.01 |
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.
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
Name | Type | Description |
---|---|---|
receiver_amount | numeric | Amount you want to calculate for getting, example: "10". The parameter is required when the "sender_amount" parameter is absent |
sender_currency | string | Currency ISO for which you want to calculate the exchange rate, example: "BTC" |
receiver_currency | string | Currency ISO to be exchanged, example: "EUR" |
sender_amount | numeric | Amount you want to calculate, example: "3". The parameter is required when the "receiver_amount" parameter is absent |
Exchange on fixed exchange rate
POST
https://app.cryptoprocessing.com/api/v2/exchange/fixed
Make exchange on a given fixed exchange rate.
Request Body
Name | Type | Description |
---|---|---|
sender_currency | string | Currency ISO which you want to exchange, example: "LTC" |
receiver_currency | string | Currency ISO to be exchanged, example: "USD" |
sender_amount | numeric | Amount you want to exchange, example: "6.5". This parameter is required when the Please note: That this value shall be the same as the value specified in the exchange/calculate request |
foreign_id | string | Unique foreign ID in your system, example: "134453" |
price | numeric | Exchange rate price on which exchange will be placed, example: "89.75202000" |
receiver_amount | numeric | Amount you want to exchange, example: "6.5". This parameter is required when the |
Exchange regardless the exchange rate
POST
https://app.cryptoprocessing.com/api/v2/exchange/now
Make exchange without mentioning the price.
Request Body
Name | Type | Description |
---|---|---|
sender_currency | string | Currency ISO which you want to exchange, example: "EUR" |
receiver_currency | string | Currency ISO to be exchanged, example: "BTC" |
sender_amount | numeric | Amount you want to exchange, example: "2". This parameter is required when the |
foreign_id | string | Unique foreign ID in your system, example: "124876" |
receiver_amount | numeric | Amount you want to exchange, example: "2". This parameter is required when the |
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
Name | Type | Description |
---|---|---|
timer* | boolean | Time on the rate is fixed for invoice payment (15 minutes). During this time the user has to pay an invoice. |
title* | string | Invoice title that will be displayed to the user |
description | string | Invoice description that will be displayed to the user |
currency* | string | ISO invoice currency that you want to receive from the user, for example: “EUR” |
sender_currency | string | Currency of user invoice payment (3rd type invoice will be externalized at the time of sending this parameter with timer= true), example: “BTC“ |
amount* | numeric | Invoice amount that you want to receive from the user, example: “106.75“ |
foreign_id* | string | Unique foreign ID in your system, example: "164". Must not contain personal data, such as the user's name or email address. |
end_user_reference | string | The persistent ID of the end user. Must not contain personal data, such as the user's name or email address. |
url_success* | string | URL on which we redirect the user in case of a successful invoice payment, example: “https://merchant.name.com/url_success“ |
url_failed* | string | URL on which we redirect the user in case of an unsuccessful invoice payment, example: “https://merchant.name.com/url_failed“ |
email_user* | string | In case the payment amount does not match the amount stated above, we will send an email to the stated address with instructions on funds recovery. In case of underpayment, the whole amount will be refunded. In case of overpayment, user will be able to recover the difference by following the instructions |
type | string | There're a couple of sub-types of invoices: 1. Standard 2. With partial pay In order to create an invoice with partial pay a value of the "type" parameter shall be set to “good_until_expired“ For standard invoices, the value would be either “fill_or_kill“ or you can avoid using the "type" parameter at all. |
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.
Transaction statuses
Status | Meaning |
confirmed | Final. You are safe to process this transaction |
not_confirmed | Transaction is not yet confirmed. |
cancelled | Final. This transaction is a double spend or cancelled withdrawal. Pay attention to this transaction. |
pending | This status may occur only after enabling withdrawal limits. Transaction exceeds set withdrawal limit, you need to confirm or decline it via backoffice of your merchant account. |
"transaction_type" parameter values
Type | Description |
Blockchain | Type of transactions that are written into blockchain. Such transactions (deposits and withdrawals) can be tracked via according explorer for suitable blockchain. This is the most common type of transactions. |
Internal | Type of transactions between two addresses within our processing (between separate merchant accounts or different addresses of the single merchant). Such transactions are not written in blockchain, but still can be tracked via our internal explorer - https://explorer.coinspaid.com/ |
Exchange | Type of transactions that requires exchange between crypto-fiat or crypto-crypto pairs. |
Transitions
Transaction | Transition |
Successful deposit | not_confirmed -> confirmed |
Unsuccessful deposit | not_confirmed -> cancelled |
Successful withdrawal | confirmed |
Unsuccessful withdrawal | cancelled |
Last updated