Pay Lightning Invoice - Go Lightning (Simple)
Pay a Lightning Network invoice from a Go Account using BitGo Express in one call. See the Guide.
-
You build, sign, and send the Lightning payment in one call by passing the Lightning invoice string as the
addressand the amount in satoshis. BitGo Express handles signing with your Go Account passphrase and submits the transaction.
// 1. Pay Invoice
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export COIN="ofctbtc"
export WALLET_ID="<YOUR_GO_ACCOUNT_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
export WALLET_PASSPHRASE="<YOUR_GO_ACCOUNT_PASSPHRASE>"
export INVOICE="<LIGHTNING_INVOICE_STRING>"
export AMOUNT="<AMOUNT_IN_SATOSHIS>"
curl -X POST \
http://$BITGO_EXPRESS_HOST/api/v2/$COIN/wallet/$WALLET_ID/sendcoins \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-d '{
"address": "'"$INVOICE"'",
"amount": "'"$AMOUNT"'",
"walletPassphrase": "'"$WALLET_PASSPHRASE"'"
}'
// 1. Pay Invoice
const wallet = await bitgo.coin('ofctbtc').wallets().get({ id: walletId });
const result = await wallet.send({
address: 'lntbs1...', // Lightning invoice string
amount: 1000, // Amount in satoshis
walletPassphrase: '<YOUR_GO_ACCOUNT_PASSPHRASE>',
});
console.dir(result);
Response
// 1. Pay Invoice Response
{
"transfer": {
"id": "<TRANSFER_ID>",
"coin": "ofctbtc",
"wallet": "<WALLET_ID>",
"walletType": "trading",
"enterprise": "<ENTERPRISE_ID>",
"txid": "<TRANSACTION_ID>",
"date": "2026-04-09T12:00:01.000Z",
"type": "send",
"valueString": "-1000",
"feeString": "0",
"state": "signed"
},
"txid": "<TRANSACTION_ID>",
"status": "signed"
}