Appearance
Billing ​
Base URL:
https://your-domain.com/api/v1
Read-only payment/invoice/balance data. Requires HTTP Basic Auth.
Payments ​
Payment history ​
GET /api/v1/payment/list — Filters: user_id, method, paytype, date_from, date_to, limit, offset.
- 200:
json
[ { "id": 1, "user_id": 1024, "amount": 1200, "method": "1", "payment_type": "1", "note": "…",
"trxid": "…", "saletime": "…", "received_by": "…", "created_by": "…" } ]Get payment ​
GET /api/v1/payment/get/{id} — Single payment. 404 if not found.
Subscriber balance / due ​
GET /api/v1/payment/due/{user_id} — Ledger balance + current expiry.
- 200:
json
{ "user_id": 1024, "username": "john123", "ledger_balance": 0, "amount_due": 0,
"current_expiry": "2026-08-01 23:59:59" }ledger_balance positive = credit/advance, negative = owed (amount_due is the absolute owed value).
Invoices ​
List invoices ​
GET /api/v1/invoice/list — Filters: user_id, status, date_from, date_to, limit, offset.
- 200:
json
[ { "id": 90211, "user_id": 1024, "package_id": 5, "total": 1200, "status": 1,
"created_date": "…", "due_date": "…", "new_expiration": "…", "discount": 0, "tax_amount": 0 } ]Get invoice ​
GET /api/v1/invoice/get/{id} — Single invoice. 404 if not found.
