Create Wallet

post
PostCreateWallet

https://api.lnpay.co/v1/wallet
Create a new wallet and corresponding access keys
Request
Response
Request
Body Parameters
user_label
required
string
An internal identifier for this wallet
ln_node_id
optional
string
The LN node that this wallet will send/receive from Default: LNPay custodial
Response
200: OK
Returns: Wallet
{
"id":"wal_czDztN5eJ4r5sJ",
"created_at":1582461859,
"updated_at":1618419816,
"user_label":"My Postman Collection Wallet",
"balance":74, #Sats
"balance_msat":null,
"statusType":{
"type":"wallet",
"name":"active",
"display_name":"Active"
},
"walletType":{
"name":"generic_wallet",
"display_name":"Generic Wallet"
}
"access_keys": {
"Wallet Admin": [
"waka_UggociEGwiYpdRu2ijPGvpZU"
],
"Wallet Invoice": [
"waki_bAOtEllC5NDChqE6OZTUvoW"
],
"Wallet Read": [
"wakr_RuhD3xePPNNhmYG0KIvWxphO"
],
"Wallet LNURL Withdraw": [
"waklw_hG2hQhNiaib1calX6r2gOYX0"
]
}
}
cURL
Node.js
Python
cURL
curl -u sak_XXXXXXX: \
-H "Content-Type: application/json" \
-X POST \
-d '{"user_label":"Tester API Wallet"}' \
https://api.lnpay.co/v1/wallet
Node.js
const lnpay = LNPay({
secretKey: 'sak_XXXXX'
});
const wallet = await lnpay.createWallet({
user_label: 'My Wallet',
});
Python
lnpay_py.initialize('sak_XXXXX')
wallet_params = {
'user_label': 'My wallet'
}
new_wallet = lnpay_py.create_wallet(wallet_params)

The access keys generated will NOT be available via the API again! You must save and store them