API Reference
Bitcoin Onchain
Generate Address [POST]

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.

ParametertypeRequired
label Defaults to purchase xboxstring
customerEmail
Email of customer performing the transaction
string
formatType Defaults to bip21string
amount Defaults to regularstring

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