Skip to content

Invoices

SDK Reference · Resource

Invoices

Create purchases and inspect invoices, payment links, and receipts.

method

list()

List invoices

Returns invoices visible to the authenticated account. Resellers and administrators can filter by an accessible user.

Signature

Promiseclient.invoices.list(options: InvoicesListOptions = {}): Promise<InvoicesListResponse>

Parameters

NameTypeRequirementDescription
gatewaystringOptionalThe payment gateway used for processing the payment. * `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual * `whitepay` - Whitepay * `wayforpay` - WayForPay * `usegateway` - UseGateway * `binance` - Binance Pay * `anymoney` - Any.Money * `coinpayments` - CoinPayments * `checkoutcom` - Checkout.com * `nowpayments` - NOWPayments * `btcpay` - BTCPay Server * `braintree` - Braintree * `monobank` - monobank * `liqpay` - LiqPay * `iyzico` - iyzico * `paytr` - PayTR * `payu` - PayU * `tpay` - Tpay * `przelewy24` - Przelewy24 * `gopay` - GoPay * `comgate` - Comgate * `monei` - MONEI * `redsys` - Redsys * `payplug` - PayPlug * `mollie` - Mollie * `unzer` - Unzer * `payone` - PAYONE * `nexi_xpay` - Nexi XPay * `halyk_epay` - Halyk ePay * `kaspi_pay` - Kaspi Pay * `vipps_mobilepay` - Vipps MobilePay * `paytrail` - Paytrail
internalIdstringOptional—
limitnumberOptionalNumber of results to return per page.
offsetnumberOptionalThe initial index from which to return the results.
orderingstringOptionalWhich field to use when ordering the results.
packageIdstringOptional—
searchstringOptionalCase-insensitive partial search across Invoice fields: `id`, `internal_id`, and `user.email`. Separate multiple terms with spaces or commas; every term must match at least one listed field.
statusstringOptionalAfter changing invoice status to PAID, the invoice will be processed and user package created in case none exists. If you need to cancel the invoice, make sure to subtract data from the user package after changing the invoice status. Changing the status from PAID to any other will not affect the user package's data or proxies. * `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error` - Error
typestringOptionalThe type of invoice, indicating the type of proxy service. Options include: RESIDENTIAL: Residential proxies. STATIC: Static proxies. * `static` - Static * `residential` - Residential * `balance` - Balance
userEmailstringOptional—
userIdstringOptional—
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.invoices.list();

Returns

PaginatedInvoiceReadList

The operation completed successfully.

typePaginatedInvoiceReadList4fields
count
number
Required
—
next
string
Optional
—
previous
string
Optional
—
results
InvoiceRead[]
Required
—
typeInvoiceRead39fields

Full invoice in package-based deployments; short invoice otherwise. Invoice creation always returns the full Invoice representation.

id
string
Optional
—
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
country
Country
Required
—
typeCountry6fields
id
string
Optional
—
code
string
Required
Two-letter ISO 3166-1 alpha-2 country code. Must be unique. us de fr
name
string
Required
English display name of the country used across the admin and API responses.
original_name
string
Optional
Native-language name of the country as it appears in the source data. Deutschland Français
isps
LocationCodeName[]
Required
—
typeLocationCodeName2fields
code
string
Required
—
name
string
Required
—
asns
LocationCodeName[]
Required
The asns field is always present and defaults to an empty array. Pass include_asns=true to include available autonomous system numbers. This option does not affect the standalone /locations/asn endpoint or the compact proxy-node response format.
typeLocationCodeName2fields
code
string
Required
—
name
string
Required
—
user_id
string
Required
—
coupon
Coupon
Required
—
typeCoupon16fields
id
string
Optional
—
redeemed_count
number
Required
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
stats
CouponStats
Required
—
typeCouponStats5fields
total_redeems
number
Required
—
unique_users
number
Required
—
total_revenue
number
Required
—
total_discount_given
number
Required
—
total_data_given
number
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
payment_amount
number
Required
—
payment_currency
string
Required
—
fx_market_rate
string
Required
—
fx_effective_rate
string
Required
—
fx_markup_percent
string
Required
—
fx_quoted_at
string
Required
—
updated
string
Required
—
created
string
Required
—
type
InvoiceTypeEnum
Optional
The type of invoice, indicating the type of proxy service. Options include: RESIDENTIAL: Residential proxies. STATIC: Static proxies. * `static` - Static * `residential` - Residential * `balance` - Balance
enumInvoiceTypeEnum0fields

* `static` - Static * `residential` - Residential * `balance` - Balance

No fields.

is_one_time
boolean
Optional
Indicates whether this invoice is for a one-time purchase. Default is False, meaning it is a recurring invoice.
is_payout
boolean
Optional
Indicates whether this invoice is a payout to the marketer. Default is False.
internal_id
string
Optional
A unique identifier for the invoice, generated automatically.
status
InvoiceStatusEnum
Optional
After changing invoice status to PAID, the invoice will be processed and user package created in case none exists. If you need to cancel the invoice, make sure to subtract data from the user package after changing the invoice status. Changing the status from PAID to any other will not affect the user package's data or proxies. * `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error` - Error
enumInvoiceStatusEnum0fields

* `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error` - Error

No fields.

description
string
Optional
A description of the invoice. This field is optional and can be left blank.
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
quantity
number
Optional
The number of proxies to assign.
data
number
Optional
The amount of data in bytes.
balance
number
Optional
The balance to top up for the user. Must be zero or positive.
price_total
number
Optional
The total price of the invoice, including any discounts. Must be at least 1 cent.
gateway
InvoiceGatewayEnum
Optional
The payment gateway used for processing the payment. * `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual * `whitepay` - Whitepay * `wayforpay` - WayForPay * `usegateway` - UseGateway * `binance` - Binance Pay * `anymoney` - Any.Money * `coinpayments` - CoinPayments * `checkoutcom` - Checkout.com * `nowpayments` - NOWPayments * `btcpay` - BTCPay Server * `braintree` - Braintree * `monobank` - monobank * `liqpay` - LiqPay * `iyzico` - iyzico * `paytr` - PayTR * `payu` - PayU * `tpay` - Tpay * `przelewy24` - Przelewy24 * `gopay` - GoPay * `comgate` - Comgate * `monei` - MONEI * `redsys` - Redsys * `payplug` - PayPlug * `mollie` - Mollie * `unzer` - Unzer * `payone` - PAYONE * `nexi_xpay` - Nexi XPay * `halyk_epay` - Halyk ePay * `kaspi_pay` - Kaspi Pay * `vipps_mobilepay` - Vipps MobilePay * `paytrail` - Paytrail
enumInvoiceGatewayEnum0fields

* `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual * `whitepay` - Whitepay * `wayforpay` - WayForPay * `usegateway` - UseGateway * `binance` - Binance Pay * `anymoney` - Any.Money * `coinpayments` - CoinPayments * `checkoutcom` - Checkout.com * `nowpayments` - NOWPayments * `btcpay` - BTCPay Server * `braintree` - Braintree * `monobank` - monobank * `liqpay` - LiqPay * `iyzico` - iyzico * `paytr` - PayTR * `payu` - PayU * `tpay` - Tpay * `przelewy24` - Przelewy24 * `gopay` - GoPay * `comgate` - Comgate * `monei` - MONEI * `redsys` - Redsys * `payplug` - PayPlug * `mollie` - Mollie * `unzer` - Unzer * `payone` - PAYONE * `nexi_xpay` - Nexi XPay * `halyk_epay` - Halyk ePay * `kaspi_pay` - Kaspi Pay * `vipps_mobilepay` - Vipps MobilePay * `paytrail` - Paytrail

No fields.

payment_url
string
Optional
The URL for making the payment. Optional field with a maximum length of 500 characters.
currency
string
Optional
ISO 4217 currency captured when the invoice is created.
provider_checkout_id
string
Optional
Provider-side hosted checkout identifier used for reconciliation.
provider_payment_id
string
Optional
Provider-side payment or transaction identifier used for reconciliation.
checkout_status
CheckoutStatusEnum
Optional
—
enumCheckoutStatusEnum0fields

* `not_required` - Not required * `initializing` - Initializing * `ready` - Ready * `failed` - Failed

No fields.

vat
number
Optional
The VAT percentage applied to the invoice. Must be between 0 and 100.
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_registration_number
string
Optional
—
company_vat_number
string
Optional
—
paid
string
Optional
The date and time when the invoice was paid.
expires
string
Optional
The date and time when the invoice expires. If not set, the invoice does not expire.

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.invoices.listWithResponse(options): Promise<ApiResponse<InvoicesListResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

create()

Create an invoice

Calculates package pricing and initializes the selected payment provider when required. The status defaults to `pending`. Creating an already-paid invoice by setting `status` to `paid` requires a superuser or an active superuser's API key (Static or Bearer), including requests using `X-Impersonate-User`. Other authenticated users receive a an API failure response. During API-key impersonation, the invoice recipient and user_id access rules are still determined by the impersonated user. For wallet payments, omit `status`: the invoice is created as pending and becomes paid after the balance is debited successfully. For your own billing system, confirm payment on your backend before sending gateway=manual and status=paid with a superuser credential. Sending user_id also requires is_reseller; omit user_id for a purchase by the caller. Sub-users cannot create invoices themselves. A paid package purchase creates or tops up the recipient's order for that package. Repeated purchases reuse the order. Finite expiring purchases have separate data ledgers; compatible non-expiring purchases and unlimited packages may reuse a ledger. This is different from assigning a child quota with /users/{id}/data/add. An amount-only invoice tops up money, not data. Persist the invoice ID and use Idempotency-Key for retries. Before delivering access, read the paid invoice and the resulting order: fulfillment can be recovered asynchronously. Accounting webhooks do not include invoice.paid.

Signature

Promiseclient.invoices.create(options: InvoicesCreateOptions): Promise<InvoicesCreateResponse>

Parameters

NameTypeRequirementDescription
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyInvoiceCreateRequestRequestRequired—

Example

const result = await client.invoices.create({
body: {
"gateway": "crypto"
}
});

Returns

Invoice

The resource or action result was created successfully.

typeInvoice38fields
id
string
Optional
—
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
country
Country
Required
—
typeCountry6fields
id
string
Optional
—
code
string
Required
Two-letter ISO 3166-1 alpha-2 country code. Must be unique. us de fr
name
string
Required
English display name of the country used across the admin and API responses.
original_name
string
Optional
Native-language name of the country as it appears in the source data. Deutschland Français
isps
LocationCodeName[]
Required
—
typeLocationCodeName2fields
code
string
Required
—
name
string
Required
—
asns
LocationCodeName[]
Required
The asns field is always present and defaults to an empty array. Pass include_asns=true to include available autonomous system numbers. This option does not affect the standalone /locations/asn endpoint or the compact proxy-node response format.
typeLocationCodeName2fields
code
string
Required
—
name
string
Required
—
user_id
string
Required
—
coupon
CouponShort
Required
—
typeCouponShort14fields
id
string
Optional
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
payment_amount
number
Required
—
payment_currency
string
Required
—
fx_market_rate
string
Required
—
fx_effective_rate
string
Required
—
fx_markup_percent
string
Required
—
fx_quoted_at
string
Required
—
updated
string
Required
—
created
string
Required
—
type
InvoiceTypeEnum
Optional
The type of invoice, indicating the type of proxy service. Options include: RESIDENTIAL: Residential proxies. STATIC: Static proxies. * `static` - Static * `residential` - Residential * `balance` - Balance
enumInvoiceTypeEnum0fields

* `static` - Static * `residential` - Residential * `balance` - Balance

No fields.

is_one_time
boolean
Optional
Whether this pricing tier is restricted to a one-time purchase. False does not create a recurring subscription or a renewal schedule.
is_payout
boolean
Optional
Indicates whether this invoice is a payout to the marketer. Default is False.
internal_id
string
Optional
A unique identifier for the invoice, generated automatically.
status
InvoiceStatusEnum
Optional
Payment state. A paid package invoice funds an order; a paid balance invoice credits money. Confirm the resulting order before delivering access, because fulfillment can recover asynchronously. Creating an invoice with status=paid requires a superuser. This read field is not a public status-update or refund endpoint. * `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error` - Error
enumInvoiceStatusEnum0fields

* `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error` - Error

No fields.

description
string
Optional
A description of the invoice. This field is optional and can be left blank.
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
quantity
number
Optional
The number of proxies to assign.
data
number
Optional
The amount of data in bytes.
balance
number
Optional
The balance to top up for the user. Must be zero or positive.
price_total
number
Optional
The total price of the invoice, including any discounts. Must be at least 1 cent.
gateway
InvoiceGatewayEnum
Optional
The payment gateway used for processing the payment. * `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual * `whitepay` - Whitepay * `wayforpay` - WayForPay * `usegateway` - UseGateway * `binance` - Binance Pay * `anymoney` - Any.Money * `coinpayments` - CoinPayments * `checkoutcom` - Checkout.com * `nowpayments` - NOWPayments * `btcpay` - BTCPay Server * `braintree` - Braintree * `monobank` - monobank * `liqpay` - LiqPay * `iyzico` - iyzico * `paytr` - PayTR * `payu` - PayU * `tpay` - Tpay * `przelewy24` - Przelewy24 * `gopay` - GoPay * `comgate` - Comgate * `monei` - MONEI * `redsys` - Redsys * `payplug` - PayPlug * `mollie` - Mollie * `unzer` - Unzer * `payone` - PAYONE * `nexi_xpay` - Nexi XPay * `halyk_epay` - Halyk ePay * `kaspi_pay` - Kaspi Pay * `vipps_mobilepay` - Vipps MobilePay * `paytrail` - Paytrail
enumInvoiceGatewayEnum0fields

* `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual * `whitepay` - Whitepay * `wayforpay` - WayForPay * `usegateway` - UseGateway * `binance` - Binance Pay * `anymoney` - Any.Money * `coinpayments` - CoinPayments * `checkoutcom` - Checkout.com * `nowpayments` - NOWPayments * `btcpay` - BTCPay Server * `braintree` - Braintree * `monobank` - monobank * `liqpay` - LiqPay * `iyzico` - iyzico * `paytr` - PayTR * `payu` - PayU * `tpay` - Tpay * `przelewy24` - Przelewy24 * `gopay` - GoPay * `comgate` - Comgate * `monei` - MONEI * `redsys` - Redsys * `payplug` - PayPlug * `mollie` - Mollie * `unzer` - Unzer * `payone` - PAYONE * `nexi_xpay` - Nexi XPay * `halyk_epay` - Halyk ePay * `kaspi_pay` - Kaspi Pay * `vipps_mobilepay` - Vipps MobilePay * `paytrail` - Paytrail

No fields.

payment_url
string
Optional
The URL for making the payment. Optional field with a maximum length of 500 characters.
currency
string
Optional
ISO 4217 currency captured when the invoice is created.
provider_checkout_id
string
Optional
Provider-side hosted checkout identifier used for reconciliation.
provider_payment_id
string
Optional
Provider-side payment or transaction identifier used for reconciliation.
checkout_status
CheckoutStatusEnum
Optional
—
enumCheckoutStatusEnum0fields

* `not_required` - Not required * `initializing` - Initializing * `ready` - Ready * `failed` - Failed

No fields.

vat
number
Optional
The VAT percentage applied to the invoice. Must be between 0 and 100.
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_registration_number
string
Optional
—
company_vat_number
string
Optional
—
paid
string
Optional
The date and time when the invoice was paid.

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "server"ProxyRequest could not complete the operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.invoices.createWithResponse(options): Promise<ApiResponse<InvoicesCreateResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

get()

Get an invoice

Returns billing, package, payment, and status details for one invoice visible to the authenticated account.

Signature

Promiseclient.invoices.get(options: InvoicesGetOptions): Promise<InvoicesGetResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA unique value identifying this Invoice.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.invoices.get({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

InvoiceRead

The operation completed successfully.

typeInvoiceRead39fields

Full invoice in package-based deployments; short invoice otherwise. Invoice creation always returns the full Invoice representation.

id
string
Optional
—
package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
country
Country
Required
—
typeCountry6fields
id
string
Optional
—
code
string
Required
Two-letter ISO 3166-1 alpha-2 country code. Must be unique. us de fr
name
string
Required
English display name of the country used across the admin and API responses.
original_name
string
Optional
Native-language name of the country as it appears in the source data. Deutschland Français
isps
LocationCodeName[]
Required
—
typeLocationCodeName2fields
code
string
Required
—
name
string
Required
—
asns
LocationCodeName[]
Required
The asns field is always present and defaults to an empty array. Pass include_asns=true to include available autonomous system numbers. This option does not affect the standalone /locations/asn endpoint or the compact proxy-node response format.
typeLocationCodeName2fields
code
string
Required
—
name
string
Required
—
user_id
string
Required
—
coupon
Coupon
Required
—
typeCoupon16fields
id
string
Optional
—
redeemed_count
number
Required
—
is_expired
boolean
Required
—
is_redeemed
boolean
Required
—
packages
PackageShort[]
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
stats
CouponStats
Required
—
typeCouponStats5fields
total_redeems
number
Required
—
unique_users
number
Required
—
total_revenue
number
Required
—
total_discount_given
number
Required
—
total_data_given
number
Required
—
created
string
Required
—
value
number
Required
Arbitrary coupon value
code
string
Required
Leaving this field empty will generate a random code.
is_multi_use
boolean
Optional
If true, coupon can be used multiple times.
is_available_to_one_time
boolean
Optional
If true, coupon can not be used for one-time package tiers.
type
CouponTypeEnum
Required
—
enumCouponTypeEnum0fields

* `free_data` - Free Data * `monetary` - Money * `percentage` - Percentage

No fields.

limit
number
Optional
Number of times coupon can be used
valid_until
string
Optional
Leave empty for coupons that never expire
marketer
string
Optional
The marketer who owns this coupon. Required if is_marketer is true.
user
string
Required
The user who created this coupon.
payment_amount
number
Required
—
payment_currency
string
Required
—
fx_market_rate
string
Required
—
fx_effective_rate
string
Required
—
fx_markup_percent
string
Required
—
fx_quoted_at
string
Required
—
updated
string
Required
—
created
string
Required
—
type
InvoiceTypeEnum
Optional
The type of invoice, indicating the type of proxy service. Options include: RESIDENTIAL: Residential proxies. STATIC: Static proxies. * `static` - Static * `residential` - Residential * `balance` - Balance
enumInvoiceTypeEnum0fields

* `static` - Static * `residential` - Residential * `balance` - Balance

No fields.

is_one_time
boolean
Optional
Indicates whether this invoice is for a one-time purchase. Default is False, meaning it is a recurring invoice.
is_payout
boolean
Optional
Indicates whether this invoice is a payout to the marketer. Default is False.
internal_id
string
Optional
A unique identifier for the invoice, generated automatically.
status
InvoiceStatusEnum
Optional
After changing invoice status to PAID, the invoice will be processed and user package created in case none exists. If you need to cancel the invoice, make sure to subtract data from the user package after changing the invoice status. Changing the status from PAID to any other will not affect the user package's data or proxies. * `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error` - Error
enumInvoiceStatusEnum0fields

* `pending` - Pending * `paid` - Paid * `unpaid` - Unpaid * `error` - Error

No fields.

description
string
Optional
A description of the invoice. This field is optional and can be left blank.
connection_limit
number
Optional
The maximum number of concurrent connections allowed for this package.
quantity
number
Optional
The number of proxies to assign.
data
number
Optional
The amount of data in bytes.
balance
number
Optional
The balance to top up for the user. Must be zero or positive.
price_total
number
Optional
The total price of the invoice, including any discounts. Must be at least 1 cent.
gateway
InvoiceGatewayEnum
Optional
The payment gateway used for processing the payment. * `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual * `whitepay` - Whitepay * `wayforpay` - WayForPay * `usegateway` - UseGateway * `binance` - Binance Pay * `anymoney` - Any.Money * `coinpayments` - CoinPayments * `checkoutcom` - Checkout.com * `nowpayments` - NOWPayments * `btcpay` - BTCPay Server * `braintree` - Braintree * `monobank` - monobank * `liqpay` - LiqPay * `iyzico` - iyzico * `paytr` - PayTR * `payu` - PayU * `tpay` - Tpay * `przelewy24` - Przelewy24 * `gopay` - GoPay * `comgate` - Comgate * `monei` - MONEI * `redsys` - Redsys * `payplug` - PayPlug * `mollie` - Mollie * `unzer` - Unzer * `payone` - PAYONE * `nexi_xpay` - Nexi XPay * `halyk_epay` - Halyk ePay * `kaspi_pay` - Kaspi Pay * `vipps_mobilepay` - Vipps MobilePay * `paytrail` - Paytrail
enumInvoiceGatewayEnum0fields

* `coinbase` - Coinbase * `cryptomus` - Cryptomus * `stripe` - Stripe * `coingate` - Coingate * `wallet` - Wallet * `manual` - Manual * `whitepay` - Whitepay * `wayforpay` - WayForPay * `usegateway` - UseGateway * `binance` - Binance Pay * `anymoney` - Any.Money * `coinpayments` - CoinPayments * `checkoutcom` - Checkout.com * `nowpayments` - NOWPayments * `btcpay` - BTCPay Server * `braintree` - Braintree * `monobank` - monobank * `liqpay` - LiqPay * `iyzico` - iyzico * `paytr` - PayTR * `payu` - PayU * `tpay` - Tpay * `przelewy24` - Przelewy24 * `gopay` - GoPay * `comgate` - Comgate * `monei` - MONEI * `redsys` - Redsys * `payplug` - PayPlug * `mollie` - Mollie * `unzer` - Unzer * `payone` - PAYONE * `nexi_xpay` - Nexi XPay * `halyk_epay` - Halyk ePay * `kaspi_pay` - Kaspi Pay * `vipps_mobilepay` - Vipps MobilePay * `paytrail` - Paytrail

No fields.

payment_url
string
Optional
The URL for making the payment. Optional field with a maximum length of 500 characters.
currency
string
Optional
ISO 4217 currency captured when the invoice is created.
provider_checkout_id
string
Optional
Provider-side hosted checkout identifier used for reconciliation.
provider_payment_id
string
Optional
Provider-side payment or transaction identifier used for reconciliation.
checkout_status
CheckoutStatusEnum
Optional
—
enumCheckoutStatusEnum0fields

* `not_required` - Not required * `initializing` - Initializing * `ready` - Ready * `failed` - Failed

No fields.

vat
number
Optional
The VAT percentage applied to the invoice. Must be between 0 and 100.
company_name
string
Optional
—
company_address
string
Optional
—
company_city
string
Optional
—
company_postal_code
string
Optional
—
company_registration_number
string
Optional
—
company_vat_number
string
Optional
—
paid
string
Optional
The date and time when the invoice was paid.
expires
string
Optional
The date and time when the invoice expires. If not set, the invoice does not expire.

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.invoices.getWithResponse(options): Promise<ApiResponse<InvoicesGetResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

delete()

Delete an invoice

Deletes an invoice that the authenticated account is allowed to remove.

Signature

Promiseclient.invoices.delete(options: InvoicesDeleteOptions): Promise<InvoicesDeleteResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA unique value identifying this Invoice.
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
ifMatchstringOptionalStrong ETag from the latest representation of this resource.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.invoices.delete({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

void

No response body

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "precondition"A required resource precondition is no longer satisfied.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.invoices.deleteWithResponse(options): Promise<ApiResponse<InvoicesDeleteResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

downloadPdf()

Download an invoice PDF

Returns the generated invoice document as a PDF attachment. The file may be downloaded from the billing provider on first access.

Signature

Promiseclient.invoices.downloadPdf(options: InvoicesDownloadPdfOptions): Promise<InvoicesDownloadPdfResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA unique value identifying this Invoice.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.invoices.downloadPdf({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

FileDownload

Invoice PDF document.

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.invoices.downloadPdfWithResponse(options): Promise<ApiResponse<InvoicesDownloadPdfResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.