Generate Address
https://sandboxapi.bitnob.co/api/v1/addresses/generate (opens in a new tab)
Generate a temporary address for onchain transaction
Response Data
An Address Object (opens in a new tab) is sent returned in response data.
Parameter | type | Required |
---|---|---|
label Defaults to purchase xbox | string | |
customerEmail Email of customer performing the transaction | string | ✅ |
formatType Defaults to bip21 | string | |
amount Defaults to regular | string |
Request
Bitcoin Onchain/ Generate Address
curl --request POST \
--url https://sandboxapi.bitnob.co/api/v1/addresses/generate \
--header 'Authorization: Bearer API-KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"label": "purchase xbox",
"customerEmail": "test@bitnob.com",
"formatType": "bip21",
"amount": "string"
}
'
Responses
🟢 200 - Result example
{
"status": true,
"message": "Address successfully generated",
"data": {
"address": "tb1qgsdtucultat3dyaehr7p4gmzy8ucawnhvth7ar",
"label": "purchase xbox",
"addressType": "bech32"
}
}
Last updated on