About

iqpay is a platform that allows brokers and websites to easily connect cryptocurrency as their payment method.

How doest it work?

The website connects to our iqpay datacenter via Rest API. When a customer of the website wants to make a deposit, the website asks our API to generate a unique wallet that will be bound to this customer. As nobody else, except the customer, knows this address, each money transfer to this wallet will be percied as a deposit of this particular customer. When the deposit occurs, our datacenter calls websites webhook to notify of about preliminarily receiving the transaction. When a certain amount of blocks(confirmations) are done, the transaction can not be undone by hackers attack, so iqpay datacenter calls the final webhook to notify the website about deposit success. After that the system automaticaly transfer whole deposit amount from customer deposit wallet to the websites wallet.

Integration

To complete integration you need:

Create BTC, ETH, USDT wallets for receiving transfers and tell our manager its adresses;

Get API key from settings that bound to these addresses;

Integrate our REST API. For the minimum integration you need only Get deposit wallet request;

Create webhooks. For the minimum integration you need only Confirm deposit webhook. Other webhooks allow you to watch the full deposit cylcle. We strongly recommend you to specify Create invoice and Update confirmations webhooks too. We support GET, POST, PUT and DELETE request methods. You should tell our manager the methods and URLs of created REST endpoints.

[Optional] Choose whether you want to receive converted to USD or EUR deposit amount in webhooks body.

API Description

API URL

https://sdc.iqpay.io/

Authorization

To access API endpoints you can get in settings page API key bound to your IPs. The received API key you need to add to the header Authorization of each HTTP request. Get currencies request can be used for the test.

HTTP Status codes
Code Description
200 OK Successful request
400 Bad Request. Returns JSON with the error message
401 Invalid login data
402 Forbidden. Action is forbidden for API key
403 Authorization token expired
500 Internal Server Error
503 Service Unavailable. Service is down for maintenance
504 Gateway Timeout. Request timeout expired

Time format

All dates are returned in timestamp(seconds) format in UTC. Example: "1543657837"

POST

Create wallet

Create deposit wallet

https://sdc.iqpay.io/wallet/create/:currency (for example: BTC)

Create wallet

Example Request

curl --location --request POST 'https://sdc.iqpay.io/wallet/create/BTC' \
--header 'Content-Type: application/json' \
--header 'Authorization:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.Ii9jbGR1eXlwYkhlM0d0c0V3pnS2hlZk1xYmJBeWhiNDFVYjBYSG9ON2N5aU05bXJjM0FKWTJCNVlVSXFQYVFzcGtBZGtkclVNVmNCRG0vdE1kWTEyQy9CVWJYaHUxc2V3VG93dnJPWUxmN0tRWjVXZGlqaE51eDRqVzA3dFVpMnhxWXQxWnJsQ29ib3FxWGtYVDB1RmNtNlZsWDlaVExjUT09Ig.72cLbmZied9izUNI3bx9CR04hglj0ufRPANA2xrkuA0'
--data-raw '{
"extId":"232342"
}'

HEADERS
Content-Type application/json
Authorization eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.Ii9jbGR1eXlwYkhlM0d0c0V3pnS2hlZk1xYmJBeWhiNDFVYjBYSG9ON2N5aU05bXJjM0FKWTJCNVlVSXFQYVFzcGtBZGtkclVNVmNCRG0vdE1kWTEyQy9CVWJYaHUxc2V3VG93dnJPWUxmN0tRWjVXZGlqaE51eDRqVzA3dFVpMnhxWXQxWnJsQ29ib3FxWGtYVDB1RmNtNlZsWDlaVExjUT09Ig.72cLbmZied9izUNI3bx9CR04hglj0ufRPANA2xrkuA0
BODY
extId 90233

Notice: for each extId will create wallet. In case you send same extId will created same wallet.

200 - OK

Example Response

{
    "status": 200,
    "data": {
        "publicKey": "1JeFHLLFQqXDef7K5QskgFbVhyAHGmQNPZ",
        "tag": "",
        "currency": "BTC",
        "extId": "2",
    }
}

POST

Deposit webhook

URL is specified in the admin panel

Notice: You must answer status 200. If the status is not 200 - we will repeat the request

BODY
address Deposit wallet address
wallet_ext_id extId
fromAddress Detail of transaction
txid Detail of transaction
amount Amount of deposit
currency Currency of deposit
status 0 - Tx added to blockchain, 1 - TX confirmed, 2 - TX error
convert_currency
convert_price
converted_amount

Example Request Body

{
    "status": 200,
    "address": "1JeFHLLFQqXDef7K5QskgFbVhyAHGmQNPZ",
    "wallet_ext_id": "2",
    "fromAddress": "19gwn5dzryrs11rm8s4euwf5v1rdpmrwne",
    "txid": "04fbaac8265b52cc51df73dac4a974de41c25c2acb79f2c1b639baa9ee52429b",
    "amount": 0.00001124,
    "currency": 'BTC',
    "status": 1,
    "convert_currency": "",
    "convert_price": 0,
    "converted_amount": 0
}


POST

Withdrawal webhook

URL is specified in the admin panel

Notice: You must answer status 200. If the status is not 200 - we will repeat the request

BODY
address Withdrawal wallet address
txid Detail of transaction
amount Amount of withdrawal
currency Currency of withdrawal
status 0 - Tx added to blockchain, 1 - TX confirmed, 2 - TX error

Example Request Body

{
    "id": 11,
    "address": "1JeFHLLFQqXDef7K5QskgFbVhyAHGmQNPZ",
    "currency": 'ETH',
    "amount": 0.022,
    "txid": "0x52e56318d44123c61f43f2febf4d050bbe64ce48d4df865aa9b8ace4dcf60d83",
    "gas": 0.000714,
    "timeCreated": 1590334908,
    "timeConfirmed": 1590334913,
    "status": 2
}