Search
K

Webhooks

We offer webhook callbacks for clients that want to be updated when a deposit is detected on-chain or finalized.

Webhook payload examples

AquaPay guarantees at-least-once delivery of our webhook messages, and to avoid duplicates, you can utilize txHash and adminApproval as deduplication IDs.
Unconfirmed
Done
Rejected
Failed
Unconfirmed webhook is disabled by default. You can enable it on AquaPay web portal "Webhooks" page.
{
"address": "mzczAqqqNqtozbaT7oJEzYML814Wg7d999",
"adminApproval": "UNCONFIRMED",
"confirmation": 0,
"executableQuantity": 0.00002159,
"fiatReceivable": 1,
"quantity": 0.00002159,
"strategy" : "RFQ",
"sourceAddress": "tb1qx3r63vymgvp0ln5na022zzh7cv6xu3rs94g6ca",
"subaccount": "deedddff",
"symbol": "BTC",
"tradePrice": 46319.1759999501,
"transactionType": "DEPOSIT",
"txHash": "14a8cbac6973374573326ab97891c9fe13eec03143e538e1a3e92987140ab04a",
"txId": "3e06c4eb-b134-4a93-a78f-a979e1d3a803",
"paymentId": "4618d63b-ea56-4f9f-920a-932faac40c4b",
"username": "woojchung"
}
{
"quantity": 0.003223,
"subaccount": "deedddff",
"fiatReceivable": 12.347,
"executableQuantity": 0.003223,
"txId": "14ea698f-96b6-468d-8b1f-c52a695ee627",
"paymentId": "4618d63b-ea56-4f9f-920a-932faac40c4b",
"symbol": "ETH",
"strategy" : "RFQ",
"txHash": "0xf62f9fe6c90e85792fef676ddaa711916d9abb6b6b600e3c5b1d4bdcb1a38ec1",
"txTime": 1632204599177,
"address": "0xc08377dF1eF026aeb12dcc57D254173CB6b0A1aA",
"fiatReceived": 12.347,
"transactionType": "DEPOSIT",
"tradePrice": 3831.0226,
"username": "woojchung",
"adminApproval": "DONE"
}
{
"quantity": 0.00009989,
"sourceAddress": "tb1qwmxjsq283elnzsd306c6h3z08fucyhl565a4s2",
"subaccount": "deedddff",
"txId": "e09fef5d-6ab4-4da1-bed6-5a7d6416162d",
"paymentId": "4618d63b-ea56-4f9f-920a-932faac40c4b",
"symbol": "BTC",
"strategy" : "RFQ",
"txHash": "7f9e94c800079ed7ff71da6d02e16885e9ae39cb8c79473649fb00254f20fe1b",
"txTime": 1649259696838,
"address": "mtTu1NHfgbWQH2u4iXCfSYnohbQw1w1AJj",
"transactionType": "DEPOSIT",
"expired": true,
"tradePrice": 57045.14521362,
"username": "woojchung",
"adminApproval": "REJECTED",
"reason": "Expired"
}
{
"quantity": 0.00009989,
"sourceAddress": "tb1qwmxjsq283elnzsd306c6h3z08fucyhl565a4s2",
"strategy": "ACA",
"subaccount": "test",
"fiatReceivable": 4.3,
"txId": "ca03390e-8d72-482b-a95a-946796c46ad8",
"symbol": "BTC",
"txHash": "72bf9e87407ade9ba38b7584987de66cba8fbb1e7e9bd1964af138_jdeg6i",
"address": "mp2HCxb2f69hiGgti5XvWu2Z8yLkoLi6jk",
"transactionType": "DEPOSIT",
"confirmation": 0,
"tradePrice": 43073.6,
"username": "deposit_test_user_jdeg6i",
"adminApproval": "FAILED",
"expired": false,
"paymentId": "8ac5c3af-f663-4da1-9683-2d160b3e4e43",
"feeModel": "EXPLICIT"
}

Callback parameter values

Parameter
Type
Description
paymentId
string
Bill Id provided by aquapay, can be used for query a bill status or doing conversions
txId
string
Deposit Id provided by AquaPay
address
string
Address of the deposit
sourceAddress
string
Source address of the deposit
adminApproval
'UNCONFIRMED'|'DONE' | 'REJECTED' | 'FAILED'
Status of Transaction.
UNCONFIRMED: a deposit is detected and waiting for further confirmation
DONE: Successfully deposited and converted
REJECTED: Successfully deposited but no conversion occurred FAILED: a deposit is failed on blockchain
executableQuantity
number
The amount of crypto quantity that can be executed. Not available for "ACA" strategy.
fiatReceivable
number
The amount of quantity in fiat that is expected. If a user accidentally sends over the value of the quantity accepted, we will never trade above the quantity provided, and thus the fiatReceived will never be higher than the fiatReceivable.
fiatReceived
number
Amount traded to fiat
quantity
number
Quantity (in Crypto) deposited
subaccount
string
Payment service provider's user who initiate the deposit request
symbol
string
Crypto Symbol
tradePrice
number
Price of Execution
transactionType
'DEPOSIT'
Type of transaction. Will always be DEPOSIT
txHash
string
Blockchain Transaction Hash
txTime
number
Time of transaction confirmation in blockchain
username
string
Your username
expired
boolean
The bill is expired
strategy
string
The payment strategy of the bill
reason
string
Human-readable rejected reason for reference only.