Create Wallet
post
https://api.lnpay.co/
v1/wallet
PostCreateWallet
Deterministic identifiers are useful for generating wallet ID's that you can query later without having to actually store the generated wallet ID. This requires an "Org ID" which can be found in the LNPay dashboard (click gear icon).
Wallets generated with a deterministic ID will start with
walx_
Duplicate IDs will be rejected, and wallet creation will fail!
Deterministic Function:
'walx_' + substr(sha256(concat($deterministic_identifier,$org_id)),0,14)
$deterministic_identifier = '123e4567-e89b-12d3-a456-426614174000';
$org_id = 'org_qGTlAe';
Result:
walx_f922c5f8bc2151
cURL
Node.js
Python
curl -u sak_XXXXXXX: \
-H "Content-Type: application/json" \
-X POST \
-d '{"user_label":"Tester API Wallet"}' \
https://api.lnpay.co/v1/wallet
const lnpay = LNPay({
secretKey: 'sak_XXXXX'
});
const wallet = await lnpay.createWallet({
user_label: 'My Wallet',
});
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
Last modified 25d ago