V1

Documentation for API V1. Extra simple if you want just start accepting crypto payments without headache. API V1 does not support Exchange or any Fiat currency related operations.

General information

Api endpoint for all requests is:

https://app.wllxpay.io/api/v1

Deposit flow

  1. You obtain new address from WllxPay 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 - WllxPay 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 - WllxPay responds you with the transaction object.

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

API Endpoints

Take new address for deposit

POST https://app.wllxpay.io/api /v1/addresses/take

This method is used for obtaining deposit for receiving funds

Request Body

NameTypeDescription

foreign_id

string

Any id from your side. We recommend using this parameter to identify customer on your side.

currency

string

Currency ISO you want to receive, for example: BTC

{
  "status": "ok",
  "data": {
    "id": 1,
    "address": "1xds1983rh13ouifhj12fjo214f2f",
    "foreign_id": "1872",
    "tag": "tag-1"
  }
}

Please not that some cryptocurrencies require few parameters to receive funds, not only an address but also a "tag". For example Ripple (XRP) requires tag in order to send funds. If response has a non-empty tag parameter, please make sure to pass this "tag" to your customer otherwise this may lead to funds being delayed or lost.

Withdraw

POST https://app.wllxpay.io/api/v1/withdrawal/make

Request funds withdraw

Request Body

NameTypeDescription

currency

string

Currency iso: BTC

foreign_id

string

Foreign id - unique identifier for your transaction

amount

string

Amount to send

address

string

Address to withdraw currency, for example :

{
  "status": "ok",
  "data": {
    "id": 1,
    "currency": "BTC",
    "currency_fee": "BTC",
    "address": "address-string",
    "tag": null,
    "amount": "1.01",
    "status": "processing"
  }
}

Foreign_id is used to identify the withdrawal. Foreign_id is a unique string that you send to WllxPay to avoid network issues and double sending of funds, and used to identify your requests. Common approach is to insert transaction record to your MySQL or any other relational database before calling withdrawal API, and send to WllxPay id from autoincrement field in your database.

Callbacks

For any transaction, deposit or withdrawal, transaction callback will come to the url that you specified in your merchant dashboard.

{
    "id": "1127742",
    "txid": "5145d00f9fe21cae7c0f94938ed91f8b493fae610f839703fde89aa2c5642bde",
    "currency": "BTC",
    "currency_fee": "BTC",
    "confirmations": "0",
    "amount": "0.01496462",
    "fee": "0.00000000",
    "address": "32dJKfbQLoHQVimtjt1U2h7Vw2kcbJbGVp",
    "type": "deposit",
    "status": "confirmed",
    "error": ""
}

To provide authentication for the callback, coinspaid API signs the POST your api key and secret:

  1. X-Processing-Key – Your public key

  2. X-Processing-Signature – POST body, signed by the your secret key HMAC-SHA512

Read this if you accept tokens. Please pay attention to having 2 currency fields - "currency" and "currency_fee". For USDT or ERC20 tokens "currency" will be USDT or *TOKENNAME* and "currency_fee" will be BTC or ETC / ETH, because in USDT blockchain fees are paid in BTC and in ERC20 fees paid by ETC / ETH respectively.

Transaction types can be:

Type

Meaning

deposit

Money arrived to your wallet from payer

withdrawal

Money sent from your wallet to address

Transaction statuses:

Status

Meaning

confirmed

Final. You are safe to process this transaction

not_confirmed

Transaction is not yet confirmed

error

Final. Some error occurred, pls see “error” field

cancelled

Final. This transaction is a double spend. Pay attention to this customer.

not_enough_fee

Not enough money to pay fee for transfers of ETH / ERC20 / USDT, when money are deposited transactions will try to transfer

Last updated