Bitcoin payouts from your local currency wallet
Send Bitcoin payouts directly from your local currency wallet, without ever holding bitcoin.
Wire funds to your OpenNode local currency wallet, then programmatically initiate Bitcoin payouts. OpenNode seamlessly converts your local currency to the requested Bitcoin amount and sends BTC payments.
Wiring funds
To wire funds into your OpenNode local currency wallet, please contact support using the live chat widget or email us at [email protected]
Send Bitcoin payouts from your local currency wallet
On-chain Bitcoin payouts
On-chain Bitcoin payouts can be initiated in two ways:
- Set a BTC amount and draw the corresponding local currency amount from your local currency wallet
{
"type": "chain",
"wallet": "fiat",
"address": "3DssEjLvLMPYzhAhRdVp7W4JrsABpUFcmv",
"amount": 500000
}
This instruction will send 500,000 sats to 3DssEjLvLMPYzhAhRdVp7W4JrsABpUFcmv
and draw the necessary local currency amount from your local currency wallet.
- Set a fiat amount and send corresponding BTC amount to an address
{
"type": "chain",
"wallet": "fiat",
"address": "3DssEjLvLMPYzhAhRdVp7W4JrsABpUFcmv",
"amount": 50,
"currency": "USD"
}
This instruction will send the equivalent of $50 USD in Bitcoin to 3DssEjLvLMPYzhAhRdVp7W4JrsABpUFcmv
.
Lightning Bitcoin payouts
Lightning Bitcoin payouts are initiated using a BTC amount, which is set in the Lightning invoice itself.
{
"type": "ln",
"wallet": "fiat",
"address": "LNBC1M1P3R8SV4PP5QLK8QHNSZF5XHMWKH7JNT5QT7UEPEGQGKJ65PRAGSKP3FW334VFQDP52PSHJMT9DE6ZQUN9W96K2UM5YPNX7U3QXYCRQTPSXQCZQUMPW3ESCQZPGXQZJHSP57NYJEE0S3ZEMUC3D5LDTTG0QF2KQPZPDPFTRVZ38ZXA6P20MLT2S9QYYSSQN6WDS8YCZ6WNJAJ2H4JFGU2PGSMMK5DKZSD6EHQ548THNDQ2CKA87Y80D75VAKL29NERAWMCG46XHTS3SELN528PT2L6Y5MXRL3HKPQQ764E6S"
}
This instruction will send 100,000 sats to the Lightning invoice provided. The amount - 100,000 - is encoded into the invoice itself. The fiat amount corresponding to 100,000 sats will be drawn from the local currency wallet and converted to BTC.
Previewing a payout
Preview any Bitcoin payout by sending auto_confirm: false
along with request data. This will return the amount of fiat that to be drawn from your local currency wallet. The quote can then be confirmed by using the returned ID in the following HTTP calls:
- On-chain withdrawals:
POST /v2/withdrawals/chain/:id
- Lightning withdrawals:
POST /v2/withdrawals/ln/:id
Initiate preview request
POST /v2/withdrawals
{
"type": "chain",
"wallet": "fiat",
"amount": 100,
"currency": "USD",
"address": "2N8emZdkBiiDWqa5pM7HCUUn3KeWVC423ax",
"auto_confirm": false
}
{
"data": {
"id": "a84946bb-e632-4bd0-ae4d-18e6bd7201f3",
"type": "chain",
"amount": 352264,
"fee": 3558,
"fiat_value": 10000,
"status": "initial",
"conversion": {
"from": "USD",
"from_amount": 100,
"to": "BTC",
"to_amount": 355822
},
"expiry": "2023-05-10T12:38:20.846Z"
}
}
Confirm preview request
POST /v2/withdrawals/chain/:id
or POST /v2/withdrawals/ln/:id
depending on your withdrawal type
No body is required for the confirmation request.
Updated over 1 year ago