VPS Ray / PROVIDER API

One URL. One key.
Your next provider.

Connect your storefront to VPS Ray. Import plans, check prices, place orders and track delivery from your own system.

01

Get your key

Sign in, open API access and create a key. Choose read-only access or enable orders for your account.

02

Import your catalog

Use the URL and key below. Test with /account, then import plans from /catalog.

03

Order and deliver

Confirm a quote, create an invoice and pay using your wallet or the hosted checkout.

Add VPS Ray as your provider.

Use the base URL and your complete vpr_ key. No username or API secret is required. A successful GET /account confirms the connection without creating an order or spending credit.

Provider API URLhttps://vpsray.com/api/reseller/v1
AuthenticationBearer API keyAuthorization: Bearer vpr_…
curl 'https://vpsray.com/api/reseller/v1/account' \
  -H "Authorization: Bearer $VPSRAY_API_KEY"

Run on your server. Store the key in an environment variable named VPSRAY_API_KEY.

From your order to their server.

For automation, fund your VPS Ray wallet in Billing and create a key with orders:write and wallet:pay. Read-only and existing order keys cannot spend credit.

const { data: plan } = await vpsray.quote(planId);
// Choose exact options from plan.locations and plan.osChoices.
// Persist this order key in your database BEFORE the request.
const { invoice } = await vpsray.createOrder({
  planId: plan.id,
  cycle: 'monthly',
  location: selectedLocation,
  os: selectedOS,
  hostname: 'customer-server',
  provider: 'wallet',
  walletCurrency: 'USD',
  expectedAmount: plan.prices.monthly.total,
  billing: customerBilling
}, yourSavedOrderKey);

// Requires wallet:pay and enough prepaid credit.
await vpsray.payInvoiceFromWallet(invoice.id);
// Paid means accepted for setup. Poll until status is active.
const { data: service } = await vpsray.service(invoice.serviceId);

customerBilling requires firstName, lastName, address, city, state, postcode, country (two uppercase letters) and phone. For domains, use GET /domains/check?domain=example.com first, choose annual billing, and include expectedRenewalAmount from the quote; registration checks availability again.

Keep the invoice if payment needs attention.

Insufficient customer credit leaves the invoice unpaid. Add funds, then retry payment on that invoice ID. If activation needs attention after payment, the order stays in the delivery queue. Payment confirmation and service activation are separate states.

For hosted payment, use nmi, cryptomus or binance as the order provider and open invoice.paymentUrl. The reseller signs in to the VPS Ray account that owns the order. Never send card details through this API.

The endpoints you need.

GET/domains/check?domain=example.com

Check domain availability before registration.
Scope: catalog:read

GET/account

Check connection, scopes, expiry and pricing tier.
Any valid key

GET/catalog

Published products with your assigned pricing.
Scope: catalog:read

GET/quotes/{id}

Current price, location, OS and supported billing cycles.
Scope: catalog:read

POST/orders

Create one unpaid order from your reviewed quote.
Scope: orders:write

GET/balance

Your prepaid credit, separated by currency.
Scope: wallet:read

POST/invoices/{id}/pay

Pay an existing invoice from prepaid credit, once.
Scope: wallet:pay

GET/services/{id}

Track activation, service details and dated infrastructure status.
Scope: services:read

GET/invoices/{id}

Read invoice status and its direct payment link.
Scope: invoices:read

GET /services and GET /invoices list your records. Lists accept limit (1–100) and offset. Follow nextOffset until null. Catalog offsets stop at 5,000; account lists at 100,000. Contact support for larger exports.

API keys are attached to one customer, expire after 1–365 days, and can be revoked immediately. Named account tiers apply to new quotes automatically; existing invoices keep their agreed amounts.

Accurate prices. Safe retries.

  • Prices: integer cents, not decimal dollars. 1200 means 12.00. Catalog reflects the last sync; request a quote before every new order. Stale prices are rejected at order creation.
  • Currencies: USD for catalog quotes. Wallet payments use the invoice’s currency with no automatic exchange. Binance orders use explicit fixed USDT minor-unit quotes.
  • Order retries: persist one unique Idempotency-Key per order. Reuse it with the same body after a timeout. Replays return the original invoice.
  • Payment retries: wallet payment is deduplicated by invoice ID. Do not create another order to retry a payment.
  • Service data: lifecycle status and infrastructure status are separate. Infrastructure includes checkedAt and freshness. Add ?refresh=1 to an individual service read to wait for a live status check.
  • Polling: 60 authenticated requests per key per minute. Use 15–30 seconds between activation checks. Read X-RateLimit-Remaining and honor Retry-After.
StatusNext step
400 / 409Check the error, quote and current invoice. Fix the input before retrying.
401 / 403Check key expiry, revocation and required permissions.
404Check the endpoint or record ID. Other customers’ records are not accessible.
429Wait for Retry-After. Do not create another key to evade the limit.
502 / 503 / 504Back off and retry with the same order key or invoice ID.

Responses include X-Request-Id for support. JSON errors include error, and runtime rejections include code and requestId. If the hosting security layer returns a non-JSON 403 before the API responds, the JavaScript client reports hosting_blocked with an edgeRequestId. Send that reference to support; do not repeatedly retry or change keys. Keys belong on your server, never in a public browser or URL.

Start from a working format.

The JavaScript client requires Node 20+ or a compatible server runtime. It retries transient failures at most twice; long rate-limit waits are returned to your queue through retryAfter. No dependencies are required.