Skip to main content
Layer1

Receive deposit and ingest the webhooks

Once you share the address with a depositor, wait for the deposit to arrive. When Layer1 detects such a transaction, the following webhook types are sent out for each stage of the deposit process:

  • layer1:crypto:deposit:status-change update on any change of the deposit status.
  • layer1:digital:balance:updated give an update of the wallet balances within your Asset Pool.

The "balance updated" webhooks​

The following webhooks are sent out to update the current balance within the corresponding deposit address:

  • The "funds reserved on blockchain" update shows the amount added to the RESERVED and the BLOCKCHAIN sections once the deposit is confirmed on the blockchain.
  • The "available funds" update indicates that the deposit is successful, as the funds have been moved from RESERVED to AVAILABLE for this address.
Example webhook
{
"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"
}
]
}
}

The "status change" webhooks​

The following webhooks are sent out to inform about the current status of the deposit:

  • DETECTED
  • UNCONFIRMED
  • CONFIRMED
  • SCREENING_REQUESTED
  • SUCCESS
Example webhook
{
"event": "layer1:crypto: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"
}
]
}
}

At the final point of getting the SUCCESS webhook, the deposit has been successfully received by the asset pool. This triggers an automatic consolidation round, which transfers the funds to a central master wallet that pools all the funds for future use.

Was this page helpful?