Menu
API reference / Bitcoin transfers
Initiate withdrawal
Initiates a bitcoin withdrawal. The transaction is not completed until it is confirmed by the network it is sent onto. A success response from this endpoint means the transaction was successfully initiated, but does not guarantee completion. Requests are not idempotent: after a timeout, check your withdrawals before retrying.
POST https://api.bb.no/v1/withdrawals/bitcoin
Authentication
Signed API key
Send x-bb-api-key. Also send x-bb-api-nonce and x-bb-api-hmac.
API-key permission: bitcoin withdrawals.
Parameters
No path or query parameters.
Request body
A request body is required.
application/json
Show fields
destinationstringThe bitcoin destination to send funds to. Supported formats: - Bitcoin address (bech32, legacy-segwit, legacy) - Lightning invoice (bolt11) - Lightning address - Lightning LNURL
Example: "bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
amountBtcnumber · doubleThe amount to send. This field is required for all destinations except Lightning invoices. If the destination is a Lightning invoice, the amount is derived from the invoice.
Example: 0.01
accountIdstringThe ID of the account to send from. If empty, the default account is used.
Example: "acc_01HQZX3V9KJ4M2P8R6T0W5Y7BC"
isPaymentbooleanMarks the transaction as a payment. This has consequences for how the transaction is exported for tax purposes. It has no effect on the bitcoin transaction itself.
Example: false
descriptionstringFree-form text description of the withdrawal. Can be used to correlate with your own systems.
Example: "Til hardware-lommebok"
tfrInfoInfoThe recipient of this transaction, per EU's travel rule. Required for all withdrawals to new destinations. full_name and address are always required, also when the recipient is an organisation.
Show fields
fullNamestringRecipient name. For an organisation this is its registered name. Required for a private individual; optional for an organisation, which is identified by the organisasjonsnummer in nin.
countrystringISO-3166-1 alpha-2 country code
addressstringninstringThe recipient's fødselsnummer, or a 9-digit organisasjonsnummer when the recipient is an organisation. Only required if the TFR config said so.
exchangestringselfCustodybooleanResponses
200 · OK
application/jsonShow fields
withdrawalIdstringThe ID of the initiated withdrawal.
Example: "wi_01JA2B3C4D5E6F7G8H9J0K1M2N"
networkstring · enumValues: NETWORK_BITCOIN, NETWORK_LIGHTNING
Example: "NETWORK_BITCOIN"
statusstring · enumThe status of the withdrawal. The withdrawal might immediately succeed, if sending to another user of the Bare Bitcoin platform.
Values: WITHDRAWAL_STATUS_PENDING, WITHDRAWAL_STATUS_COMPLETED, WITHDRAWAL_STATUS_FAILED
Example: "WITHDRAWAL_STATUS_COMPLETED"