Understanding the Withdrawal Webhooks
Once the transaction has been submitted, a number of webhooks are going to be sent out for each stage of the withdrawal process.
These will be the layer1:crypto:withdrawal:status-change
, which is updates on any change in status of the withdrawal, and layer1:digital:balance:updated
, which gives an update of the wallet balances within your asset pool.
The Balance Updated Webhooks
These webhooks are sent out to update the current balance within the corresponding master address. for a withdrawal two types will be sent out:
- The funds-reserved Balance Update, which shows the amount actioned in the withdrawal move from
AVAILABLE
toRESERVED
- The funds-released Balance Update, which shows the funds have been removed from the
RESERVED
pool once the withdrawal is given as successful.
Balance Updated Webhook Examples
{
"event": "layer1:digital:balance:updated",
"timestamp": "2024-06-06T19:33:25.059079161Z",
"data": {
"reference": "AssetPoolTwo",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"asset": "ETH",
"funds": [
{
"type": "AVAILABLE",
"balance": "0.19848315335156838671875",
"delta": "-0.00114716058324173828125"
},
{
"type": "BLOCKCHAIN",
"balance": "0.199630313934810125",
"delta": "0.00"
},
{
"type": "RESERVED",
"balance": "0.00114716058324173828125",
"delta": "0.00114716058324173828125"
}
]
}
}
{
"event": "layer1:digital:balance:updated",
"timestamp": "2024-06-06T19:34:38.763517740Z",
"data": {
"reference": "AssetPoolTwo",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"asset": "ETH",
"funds": [
{
"type": "AVAILABLE",
"balance": "0.198496131149297125",
"delta": "0.000012977797728738"
},
{
"type": "BLOCKCHAIN",
"balance": "0.198496131149297125",
"delta": "-0.001134182785513"
},
{
"type": "RESERVED",
"balance": "0.00",
"delta": "-0.001147160583241738"
}
]
}
}
The Status Change Webhooks
These webhooks are sent out to inform about the current status of the withdrawal, there are eight update webhooks expected:
CREATED
SCREENING_REQUESTED
FUNDS_RESERVED
SIGNED
DETECTED
- at this stage the transaction is on the relevant blockchain and can now be traced with thehash
provided in the webhook.UNCONFIRMED
CONFIRMED
SUCCESS
Status Change Webhook Examples
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:33:25.139504437Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001",
"status": "CREATED",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.000147160583241738",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
},
{
"amount": "0.001",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:33:25.109693Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84A4a239805d06c685219801B82BEA7c76702214"
}
]
}
}
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:33:25.332170456Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001",
"status": "SCREENING_REQUESTED",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.000147160583241738",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
},
{
"amount": "0.001",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:33:25.298837Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84A4a239805d06c685219801B82BEA7c76702214"
}
]
}
}
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:33:26.038587396Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001",
"status": "FUNDS_RESERVED",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.000147160583241738",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
},
{
"amount": "0.001",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:33:25.987397Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84A4a239805d06c685219801B82BEA7c76702214"
}
]
}
}
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:33:26.620045369Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001",
"status": "SIGNED",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.000147160583241738",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
},
{
"amount": "0.001",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:33:26.596896Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84A4a239805d06c685219801B82BEA7c76702214"
}
]
}
}
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:33:31.090682810Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"hash": "0xd5048b414557978a4c271998b3fda04b0f6228edbdb47500a045f12bf22b1ee2",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001",
"status": "DETECTED",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.001",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:33:31.046673Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
]
}
}
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:33:38.477488250Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"hash": "0xd5048b414557978a4c271998b3fda04b0f6228edbdb47500a045f12bf22b1ee2",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001134182785513",
"status": "UNCONFIRMED",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.001134182785513",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:33:38.447726Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"networkDetail": {
"fee": {
"asset": "ETH",
"amount": "0.000134182785513"
},
"block": {
"number": 6053161,
"timestamp": "2024-06-06T19:33:36Z"
}
}
}
}
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:34:38.719132837Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"hash": "0xd5048b414557978a4c271998b3fda04b0f6228edbdb47500a045f12bf22b1ee2",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001134182785513",
"status": "CONFIRMED",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.001134182785513",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:34:38.697222Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"networkDetail": {
"fee": {
"asset": "ETH",
"amount": "0.000134182785513"
},
"block": {
"number": 6053161,
"timestamp": "2024-06-06T19:33:36Z"
}
}
}
}
{
"event": "layer1:digital:withdrawal:status-change",
"timestamp": "2024-06-06T19:34:38.822842496Z",
"data": {
"id": "018fef0aab157afb966b7d20c89b55048e1fcdb58edc49b792891c41c5bcd81869",
"hash": "0xd5048b414557978a4c271998b3fda04b0f6228edbdb47500a045f12bf22b1ee2",
"type": "WITHDRAWAL",
"asset": "ETH",
"amount": "0.001134182785513",
"status": "SUCCESS",
"address": {
"id": "8e1fcdb5-8edc-49b7-9289-1c41c5bcd818",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d",
"network": "ETHEREUM",
"keyPairId": "fdc9f5a0-698c-4163-ab21-df85f343a2a4",
"reference": "AssetPoolTwo",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
},
"sources": [
{
"amount": "0.001134182785513",
"address": "0x96073c4b415d60ade18de32e43efc2914731e03d"
}
],
"createdAt": "2024-06-06T19:33:24.885Z",
"reference": "myUniqueRef333",
"updatedAt": "2024-06-06T19:34:38.802803Z",
"destinations": [
{
"amount": "0.001",
"address": "0x84a4a239805d06c685219801b82bea7c76702214"
}
],
"networkDetail": {
"fee": {
"asset": "ETH",
"amount": "0.000134182785513"
},
"block": {
"number": 6053161,
"timestamp": "2024-06-06T19:33:36Z"
}
}
}
}
At the final point of getting the SUCCESS
Wehbook, the withdrawal is now in the destination wallet and all pool balances have been update. the withdrawal process is now complete.
Updated 6 months ago