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
| Name | In | Type | Description |
|---|---|---|---|
offsetoptional | query | integer | Default: 0 |
limitoptional | query | integer | 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
200Successful Response422Validation Error
Response fields (7)
| Name | Type | Description |
|---|---|---|
customer_idrequired | string (uuid) | |
whmcs_client_idoptional | integer | null | |
sourceoptional | string | Constant — never Payment/Ledger. Default: "whmcs_invoice_archive" |
itemsrequired | array<WhmcsInvoiceArchiveItem> | |
totalrequired | integer | |
offsetoptional | integer | Default: 0 |
limitoptional | 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
200Successful Response
Response fields (11)
| Name | Type | Description |
|---|---|---|
wallet_idoptional | string (uuid) | null | |
owner_typerequired | string | |
owner_idrequired | string (uuid) | |
balance_centsrequired | integer | Available balance in integer cents |
currencyoptional | string | Default: "USD" |
has_walletoptional | boolean | False when no Wallet row exists yet (M2-WALLET-1) -- balance_cents is 0. Default: true |
billing_authorityoptional | string | null | Owner billing authority ('finebilling' | 'whmcs'). WHMCS mirrors surface observed_balance_*; ledger balance_cents stays 0. |
observed_balance_centsoptional | integer | null | Last WHMCS credit observed by whmcs_sync, in cents. |
observed_balance_currencyoptional | string | null | |
observed_balance_synced_atoptional | string (date-time) | null | |
observed_balance_sourceoptional | string | null | Constant '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
| Name | In | Type | Description |
|---|---|---|---|
offsetoptional | query | integer | Default: 0 |
limitoptional | query | integer | Default: 50 |
Example request
curl -X GET "https://fineproxy.org/account_new/api/v1/customer/wallet/ledger" \
-H "Authorization: Bearer $FINEPROXY_API_KEY"Responses
200Successful Response422Validation Error
Response fields (4)
| Name | Type | Description |
|---|---|---|
entriesrequired | array<LedgerEntryResponse> | |
totalrequired | integer | |
offsetoptional | integer | Default: 0 |
limitoptional | 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
200Successful Response
Response fields (1)
| Name | Type | Description |
|---|---|---|
coinsrequired | 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
| Name | In | Type | Description |
|---|---|---|---|
pay_currencyrequired | query | string | |
amount_centsrequired | query | integer |
Example request
curl -X GET "https://fineproxy.org/account_new/api/v1/customer/wallet/deposit/nowpayments/quote" \
-H "Authorization: Bearer $FINEPROXY_API_KEY"Responses
200Successful Response422Validation Error
Response fields (6)
| Name | Type | Description |
|---|---|---|
pay_currencyrequired | string | |
pay_amountrequired | string | |
price_amountrequired | string | |
minimum_usdrequired | string | |
minimum_metrequired | boolean | |
expires_atoptional | 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
| Name | Type | Description |
|---|---|---|
gatewayrequired | string | Payment gateway: stripe | heleket | freekassa | onepayment |
amount_centsrequired | integer | Amount in integer cents |
idempotency_keyoptional | string | null | Optional client-supplied idempotency key |
currencyoptional | string | Default: "USD" |
order_metadataoptional | object (map) | null | Order metadata for order-via-gateway flow |
return_urloptional | string | null | Relative 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_urloptional | string | null | Relative path to redirect user to after successful payment (e.g. /wallet?payment=success). Same restrictions as return_url. |
save_cardoptional | boolean | Save the card for off-session charges and enable auto-top-up (Stripe only; 422 for other gateways). Default: false |
pay_currencyoptional | string | null | Crypto 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
200Successful Response422Validation Error
Response fields (13)
| Name | Type | Description |
|---|---|---|
payment_urlrequired | string | |
our_order_idrequired | string | |
amount_centsrequired | integer | |
currencyoptional | string | Default: "USD" |
provider_tx_idoptional | string | null | |
checkout_kindoptional | string | Default: "redirect" |
pay_addressoptional | string | null | |
pay_amountoptional | string | null | |
pay_currencyoptional | string | null | |
payin_extra_idoptional | string | null | |
payment_idoptional | string | null | |
allowed_payment_methodsoptional | array<string> | null | When 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_centsoptional | integer | null | PayPal 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
| Name | In | Type | Description |
|---|---|---|---|
invoice_idrequired | path | string |
Example request
curl -X GET "https://fineproxy.org/account_new/api/v1/customer/invoices/$INVOICE_ID/pdf" \
-H "Authorization: Bearer $FINEPROXY_API_KEY"Responses
200Successful Response422Validation Error