Documentation for API V2. Major update is addresses with exchange crypto to fiat and vice versa abilities.
General information
Api endpoint for all requests is:
https://app.wllxpay.io/api/v2
Deposit flow
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.
Customer sends some funds to this address.
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
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 - WllxPay responds you with the transaction object.
You will receive a callback when transaction status is updated.
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,WllxPay instantly converts it to EUR so that you would receive EUR on your WllxPay account.
You obtain new address from WllxPay API same as in deposit flow, but additionally pass another parameter "convert_to" in your request specifying resulting currency.
When new deposit is arriving, WllxPay 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 customerreceivesmoney 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 - WllxPay responds you with the transaction object.
You will receive a callback when transaction status is updated.
API Endpoints
Ping
GEThttps://app.wllxpay.io/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: {}
{
"errors": {
"foreign_id": "The foreign id field is required."
}
}
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 WllxPay merchant account.
Hint: you don't have to generate new address for this customer anymore, address can be reused unlimited amount of times.
Example of the customer facing interface for Deposits
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 approximate current exchange rate.
{
"errors": {
"amount": "The amount must be at least 0.001."
}
}
Recommendation: ask customer to specify his payout address even before allowing him to deposit, this will improve experience and help to avoid mistakes with withdrawals in future.
Business logic for using cryptocurrency as a withdrawal method:
Your customer requests a payout in Cryptocurrency from his EUR balance on your platform. You have to specify withdrawal amount in EUR and specify Cryptocurrency and its destination (sometimes it is not only Address).
Example of such request <Send 3500 EUR to Bitcoin 3D2V3tushw7VLJYnK6vZVDpNcNmEG2a7QK">.
"riskscore" is used for coin compliance analysis and to reveal and track malicious behavior. Available for deposits and deposits with exchange in BTC, BCH, ETH.
Filter by currency ISO that exchanges from, example: BTC
currency_to
string
Filter by currency ISO that can be converted to, example: BTC
foreign_id
string
Your info for this address, will returned as reference in Address response, example: user-id:2048
currency
string
ISO of currency to receive funds in, example: BTC
convert_to
string
If you need auto exchange all incoming funds for example EUR, specifically this param as EUR or any other supported currency ISO, to see list of pairs see previous method.
foreign_id
string
Unique foreign ID in yourr system, example:" 122929 "
amount
string
Amount of funds to withdraw, example : " 3500 "
currency
string
Currency ISO to be withdrawn, example: " EUR "
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
Tag ( if it's Ripple) or memo (if it's Bitshares or EOS)
receiver_amount
string
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
string
Amount you want to calculate, example: "3". The parameter is required when the "receiver_amount" parameter is absent
sender_currency
string
Currency ISO which you want to exchange, example: "LTC"
receiver_currency
string
Currency ISO to be exchanged, example: "USD"
sender_amount
string
Amount you want to exchange, example: "6.5"
foreign_id
string
Unique foreign ID in your system, examples: "134453"
price
string
Exchange rate price on which exchange will be placed, example : "89.75202000"
sender_currency
string
Currency ISO which you want to exchange, example: " EUR"
receiver_currency
string
Currency ISO to be exchanged, example: " BTC "
sender_amount
string
Amount you want to exchange, example: " 2 "
foreign_id
string
Uniqe foreign ID in your system, example: "124876"
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.