NEW! |One API call, clean data back. No scrapers needed.Get 10,000 Free Tokens →

Wallet & invoices

Balance, ledger, deposits and invoices. All amounts are integer cents.

Base URL: https://fineproxy.org/account_new ·Download the OpenAPI 3.1 specification

List Whmcs Invoices

GET/api/v1/customer/me/whmcs-invoices

Read-only WHMCS invoice history.

Required scope: customer:read

Parameters

NameInTypeDescription
offset
optional
queryinteger
Default: 0
limit
optional
queryinteger
Default: 50

Example request

curl -X GET "https://fineproxy.org/account_new/api/v1/customer/me/whmcs-invoices" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY"

Responses

  • 200 Successful Response
  • 422 Validation Error
Response fields (7)
NameTypeDescription
customer_id
required
string (uuid)
whmcs_client_id
optional
integer | null
source
optional
stringConstant — never Payment/Ledger.
Default: "whmcs_invoice_archive"
items
required
array<WhmcsInvoiceArchiveItem>
total
required
integer
offset
optional
integer
Default: 0
limit
optional
integer
Default: 50

Get Balance

GET/api/v1/customer/wallet/balance

Get your prepaid wallet balance.

The balance is computed from the append-only transaction ledger.

M2-WALLET-1: this is a pure read -- it never auto-creates a Wallet row. An account with no wallet (e.g. a WHMCS-mirror account, or a finebilling-native account that has never deposited) reports balance_cents=0 / has_wallet=False synthetically; get_or_create_wallet is reserved for actual money-mutation call sites, which are already gated by has_finebilling_authority.

Required scope: wallet:read

Example request

curl -X GET "https://fineproxy.org/account_new/api/v1/customer/wallet/balance" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY"

Responses

  • 200 Successful Response
Response fields (11)
NameTypeDescription
wallet_id
optional
string (uuid) | null
owner_type
required
string
owner_id
required
string (uuid)
balance_cents
required
integerAvailable balance in integer cents
currency
optional
string
Default: "USD"
has_wallet
optional
booleanFalse when no Wallet row exists yet (M2-WALLET-1) -- balance_cents is 0.
Default: true
billing_authority
optional
string | nullOwner billing authority ('finebilling' | 'whmcs'). WHMCS mirrors surface observed_balance_*; ledger balance_cents stays 0.
observed_balance_cents
optional
integer | nullLast WHMCS credit observed by whmcs_sync, in cents.
observed_balance_currency
optional
string | null
observed_balance_synced_at
optional
string (date-time) | null
observed_balance_source
optional
string | nullConstant 'whmcs_observed' when an observed balance exists.

List Ledger

GET/api/v1/customer/wallet/ledger

List wallet transactions (paginated, newest first).

Entries linked to a specific service carry its service_id.

Required scope: wallet:read

Parameters

NameInTypeDescription
offset
optional
queryinteger
Default: 0
limit
optional
queryinteger
Default: 50

Example request

curl -X GET "https://fineproxy.org/account_new/api/v1/customer/wallet/ledger" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY"

Responses

  • 200 Successful Response
  • 422 Validation Error
Response fields (4)
NameTypeDescription
entries
required
array<LedgerEntryResponse>
total
required
integer
offset
optional
integer
Default: 0
limit
optional
integer
Default: 50

List Nowpayments Coins

GET/api/v1/customer/wallet/deposit/nowpayments/coins

Coins/networks allowed for a NOWPayments top-up.

Same backend-only catalog as the cabinet: merchant list ∩ static native intake policy. Requires wallet:read; no money moves.

Required scope: wallet:read

Example request

curl -X GET "https://fineproxy.org/account_new/api/v1/customer/wallet/deposit/nowpayments/coins" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY"

Responses

  • 200 Successful Response
Response fields (1)
NameTypeDescription
coins
required
array<NowPaymentsCoinItem>

Get Nowpayments Quote

GET/api/v1/customer/wallet/deposit/nowpayments/quote

Read-only NOWPayments quote for one ticker.

Same tenant/gateway checks as the coins catalog; no Payment is created. Provider GETs run after the read txn is committed. Below-minimum is advisory (minimum_met=false), provider failure is 503.

Required scope: Any valid API key

Parameters

NameInTypeDescription
pay_currency
required
querystring
amount_cents
required
queryinteger

Example request

curl -X GET "https://fineproxy.org/account_new/api/v1/customer/wallet/deposit/nowpayments/quote" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY"

Responses

  • 200 Successful Response
  • 422 Validation Error
Response fields (6)
NameTypeDescription
pay_currency
required
string
pay_amount
required
string
price_amount
required
string
minimum_usd
required
string
minimum_met
required
boolean
expires_at
optional
string (date-time) | null

Init Deposit

POST/api/v1/customer/wallet/deposit/init

Initiate a wallet top-up via a payment gateway.

Returns a checkout URL to complete the payment. The wallet is credited only after the payment provider confirms the transaction — poll the ledger to observe the credit. Supply idempotency_key to make retries safe: a repeated call with the same key returns the original payment instead of creating a new one.

When the gateway requires KYC and the customer has not passed it, responds with HTTP 403 and detail.error = "kyc_required" — no Payment row is created. Webhook credit for already-created payments is unaffected.

Required scope: wallet:deposit

Request body

NameTypeDescription
gateway
required
stringPayment gateway: stripe | heleket | freekassa | onepayment
amount_cents
required
integerAmount in integer cents
idempotency_key
optional
string | nullOptional client-supplied idempotency key
currency
optional
string
Default: "USD"
order_metadata
optional
object (map) | nullOrder metadata for order-via-gateway flow
return_url
optional
string | nullRelative path to redirect user to after cancelled/failed payment (e.g. /wallet). Must start with '/' and not contain '://'. Server prepends scheme+host. Prevents open-redirect.
success_url
optional
string | nullRelative path to redirect user to after successful payment (e.g. /wallet?payment=success). Same restrictions as return_url.
save_card
optional
booleanSave the card for off-session charges and enable auto-top-up (Stripe only; 422 for other gateways).
Default: false
pay_currency
optional
string | nullCrypto ticker for the invoice (NOWPayments only; the network is encoded in the ticker, e.g. usdttrc20). Required for a new NOWPayments invoice; rejected for every other gateway.

Example request

curl -X POST "https://fineproxy.org/account_new/api/v1/customer/wallet/deposit/init" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "gateway": "string",
    "amount_cents": 1200
  }'

Responses

  • 200 Successful Response
  • 422 Validation Error
Response fields (13)
NameTypeDescription
payment_url
required
string
our_order_id
required
string
amount_cents
required
integer
currency
optional
string
Default: "USD"
provider_tx_id
optional
string | null
checkout_kind
optional
string
Default: "redirect"
pay_address
optional
string | null
pay_amount
optional
string | null
pay_currency
optional
string | null
payin_extra_id
optional
string | null
payment_id
optional
string | null
allowed_payment_methods
optional
array<string> | nullWhen set, the Paddle.js overlay must restrict payment methods to these (e.g. ['card']) — the newcomer PayPal limit has no headroom for this amount. Null = no restriction.
paypal_remaining_cents
optional
integer | nullPayPal headroom left for an immature account, in cents (limit minus already-paid gross PayPal). Null = unrestricted / not a Paddle deposit.

Download the PDF for a specific invoice

GET/api/v1/customer/invoices/{invoice_id}/pdf

Stream the Lago-generated PDF for a single invoice.

Same ownership-checked streaming logic as the cabinet download button (client_billing.download_invoice_pdf) — usable with the same Authorization: Bearer fb_... key an agent already holds, so the MCP list_invoices/get_invoice tools can point straight at this URL.

Required scope: wallet:read

Parameters

NameInTypeDescription
invoice_id
required
pathstring

Example request

curl -X GET "https://fineproxy.org/account_new/api/v1/customer/invoices/$INVOICE_ID/pdf" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY"

Responses

  • 200 Successful Response
  • 422 Validation Error