Receive Deposit and Ingest the Webhooks
Now that the address has been provided to the depositor, we can only wait until the deposit has been made. Once the transaction has been detected, a number of webhooks are going to be sent out for each stage of the deposit process.
These will be the layer1:crypto:deposit:status-change
, which is updates on any change in status of the deposit, and layer1:digital:balance:updated
, which gives an update of the wallet balances within your asset pool.
The Balance Updated Webhook
These webhooks are sent out to update the current balance within the corresponding deposit address. Two webhooks will initially be received for a deposit:
- The funds-reserved blockchain update, which shows the amount added to both the
RESERVED
section and theBLOCKCHAIN
section once the deposit has been confirmed on the blockchain. - The available funds update, which shows that now that the deposit is successful, the funds have moved from
RESERVED
toAVAILABLE
for this address.
Balance Updated Webhook Example
{
"event": "layer1:digital:balance:updated",
"timestamp": "2024-06-05T20:40:16.941138099Z",
"data": {
"reference": "First Eth Address",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9",
"asset": "ETH",
"funds": [
{
"type": "AVAILABLE",
"balance": "0.00",
"delta": "0.00"
},
{
"type": "BLOCKCHAIN",
"balance": "0.20",
"delta": "0.20"
},
{
"type": "RESERVED",
"balance": "0.20",
"delta": "0.20"
}
]
}
}
{
"event": "layer1:digital:balance:updated",
"timestamp": "2024-06-05T20:40:31.395066159Z",
"data": {
"reference": "First Eth Address",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9",
"asset": "ETH",
"funds": [
{
"type": "AVAILABLE",
"balance": "0.20",
"delta": "0.20"
},
{
"type": "BLOCKCHAIN",
"balance": "0.20",
"delta": "0.00"
},
{
"type": "RESERVED",
"balance": "0.00",
"delta": "-0.20"
}
]
}
}
The Status Change Webhooks
These webhooks are sent out to inform about the current status of the withdrawal, there are five update webhooks expected for a deposit:
DETECTED
UNCONFIRMED
CONFIRMED
SCREENING_REQUESTED
SUCCESS
Status Change Webhook Examples
{
"event": "layer1:digital:deposit:status-change",
"timestamp": "2024-06-05T20:39:19.602586984Z",
"data": {
"id": "018fea20a69e7cc58066f8d03362e797d18a869f191944a09e5e784d7ca8f45a6f",
"hash": "0x8d49dad00612517e5fdf9ca896c4aded5a46c30226cd44f4f0c26b4c65ae63fe",
"type": "DEPOSIT",
"asset": "ETH",
"amount": "0.20",
"status": "DETECTED",
"address": {
"id": "d18a869f-1919-44a0-9e5e-784d7ca8f45a",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9",
"network": "ETHEREUM",
"keyPairId": "44cf54df-93e9-4dd9-84c9-e96f0cf90f3e",
"reference": "First Eth Address",
"customerId": "customerOne",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.20",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"createdAt": "2024-06-05T20:39:19.454Z",
"updatedAt": "2024-06-05T20:39:19.528756Z",
"destinations": [
{
"amount": "0.20",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9"
}
]
}
}
{
"event": "layer1:digital:deposit:status-change",
"timestamp": "2024-06-05T20:39:26.724877059Z",
"data": {
"id": "018fea20a69e7cc58066f8d03362e797d18a869f191944a09e5e784d7ca8f45a6f",
"hash": "0x8d49dad00612517e5fdf9ca896c4aded5a46c30226cd44f4f0c26b4c65ae63fe",
"type": "DEPOSIT",
"asset": "ETH",
"amount": "0.20",
"status": "UNCONFIRMED",
"address": {
"id": "d18a869f-1919-44a0-9e5e-784d7ca8f45a",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9",
"network": "ETHEREUM",
"keyPairId": "44cf54df-93e9-4dd9-84c9-e96f0cf90f3e",
"reference": "First Eth Address",
"customerId": "customerOne",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.200234653675781",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"createdAt": "2024-06-05T20:39:19.454Z",
"updatedAt": "2024-06-05T20:39:26.683343Z",
"destinations": [
{
"amount": "0.20",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9"
}
],
"networkDetail": {
"fee": {
"asset": "ETH",
"amount": "0.000234653675781"
},
"block": {
"number": 6046664,
"timestamp": "2024-06-05T20:39:24Z"
}
}
}
}
{
"event": "layer1:digital:deposit:status-change",
"timestamp": "2024-06-05T20:40:16.893418347Z",
"data": {
"id": "018fea20a69e7cc58066f8d03362e797d18a869f191944a09e5e784d7ca8f45a6f",
"hash": "0x8d49dad00612517e5fdf9ca896c4aded5a46c30226cd44f4f0c26b4c65ae63fe",
"type": "DEPOSIT",
"asset": "ETH",
"amount": "0.20",
"status": "CONFIRMED",
"address": {
"id": "d18a869f-1919-44a0-9e5e-784d7ca8f45a",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9",
"network": "ETHEREUM",
"keyPairId": "44cf54df-93e9-4dd9-84c9-e96f0cf90f3e",
"reference": "First Eth Address",
"customerId": "customerOne",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.200234653675781",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"createdAt": "2024-06-05T20:39:19.454Z",
"updatedAt": "2024-06-05T20:40:16.867302Z",
"destinations": [
{
"amount": "0.20",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9"
}
],
"networkDetail": {
"fee": {
"asset": "ETH",
"amount": "0.000234653675781"
},
"block": {
"number": 6046664,
"timestamp": "2024-06-05T20:39:24Z"
}
}
}
}
{
"event": "layer1:digital:deposit:status-change",
"timestamp": "2024-06-05T20:40:17.112592654Z",
"data": {
"id": "018fea20a69e7cc58066f8d03362e797d18a869f191944a09e5e784d7ca8f45a6f",
"hash": "0x8d49dad00612517e5fdf9ca896c4aded5a46c30226cd44f4f0c26b4c65ae63fe",
"type": "DEPOSIT",
"asset": "ETH",
"amount": "0.20",
"status": "SCREENING_REQUESTED",
"address": {
"id": "d18a869f-1919-44a0-9e5e-784d7ca8f45a",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9",
"network": "ETHEREUM",
"keyPairId": "44cf54df-93e9-4dd9-84c9-e96f0cf90f3e",
"reference": "First Eth Address",
"customerId": "customerOne",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.200234653675781",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"createdAt": "2024-06-05T20:39:19.454Z",
"updatedAt": "2024-06-05T20:40:16.973137Z",
"destinations": [
{
"amount": "0.20",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9"
}
],
"networkDetail": {
"fee": {
"asset": "ETH",
"amount": "0.000234653675781"
},
"block": {
"number": 6046664,
"timestamp": "2024-06-05T20:39:24Z"
}
}
}
}
{
"event": "layer1:digital:deposit:status-change",
"timestamp": "2024-06-05T20:40:31.419360016Z",
"data": {
"id": "018fea20a69e7cc58066f8d03362e797d18a869f191944a09e5e784d7ca8f45a6f",
"hash": "0x8d49dad00612517e5fdf9ca896c4aded5a46c30226cd44f4f0c26b4c65ae63fe",
"type": "DEPOSIT",
"asset": "ETH",
"amount": "0.20",
"status": "SUCCESS",
"address": {
"id": "d18a869f-1919-44a0-9e5e-784d7ca8f45a",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9",
"network": "ETHEREUM",
"keyPairId": "44cf54df-93e9-4dd9-84c9-e96f0cf90f3e",
"reference": "First Eth Address",
"customerId": "customerOne",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.200234653675781",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"createdAt": "2024-06-05T20:39:19.454Z",
"updatedAt": "2024-06-05T20:40:31.380741Z",
"destinations": [
{
"amount": "0.20",
"address": "0xc4b21fb39aaf5fc07d3cd4420bf3ee74a61642e9"
}
],
"networkDetail": {
"fee": {
"asset": "ETH",
"amount": "0.000234653675781"
},
"block": {
"number": 6046664,
"timestamp": "2024-06-05T20:39:24Z"
}
}
}
}
At the final point of getting the SUCCESS
wehbook, the deposit has been successful received by the asset pool. This sets off an automatic consolidation round that will move the funds to a central master wallet that pools all the funds for future action, and will be covered in the next section.
Updated 5 months ago