Quotes & orders
Quote and buy proxy packages, rotating plans and extra IPs. Every paid call is guarded by an expected price.
Base URL: https://fineproxy.org/account_new ·Download the OpenAPI 3.1 specification
Composite Auto Plan
POST/api/v1/billing/composite/auto-plan
Auto-distribute a total IP count across available countries (auto-mix).
Public (no auth required), mirrors /composite/quote — this is a plan-only endpoint with no money involved. The returned segments are meant to be fed straight into /composite/quote for pricing and /composite/order to purchase. excluded_countries accepts ISO-2 codes or tag_ids; use GET /billing/countries for the country list.
Required scope: Any valid API key
Request body
| Name | Type | Description |
|---|---|---|
total_iprequired | integer | Desired total IP count to distribute |
product_kindoptional | string | Product kind discriminator (proxy_datacenter, proxy_isp, proxy_personal) Default: "proxy_datacenter" |
geo_sourceoptional | string | Geo source for country lookupsmaxmind · ripeDefault: "maxmind" |
excluded_countriesoptional | array<integer | string> | Countries to exclude from the auto-mix: ISO 3166-1 alpha-2 codes or vitrine tag_ids |
Example request
curl -X POST "https://fineproxy.org/account_new/api/v1/billing/composite/auto-plan" \
-H "Authorization: Bearer $FINEPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"total_ip": 1
}'Responses
200Successful Response422Validation Error
Response fields (5)
| Name | Type | Description |
|---|---|---|
snapshot_versionrequired | string (uuid) | Vitrine snapshot version used |
segmentsoptional | array<CompositeAutoPlanSegment> | Proposed per-country distribution, summing to total_ip |
total_iprequired | integer | Total IP count across all segments (echoes the request) |
countries_usedrequired | integer | Number of distinct countries in the plan |
subnet_diversityoptional | integer | null | Distinct /24 subnets backing the allocated pool, when countable. Only computable for proxy_isp (pool_ip.cidr24 is known there); for proxy_datacenter/proxy_personal the vitrine snapshot has no IP-address granularity (ipmgr ids only), so this is null and the UI hides the diversification visual rather than showing a fabricated number. |
Composite Quote
POST/api/v1/billing/composite/quote
Produce a non-binding price quote for a composite (multi-segment) mix.
segments[].country accepts an ISO-2 code or a tag_id; use GET /billing/countries for the country list. The response echoes the ISO code per segment as country_code.
Accepts a list of segments [{provider, country, count}] and returns per-segment pricing plus totals. The quote is always advisory (binding=false). Unavailable segments are listed in errors without failing the whole request.
Pricing formula (pricing-model.md §4): total_ip = Σ count_i unit_base = volume_tier(total_ip) segment_price = count_i * unit_base * type_mult * geo_mult(country_i)
PARTNER-QUOTE-1: when a valid customer Bearer is present and the customer has an ACTIVE partner profile with wholesale_discount_percent 1..100, the same percent helper used by /composite/order is applied after retail pricing. Response then exposes retail_* + partner_discount_* fields; anonymous / non-partner quotes keep those fields null and return retail totals.
Required scope: Any valid API key
Request body
| Name | Type | Description |
|---|---|---|
segmentsrequired | array<CompositeSegmentRequestIn> | One or more segments forming the mix |
product_kindoptional | string | Product kind discriminator (proxy_datacenter, proxy_isp, proxy_personal) Default: "proxy_datacenter" |
geo_multipliersoptional | object (map) | null | Deprecated, must be null or {}: geo multipliers come from the tenant tariff only. A non-empty value is rejected with 422. |
period_monthsoptional | integer | Billing period length in months (1/3/6/12). Drives the volume discount. Default 1 = no discount. Default: 1 |
geo_sourceoptional | string | Geo source for country lookups: maxmind (geolocation) or ripe (RIR allocation). Default maxmind.maxmind · ripeDefault: "maxmind" |
promo_codeoptional | string | null | Optional tenant-scoped promo code. Applied after volume/period pricing; quote validates global rules only (active/window/max_uses). |
trialoptional | boolean | : price as a paid probe instead of a full period_months charge. Default: false |
extra_whitelist_countoptional | integer | Pre-purchase paid whitelist slots beyond the free quota. Included in monthly_price_cents before order. Default: 0 |
udp_unlockoptional | boolean | Pre-purchase UDP unlock add-on (percent-of-base). Included in monthly_price_cents before order. Default: false |
extra_connections_countoptional | integer | Pre-purchase paid extra concurrent connections. Included in monthly_price_cents before order. Default: 0 |
Example request
curl -X POST "https://fineproxy.org/account_new/api/v1/billing/composite/quote" \
-H "Authorization: Bearer $FINEPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"segments": [
{
"country": 1,
"count": 1
}
]
}'Responses
200Successful Response422Validation Error
Response fields (28)
| Name | Type | Description |
|---|---|---|
snapshot_versionrequired | string (uuid) | Vitrine snapshot version used |
built_atoptional | string (date-time) | null | UTC timestamp when the snapshot was built (for freshness display) |
bindingoptional | boolean | Always false — quotation is non-binding Default: false |
segmentsoptional | array<CompositeSegmentQuote> | Per-segment pricing breakdown |
errorsoptional | array<CompositeQuoteError> | Errors for unavailable/invalid segments |
total_ipoptional | integer | Total IP count across all valid segments Default: 0 |
total_price_centsoptional | integer | Discounted total charged for the full period in integer cents. Equals monthly_price_cents x period_months x (1 - discount). Default: 0 |
unit_base_centsoptional | integer | Volume-tier base unit price applied (cents per IP) Default: 0 |
period_monthsoptional | integer | Billing period length in months (1/3/6/12) Default: 1 |
discount_pctoptional | integer | PERIOD discount only, as a whole percentage. Does NOT include the volume discount; see volume_discount_pct for that. Default: 0 |
volume_discount_pctoptional | integer | VOLUME discount only: the resolved volume tier's price vs. the base (lowest-count) tier's price, as a whole percentage. Purely for display — the actual charge always derives from the resolved tier's price_millicents_per_ip, independent of this field. Does NOT include the period discount; see discount_pct for that. The two discounts are independent and both apply to total_price_cents. Default: 0 |
monthly_price_centsoptional | integer | Undiscounted monthly total (sum of segment prices) in integer cents Default: 0 |
retail_total_price_centsoptional | integer | null | Pre-partner retail total for the full period in integer cents. Set only when an ACTIVE partner percent discount was applied; null for anonymous / non-partner quotes. |
retail_monthly_price_centsoptional | integer | null | Pre-partner retail monthly total in integer cents. Null when no partner discount applied. |
partner_discount_percentoptional | integer | null | ACTIVE partner wholesale_discount_percent applied to this quote (1..100). Null when no partner discount. |
partner_discount_centsoptional | integer | null | Absolute partner savings on the period total in integer cents (retail_total − total_price_cents, before promo). Null when no partner discount. |
promo_code_appliedoptional | string | null | Normalised (upper-case) promo code applied to this quote, if any. |
promo_discount_centsoptional | integer | Absolute promo discount in integer cents applied to total_price_cents. Default: 0 |
total_before_promo_centsoptional | integer | null | Pre-promo total in integer cents when a promo was applied; null when no promo. |
trialoptional | boolean | True when this quote was priced as a trial probe. Default: false |
trial_period_daysoptional | integer | null | Probe length in days when trial=True; null otherwise. |
trial_coefficientoptional | number | null | Tariff coefficient applied when trial=True; null otherwise. |
addon_monthly_centsoptional | integer | Monthly cents from pre-purchase add-ons (whitelist + UDP + connections). Default: 0 |
addon_breakdownoptional | array<AddonBreakdownItem> | Per-addon monthly line-items. Sum of monthly_cents equals addon_monthly_cents. |
trial_price_centsoptional | integer | null | Probe charge in integer cents when trial=True (equals total_price_cents before promo). Null when trial=False. |
extra_whitelist_countoptional | integer | Paid whitelist slots included in this quote. Default: 0 |
extra_connections_countoptional | integer | Pre-purchase extra concurrent connections included in this quote. Default: 0 |
udp_unlockoptional | boolean | Whether UDP unlock was included in this quote. Default: false |
Composite Order
POST/api/v1/billing/composite/order
Create a single service from a composite (multi-segment) mix.
segments[].country accepts an ISO-2 code or a tag_id; use GET /billing/countries for the country list.
Validates availability of every segment via the vitrine, computes the composite price, charges the wallet, and creates a unified Service with the mix segments stored in Service.params.
Idempotent per idempotency_key: a new key buys a new service even when an identical one exists; the same key replays the service it created without a second charge; the same key with a different order is 409 IDEMPOTENCY_KEY_REUSED. Keyless orders with the same owner + segments return the existing service without double-charging.
Required scope: Any valid API key
Request body
| Name | Type | Description |
|---|---|---|
product_idoptional | string (uuid) | null | Product to use as template (kind/billing_model). Segments override the IP allocation. When None, the server resolves by product_kind (F1). |
segmentsrequired | array<CompositeSegmentRequestIn> | One or more segments forming the mix |
product_kindoptional | string | Product kind discriminator (proxy_datacenter, proxy_isp, proxy_personal) Default: "proxy_datacenter" |
geo_multipliersoptional | object (map) | null | Deprecated, must be null or {}: geo multipliers come from the tenant tariff only. A non-empty value is rejected with 422. |
period_monthsoptional | integer | Billing period length in months (1/3/6/12). Drives the volume discount and is re-priced server-side. Default 1 = no discount. Default: 1 |
whitelist_ipsoptional | array<string> | IP/CIDR entries to whitelist at order time. Mandatory for proxy product kinds: a proxy composite order without at least one whitelist IP is rejected with 422 before any wallet charge. |
auto_renewoptional | boolean | Auto-renew the resulting service on expiry. Default True — matches the non-composite ServiceCreateRequest default. Trial and WHMCS-mirrored services never go through this flag (they set is_auto_renew explicitly on the Service model instead). Default: true |
use_balanceoptional | boolean | Spend from wallet balance first. Default OFF — all money via gateway. Default: false |
geo_sourceoptional | string | Geo source for country lookups: maxmind (geolocation) or ripe (RIR allocation). Default maxmind.maxmind · ripeDefault: "maxmind" |
idempotency_keyoptional | string | null | Client purchase-intent key. A new key buys a new service even when an identical one exists; the same key replays the order it created (no second charge); the same key with a different order is rejected with 409 IDEMPOTENCY_KEY_REUSED. Without a key, an identical live order is returned instead of a new one. |
promo_codeoptional | string | null | Optional tenant-scoped promo code. Discount is applied before the service price snapshot is written; renewals never re-apply it. |
trialoptional | boolean | : order as a paid probe. Sets Service.is_trial, expires_at=now+period_days, charge=daily×days×coefficient. Default: false |
extra_whitelist_countoptional | integer | Pre-purchase paid whitelist slots beyond free quota. Price is included in monthly_price_cents / charge. Default: 0 |
udp_unlockoptional | boolean | Pre-purchase UDP unlock. Price included in monthly_price_cents / charge. Default: false |
extra_connections_countoptional | integer | Pre-purchase paid extra concurrent connections. Price included in monthly_price_cents / charge. Default: 0 |
Example request
curl -X POST "https://fineproxy.org/account_new/api/v1/billing/composite/order" \
-H "Authorization: Bearer $FINEPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"segments": [
{
"country": 1,
"count": 1
}
]
}'Responses
201Successful Response422Validation Error
Response fields (19)
| Name | Type | Description |
|---|---|---|
service_idrequired | string (uuid) | Created service ID |
statusrequired | string | Service status (active, pending, …) |
segmentsoptional | array<CompositeSegmentQuote> | Per-segment breakdown as ordered |
total_iprequired | integer | |
total_price_centsrequired | integer | Discounted total charged for the full period in integer cents |
period_monthsoptional | integer | Billing period length in months (1/3/6/12) Default: 1 |
discount_pctoptional | integer | Applied period discount as a whole percentage (0/10/15/20) Default: 0 |
monthly_price_centsoptional | integer | Undiscounted monthly total (sum of segment prices) in integer cents Default: 0 |
balance_applied_centsoptional | integer | Amount covered by wallet balance in integer cents. Zero when use_balance=False. Default: 0 |
amount_due_centsoptional | integer | Amount to pay via gateway in integer cents. Zero = fully covered by balance. Default: 0 |
invoice_urloptional | string | null | |
payment_requiredoptional | boolean | Default: false |
intent_idoptional | string (uuid) | null | |
promo_code_appliedoptional | string | null | Normalised promo code applied at order time, if any (BL-4). |
promo_discount_centsoptional | integer | Absolute promo discount fixed into the price snapshot (cents). Default: 0 |
total_before_promo_centsoptional | integer | null | Pre-promo total when a promo was applied; null otherwise. |
trialoptional | boolean | True when the created service is a trial probe (is_trial). Default: false |
trial_period_daysoptional | integer | null | Probe length in days when trial=True; null otherwise. |
addon_monthly_centsoptional | integer | Monthly cents from pre-purchase add-ons baked into the snapshot. Default: 0 |
Get Add Ips Quote
POST/api/v1/billing/services/{service_id}/add-ips/quote
Preview an IP top-up for an active composite service.
segments[].country accepts an ISO-2 code or a tag_id; use GET /billing/countries for the country list (resolved against the service's own geo_source). Returns the prorated charge for the remainder of the current billing period plus the new (bumped) renewal price. No wallet or provisioning side effects.
Required scope: Any valid API key
Parameters
| Name | In | Type | Description |
|---|---|---|---|
service_idrequired | path | string (uuid) |
Request body
| Name | Type | Description |
|---|---|---|
segmentsrequired | array<AddIpsSegmentRequestIn> | One or more segments to add |
Example request
curl -X POST "https://fineproxy.org/account_new/api/v1/billing/services/$SERVICE_ID/add-ips/quote" \
-H "Authorization: Bearer $FINEPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"segments": [
{
"country": 1,
"count": 1
}
]
}'Responses
200Successful Response422Validation Error
Response fields (10)
| Name | Type | Description |
|---|---|---|
service_idrequired | string (uuid) | |
segmentsoptional | array<CompositeSegmentQuote> | Per-segment pricing breakdown for the added IPs |
errorsoptional | array<CompositeQuoteError> | Unavailable/invalid segments (409 at order time) |
added_ip_countrequired | integer | Total IPs across the added segments |
monthly_price_added_centsrequired | integer | Undiscounted full-monthly cost of the added segments |
days_remainingrequired | integer | Days left until Service.expires_at |
days_per_monthoptional | integer | Denominator used for proration Default: 30 |
prorated_charge_centsrequired | integer | Amount charged now for the remainder of the current period |
current_price_centsrequired | integer | Service's current full-period renewal price |
new_renewal_price_centsrequired | integer | Renewal price after this top-up (current + added segments' full-period cost) |
Add Ips
POST/api/v1/billing/services/{service_id}/add-ips
Buy additional IPs into an already-active composite service.
segments[].country accepts an ISO-2 code or a tag_id; use GET /billing/countries for the country list (resolved against the service's own geo_source).
Re-quotes the requested segments against current availability, charges the wallet for the prorated remainder of the current period, provisions the IPs into the existing service, and bumps the renewal price for future periods. Idempotent on body.idempotency_key.
Required scope: Any valid API key
Parameters
| Name | In | Type | Description |
|---|---|---|---|
service_idrequired | path | string (uuid) |
Request body
| Name | Type | Description |
|---|---|---|
segmentsrequired | array<AddIpsSegmentRequestIn> | One or more segments to add |
idempotency_keyrequired | string | Client-supplied idempotency key. Must be unique per intent. |
expected_charge_centsoptional | integer | null | Amount the client confirmed for this top-up, in integer cents (§D5). Mandatory for a dedicated service (422 `price_confirmation_required` when absent, 409 `price_changed` on mismatch); optional for composite, where it is checked against the freshly quoted amount when present. |
Example request
curl -X POST "https://fineproxy.org/account_new/api/v1/billing/services/$SERVICE_ID/add-ips" \
-H "Authorization: Bearer $FINEPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"segments": [
{
"country": 1,
"count": 1
}
],
"idempotency_key": "string"
}'Responses
200Successful Response422Validation Error
Response fields (7)
| Name | Type | Description |
|---|---|---|
service_idrequired | string (uuid) | |
added_ip_countrequired | integer | |
charged_centsrequired | integer | Prorated amount charged to the wallet |
ledger_entry_idoptional | string (uuid) | null | Ledger entry for the charge; None when charge was 0 |
new_total_iprequired | integer | Total IP count on the service after the top-up |
new_price_centsrequired | integer | Service's new full-period renewal price |
segmentsoptional | array<object (map)> | Full merged segment list stored on Service.params |
Create Service
POST/api/v1/customer/services
Purchase a new service, paying from your wallet balance.
Resolves the retail price, charges the wallet, provisions the service and returns it. Idempotent: repeated calls with the same product and params return the existing service without charging again.
Required scope: services:write
Request body
| Name | Type | Description |
|---|---|---|
product_idrequired | string (uuid) | |
paramsoptional | object (map) | null | Order parameters. Only whitelist_ips, billing_period_months (1/3/6/12/24/36) and client_idempotency_key are accepted; any other key → 422 before any wallet debit. |
auto_renewoptional | boolean | Default: true |
expected_price_centsoptional | integer | null | Authoritative price confirmation in integer cents. Required for billing-only products: mismatch or omission → 409 before any wallet debit. Ignored for other product kinds. |
Example request
curl -X POST "https://fineproxy.org/account_new/api/v1/customer/services" \
-H "Authorization: Bearer $FINEPROXY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"product_id": "00000000-0000-0000-0000-000000000000"
}'Responses
201Successful Response422Validation Error
Response fields (2)
| Name | Type | Description |
|---|---|---|
servicerequired | ServiceResponse | |
invoice_urloptional | string | null |