Skip to main content

API reference

Updated over 4 months ago

Check status

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

Test if API is up and running and your authorisation is working.

Responses

200:

OK


Get the list of balances

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

Get a list of your balances for each cryptocurrency, including zero balances.

Responses

200:

{
"data": [
{
"currency": "BTC",
"type": "crypto",
"balance": 0
}
]
}


Get the list of currencies

GET https://app.lt.cryptoprocessing.com/api/v2/currencies/list

Returns a list of either supported or unsupported currencies.

Parameters

Parameter

Type

Description

visible

boolean

Whether the endpoint should return supported (true) or unsupported (false) currencies.

Sample request

POST /api/v2/currencies/list HTTP/1.1
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 16

{
"visible": true
}

Responses

200:

{
"data": [
{
"id": 1,
"type": "crypto",
"currency": "BTC",
"minimum_amount": "0.00010000",
"deposit_fee_percent": "0.000000",
"withdrawal_fee_percent": "0.025000",
"precision": 8
}
]
}


Get the list of currency pairs

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

Get a list of available currency exchange pairs. Note that this endpoint only provides exchange pairs as a reference. It should not be used for exchanges in live environments.

Parameters

Parameter

Type

Description

currency_from

string

Currency to exchange from.

currency_to

string

Currency to exchange to.

Sample request

POST /api/v2/currencies/pairs
HTTP/1.1
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 43

{
"currency_from": "BTC",
"currency_to": "BTC"
}

Responses

200:

{
"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": "20693.84879354"
}
]
}


Get the list of currency rates

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

Get a particular pair and its price. Note that this endpoint only provides rate estimates as a reference. It should not be used for exchanges in live environments.

Parameters

Parameter

Type

Description

currency_from

string

Currency to exchange from.

currency_to

string

Currency to exchange to.

Sample request

POST /api/v2/currencies/pairs
HTTP/1.1
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 43

{
"currency_from": "BTC",
"currency_to": "BTC"
}

Responses

200:

{
"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": "20693.84879354"
}
]
}


Create a crypto address

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

Create a crypto deposit address you can share with clients. Optionally, you can automatically convert all deposits you receive to a currency of your choice.

If you're receiving or converting to XRP, you need to provide your tag. If you don't provide a tag, your deposit will be lost. For more details, see What is a destination tag or memo?.

User identifier provided within the end_user_reference parameter will be used for aggregating and analysing the operations and activities performed by certain user. Make sure 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.

If you want to automatically convert all deposits to a currency of your (or your customer's) choice, specify its ISO code in the convert_to parameter.

Parameters

Parameter

Type

Description

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 (required)

string

Currency you want to receive money in.

tag

string

If you want to receive or convert to XRP, you need to specify your tag. If you don't, you risk losing the deposit. If you're working with any other currencies, you don't need to specify this parameter.

foreign_id (required)

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.

convert_to

string

If you need to automatically convert all deposits to a certain currency, specify its ISO here. For the list of all available currencies, see Supported cryptocurrencies and Supported fiat currencies.

sender_type

enum

​(natural or legal)

Whether the sender is a natural person (natural) or a legal entity (legal).

sender_data

object

If the sender is a natural person, include their first_name, last_name, date_of_birth and email. If the sender is a legal entity, include the legal_name, country_of_registration and email.

first_name

string

(Only for natural persons) The sender's first name.

last_name

string

(Only for natural persons) The sender's last name.

date_of_birth

string

(Only for natural persons) The sender's date of birth.

email

string

(For both natural persons and legal entities) The sender's email.

legal_name

string

(Only for legal entities) The company's name.

country_of_registration

string

(Only for legal entities) The company's country of registration.

Sample request

POST /api/v2/addresses/take HTTP/1.1
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 65

{
"currency": "string",
"convert_to": "string",
"foreign_id": "string"
}

Sample request (with sender data)

{
"timer": false,
"currency":"BTC",
"title": "1 month subscription",
"type":"good_until_expired",
"amount": "0.002",
"foreign_id": "s76d575a6dsf12d25a1ds324fs",
"url_success": "https://merchant.name.com/url_success",
"url_failed": "https://merchant.name.com/url_success",
"email_user": "[email protected]",
"end_user_reference":"123124",
“sender_type”: "natural",
"sender_data":{
"first_name":"string",
"last_name":"string",
"date_of_birth":"string"
}
}

Responses

200:

{
"data": {
"id": 23553829,
"currency": "BTC",
"address": "2NFZ9SmEm3mQ7jqVF4vPXBwCyn9KpmEwkTj",
"tag": "string",
"foreign_id": "postman_auto_test_new_BTC_address",
"end_user_reference": "postman_auto_test_user"
}
}


Withdraw crypto

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

Withdraw in crypto to any specified address. You can send cryptocurrency from your fiat currency balance by using the convert_to parameter.

Parameters

Parameter

Type

Description

currency (required)

string

Currency ISO to be withdrawn. For the list of all available currencies, see Supported cryptocurrencies and Supported fiat currencies.

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 (required)

string

Cryptocurrency address where you want to send funds.

tag

string

If it's XRP, the Tag/Memo field may be an essential part of addressing a wallet. Always specify the Tag that was provided to you by the recipient. If you send funds with missing or incorrect Tag/Memo field, the funds may be lost.

amount

number

Amount of funds to withdraw.

amount_to

number

Amount of funds to send in the transaction in the convert_to currency.

foreign_id (required)

string

Unique foreign ID in your system. 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.

receiver_type

enum

(natural, legal or self)

Whether the recipient is a natural person (natural) or a legal entity (legal). If you are transferring money to yourself (as a natural person or a legal entity), use self.

sender_type

enum

(natural or legal)

Whether the sender is a natural person (natural) or a legal entity (legal).

receiver_data or sender_data (for a legal entity)

object

If either the sender or the recipient is a legal entity, include these parameters in the corresponding object.

legal_name

string

The company's name.

country_of_registration

string

The company's country of registration.

email

string

The company's email.

receiver_data or sender_data (for a natural person)

object

If either the sender or the recipient is a natural person, include these parameters in the corresponding object.

first_name

string

The person's first name.

last_name

string

The person's last name.

date_of_birth

string

The person's date of birth.

email

string

The person's email.

Sample request

POST /api/v2/withdrawal/crypto HTTP/1.1
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 154

{
"currency": "string",
"convert_to": "string",
"address": "string",
"tag": "string",
"amount": 0,
"amount_to": 0,
"foreign_id": "string",
"end_user_reference": "string"
}

Sample request (the sender is a natural person, the recipient is a legal entity)

{
"receiver_type": "legal",
"sender_type": "natural",
"end_user_reference": "string",
"sender_data": {
"first_name": "string",
"last_name": "string",
"email": "string",
"date_of_birth": "string"
},
"receiver_data": {
"legal_name": "string",
"country_of_registration": "string"
}
}

Responses

200:

{
"data": {
"id": 678388,
"foreign_id": "postman_auto_test_1665492104773",
"type": "withdrawal_exchange",
"status": "processing",
"amount": "25.00000000",
"sender_amount": "25.00000000",
"sender_currency": "EUR",
"receiver_currency": "BTC"
}
}


Calculate the exchange rate

Get info about exchange rates. 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.

Parameters

Parameter

Type

Description

sender_currency

string

Currency to exchange from. For a list of all available currencies, see Supported currencies.

receiver_currency

string

Currency to exchange to. For a list of all available currencies, see Supported currencies.

sender_amount

number

Amount you want to calculate. The parameter is required when the receiver_amount parameter is absent

receiver_amount

number

Amount you want to calculate for getting. The parameter is required when the sender_amount parameter is absent.

Sample request

POST /api/v2/exchange/calculate HTTP/1.1
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 109

{
"sender_currency": "BTC",
"receiver_currency": "BTC",
"sender_amount": 0,
"receiver_amount": 0,
"price_precision": 8
}

Response

{
"data": {
"sender_currency": "EUR",
"sender_amount": "25.00000000",
"receiver_currency": "BTC",
"receiver_amount": "0.00123001",
"fee_currency": "CPD",
"fee_amount": "0.17266485",
"price": "0.00004920",
"ts_fixed": 1665008630,
"ts_release": 1665008690,
"fix_period": 60
}
}


Exchange on a fixed rate

Make the exchange at a given fixed exchange rate.

Parameters

Parameter

Type

Description

currency_from

string

Currency to exchange from. For a list of all available currencies, see Supported currencies.

receiver_currency

string

Currency to exchange to. For a list of all available currencies, see Supported currencies.

sender_amount

number

Amount you want to exchange.

receiver_amount

number

Amount you want to exchange to.

foreign_id (required)

string

Unique foreign ID in your system.

price (required)

number

Exchange rate price at which the exchange will be placed.

Sample request

POST /api/v2/exchange/fixed HTTP/1.1
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 121

{
"sender_currency": "BTC",
"receiver_currency": "BTC",
"sender_amount": 0,
"receiver_amount": 0,
"foreign_id": "string",
"price": 0
}

Response

{
"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 of the rate

Make the exchange regardless of the rate.

Parameters

Parameter

Type

Description

sender_currency

string

Currency to exchange from. For a list of all available currencies, see Supported currencies.

receiver_currency

string

Currency to exchange to. For a list of all available currencies, see Supported currencies.

sender_amount

number

Amount you want to exchange. This parameter is required when the receiver_amount parameter is absent.

receiver_amount

number

Amount you want to exchange. This parameter is required when the sender_amount parameter is absent.

foreign_id (required)

string

Unique foreign ID in your system.

Sample request

POST /api/v2/exchange/now HTTP/1.1 
Host: app.lt.cryptoprocessing.com
X-Processing-Key: text
X-Processing-Signature: text
Content-Type: application/json
Accept: */*
Content-Length: 111

{
"sender_currency": "BTC",
"receiver_currency": "BTC",
"sender_amount": 0,
"receiver_amount": 0,
"foreign_id": "string"
}


Create an invoice

Create an 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.


Parameters

Parameter

Type

Description

type

string

Possible values: fill_or_kill, good_until_expired

For partial pay invoices, set this parameter to good_until_expired. For standard invoices, use fill_or_kill or leave this parameter empty.

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.

timer (required)

boolean

Time on the rate is fixed for invoice payment (15 minutes). During this time the user has to pay an invoice.

title (required)

string

Invoice title that will be displayed to the user.

description

string

Invoice description that will be displayed to the user.

foreign_id (required)

string

Unique foreign ID in your system. Must not contain personal data, such as the user's name or email address.

currency (required)

string

Currency you want to receive deposits in. For a list of all available currencies, see Supported currencies.

sender_currency

string

Currency of user invoice payment (3rd type invoice will be externalized at the time of sending this parameter with timer= true).

amount (required)

number

Invoice amount that you want to receive from the user.

url_success (required)

string

The URL to which we redirect the user in case of a successful invoice payment.

url_failed (required)

string

The URL to which we redirect the user in case of an unsuccessful invoice payment.

email_user (required)

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.

sender_type

enum

(natural or legal)

Whether the sender is a natural person (natural) or a legal entity (legal).

sender_data

object

If the sender is a natural person, include their first_name, last_name, date_of_birth and email. If the sender is a legal entity, include their legal_name, country_of_registration and email.

first_name

string

(Only for natural persons) The sender's first name.

last_name

string

(Only for natural persons) The sender's last name.

date_of_birth

string

(Only for natural persons) The sender's date of birth.

legal_name

string

(Only for legal entities) The company's name.

country_of_registration

string

(Only for legal entities) The company's country of registration.

Sample requests and responses

Invoice without restriction of payment time

Request:

"timer": false, 
"title": "Invoice Title",
"currency": "EUR",
"amount": 106.75,
"foreign_id": "196",
"end_user_reference": "12345",
"url_success": "http://success.test",
"url_failed": "http://failed.test",
"email_user":
"[email protected]"

Response:

{
"data":{
"id": 127,
"url": "https://wallet.coinspaid.com/invoice/iEU3uh",
"foreign_id": "196",
"end_user_reference": "12345",
"address": null,
"title": "Invoice Title",
"status": "created",
"currency": "EUR",
"amount": "106.75000000",
"sender_currency": null,
"sender_amount": null,
"fixed_at": null,
"release_at": null,
"seconds_left": null
}
}

Invoice with time restriction

Request:

 "timer": true,
"title": "Invoice Title",
"currency": "BTC",
"amount": 0.02,
"foreign_id": "197",
"end_user_reference": "12345",
"url_success": "http://success.test",
"url_failed": "http://failed.test",
"email_user": "[email protected]"

Response:

{
"data": {
"id": 26,
"url": "https://wallet.coinspaid.com/invoice/XJrbOG",
"foreign_id": "197",
"end_user_reference": "12345",
"address": null,
"title": "Invoice Title",
"status": "pending",
"currency": "BTC",
"amount": "0.01000000",
"sender_currency": null,
"sender_amount": null,
"fixed_at": 1592315493,
"release_at": 1592316393,
"seconds_left": 899
}
}

Invoice with time restriction and without the possibility to choose payment currency

Request:

 "timer": true,
"title": "Invoice Title",
"description": "Invoice description",
"currency": "EUR",
"sender_currency": "BTC",
"amount": 35,
"foreign_id": "200",
"end_user_reference": "12345",
"url_success": "http://success.test",
"url_failed": "http://failed.test",
"email_user": "[email protected]"

Response:

   "data":{
"id": 28,
"url": "https://wallet.coinspaid.com/invoice/zeUBm1",
"foreign_id": "200",
"end_user_reference": "12345",
"address": "2NCMFo2k7S8HSDWp6qwQ2wiAMwz3XwEC4Gp",
"title": "Invoice Title",
"status": "pending",
"currency": "EUR",
"amount": "35.00000000",
"sender_currency": "BTC",
"sender_amount": "0.00413945",
"fixed_at": 1592316313,
"release_at": 1592317213,
"seconds_left": 899
}
}

Did this answer your question?