Create a crypto address
Once you have an Asset Pool and id from the earlier request, you can generate crypto addresses within that Asset Pool. See the list of available cryptocurrency addresses in the Supported Assets and Networks guide.
To create a Crypto Address, send the POST /digital/v1/addresses request with the following body parameters. Use the id from the previous request as assetPoolId.
{
"network": "ETHEREUM",
"asset": "ETH",
"reference": "First Eth Address",
"customerId": "customerOne",
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600"
}
Upon successfully submitting the request, you'll receive details of the newly created Address:
{
"assetPoolId": "2be1cc9c-a5af-47e2-9dba-b7b82317e600",
"keyPairId": "44cf54df-93e9-4dd9-84c9-e96f0cf90f3e",
"reference": "First Eth Address"
}
At this point, the address is created on the relevant blockchain and associated with AssetPoolId from the request. Then it is delivered asynchronously through a webhook to the destination set up earlier.
Address Created Webhook
The "address created" webhook is sent to any destination subscribed to the layer1:crypto:address:created event:
{
"event": "layer1:crypto:address:created",
"timestamp": "2024-05-30T20:03:54.075299611Z",
"data": {
"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"
}
}
You can extract the address from data.address and show it to users, from which you expect deposits to be sent, and who can pay in the correct cryptocurrency.
Share the Address with a depositor and wait for a deposit to be transferred. For the next steps, see Receive deposit and ingest the webhooks.