curl -X POST https://api.saturn-pay.com/v1/wallet/fund \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"amountSats": 10000
}'
const response = await fetch('https://api.saturn-pay.com/v1/wallet/fund', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({ amountSats: 10000 })
});
const invoice = await response.json();
console.log('Pay this invoice:', invoice.paymentRequest);
import requests
response = requests.post(
'https://api.saturn-pay.com/v1/wallet/fund',
headers={'Authorization': 'Bearer sk_agt_...'},
json={'amountSats': 10000}
)
invoice = response.json()
print('Pay this invoice:', invoice['paymentRequest'])
{
"paymentRequest": "lnbc100u1p3h9j2xpp5...",
"paymentHash": "abc123def456...",
"amountSats": 10000,
"expiresAt": "2024-01-20T16:00:00Z"
}
Wallets
Fund via Lightning
Create a Lightning invoice to fund wallet
POST
/
v1
/
wallet
/
fund
curl -X POST https://api.saturn-pay.com/v1/wallet/fund \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"amountSats": 10000
}'
const response = await fetch('https://api.saturn-pay.com/v1/wallet/fund', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({ amountSats: 10000 })
});
const invoice = await response.json();
console.log('Pay this invoice:', invoice.paymentRequest);
import requests
response = requests.post(
'https://api.saturn-pay.com/v1/wallet/fund',
headers={'Authorization': 'Bearer sk_agt_...'},
json={'amountSats': 10000}
)
invoice = response.json()
print('Pay this invoice:', invoice['paymentRequest'])
{
"paymentRequest": "lnbc100u1p3h9j2xpp5...",
"paymentHash": "abc123def456...",
"amountSats": 10000,
"expiresAt": "2024-01-20T16:00:00Z"
}
Creates a Lightning Network invoice that, when paid, will credit your wallet with the specified amount of satoshis.
Request
number
required
Amount in satoshis to add to wallet
Response
string
Lightning invoice (BOLT11 format). Pay this with any Lightning wallet.
string
Payment hash for tracking
number
Invoice amount in satoshis
string
ISO 8601 timestamp when invoice expires
curl -X POST https://api.saturn-pay.com/v1/wallet/fund \
-H "Authorization: Bearer sk_agt_..." \
-H "Content-Type: application/json" \
-d '{
"amountSats": 10000
}'
const response = await fetch('https://api.saturn-pay.com/v1/wallet/fund', {
method: 'POST',
headers: {
'Authorization': 'Bearer sk_agt_...',
'Content-Type': 'application/json'
},
body: JSON.stringify({ amountSats: 10000 })
});
const invoice = await response.json();
console.log('Pay this invoice:', invoice.paymentRequest);
import requests
response = requests.post(
'https://api.saturn-pay.com/v1/wallet/fund',
headers={'Authorization': 'Bearer sk_agt_...'},
json={'amountSats': 10000}
)
invoice = response.json()
print('Pay this invoice:', invoice['paymentRequest'])
{
"paymentRequest": "lnbc100u1p3h9j2xpp5...",
"paymentHash": "abc123def456...",
"amountSats": 10000,
"expiresAt": "2024-01-20T16:00:00Z"
}
Notes
- Invoice expires after 1 hour
- Credits are added instantly when payment is received
- No minimum amount
- No fees charged by Saturn (you pay Lightning routing fees)