Account & billing
Top-ups
Create deposit invoices and top up your balance from the API. You can pay with Bitcoin (Lightning), Bitcoin (on-chain), Monero, Litecoin or Liquid Bitcoin.
Base URL
https:/ / api.ppq.aiPOST /topup/create/{method}
Create a top-up invoice for a payment method. Authenticate with your API key, either as Authorization: Bearer <api_key> or in the api-key header.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
method | string | Yes |
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | Amount in currency, within the method's limits. |
currency | string | No | A currency the method supports (see Limits). Default: "USD". |
Example: Lightning
import requests
api_key = "YOUR_API_KEY"
url = "https://api.ppq.ai/topup/create/btc-lightning"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"
}
data = {
"amount": 25.00,
"currency": "USD"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())Example: Bitcoin on-chain
import requests
api_key = "YOUR_API_KEY"
url = "https://api.ppq.ai/topup/create/btc"
headers = {
"Content-Type": "application/json",
"api-key": api_key
}
data = {
"amount": 0.001,
"currency": "BTC"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())Example: Monero
import requests
api_key = "YOUR_API_KEY"
url = "https://api.ppq.ai/topup/create/xmr"
headers = {
"Content-Type": "application/json",
"Authorization": f"Bearer {api_key}"
}
data = {
"amount": 50.00,
"currency": "USD"
}
response = requests.post(url, json=data, headers=headers)
print(response.json())GET /topup/status/{invoice_id}
Check the status of a top-up invoice. Authenticate with your API key.
Example
import requests
api_key = "YOUR_API_KEY"
invoice_id = "BTCPayInvoiceId123"
url = f"https://api.ppq.ai/topup/status/{invoice_id}"
headers = {
"Authorization": f"Bearer {api_key}"
}
response = requests.get(url, headers=headers)
print(response.json())GET /topup/payment-methods
List the supported payment methods with their currencies and limits. No authentication needed.
Example
import requests
url = "https://api.ppq.ai/topup/payment-methods"
response = requests.get(url)
print(response.json())POST /accounts/create
Create a new account. The response contains its new credit_id and an api_key. No authentication needed.
Example
import requests
url = "https://api.ppq.ai/accounts/create"
response = requests.post(url)
print(response.json())POST /credits/balance
Get the current credit balance of your account. Authenticate with your credit ID in the request body, or with your API key as Authorization: Bearer <api_key> or in the api-key header.
Example
import requests
credit_id = "4af59b9d-f6ec-4531-82f7-ce776d49e207"
url = "https://api.ppq.ai/credits/balance"
headers = {
"Content-Type": "application/json"
}
data = {
"credit_id": credit_id
}
response = requests.post(url, json=data, headers=headers)
print(response.json())Limits
| Method | Network | Currencies and limits | Invoice expires after |
|---|---|---|---|
btc-lightning | Bitcoin Lightning | USD: $0.10–$1,000 BTC: 0.000001–0.01 SATS: 100–1,000,000 | 15 minutes |
btc | Bitcoin on-chain | USD: $10–$10,000 BTC: 0.0001–0.01 | 60 minutes |
ltc | Litecoin | USD: $2–$1,000 LTC: 0.03–100 | 60 minutes |
lbtc | Liquid Bitcoin | USD: $2–$10,000 LBTC: 0.00005–0.1 | 60 minutes |
xmr | Monero | USD: $5–$10,000 XMR: 0.01–50 | 60 minutes |
Lightning (btc-lightning) top-ups get a 5% Lightning fee bonus.