Skip to content
VPS, Dedicated Servers and Colocation across ServerBike service locations

Standalone API

Standalone API quickstart

From account setup to your first signed requests, without WHMCS.

Public API 1.1.1URL /api/v1/
Documentation menu
ServerBike Reseller Documentation

Standalone API quickstart

Applies to ServerBike Reseller for WHMCS 0.1.8 and ServerBike Reseller Public API 1.1.1.

API documentation: 1.1.1 · URL version: /api/v1/ · Base URL: https://bridge.serverbike.com · OpenAPI: 3.1. You do not need WHMCS. This quickstart is an overview; the official schemas, signing rules and example code in the official developer bundle are the definitive reference.

1. Set up your account and backend

Complete your account setup. Register a hostname you control, between 1 and 16 exact public outbound IP addresses and any additional console origins you need. Store the credential ID and one-time secret you receive securely on your backend. Your backend needs:

  • customer sign-in and checks that each customer owns the services they manage;
  • retail invoices and your own pricing;
  • a durable record of every order and operation;
  • a scheduler for renewals and reconciliation;
  • a secret store.

Never call signed reseller API endpoints from a browser.

2. Test the official examples offline first

The developer bundle includes a Python 3.8+ reference client that uses only the standard library, a Node.js 18+ signer with a minimal request, a PHP 8.1+ signer (with ext-curl) with a minimal request, a Go 1.20+ signer and known-answer test vectors. These versions apply to the examples, not to the WHMCS module. Run the vector checks from examples/README.md with its synthetic test material. The vector tests need no real credentials and make no API calls.

3. Make your first authenticated requests

Extract the official bundle to a private working folder. Set SB_API_BASE, SB_CREDENTIAL_ID and SB_SECRET from your protected secret store. Never paste secrets into a command line or your shell history, and never print the environment. Then, from the root of the extracted bundle, on a server with a registered IP address:

Shell
python3 examples/python/serverbike_client.py verify
python3 examples/python/serverbike_client.py account
python3 examples/python/serverbike_client.py catalog

These read commands check your connection, your account and your catalog. Do not run purchases or other commands that change anything until your account, products and credit are confirmed. For the other commands and their arguments, see the client's -h output and the official Integration Guide.

4. Authentication essentials

Every request needs four headers: X-Reseller-Credential-Id, X-Request-Timestamp, X-Request-Nonce and X-Request-Signature. The BRIDGE-HMAC-SHA256-V1 protocol signs the exact request target and body. Decode the unpadded base64url secret to 32 raw bytes. Use a new nonce and signature for every attempt, keep your server clock accurate and follow AUTHENTICATION.md exactly, byte for byte. Never normalize or re-serialize a request after signing it. Use HTTPS, verify the certificate and hostname, refuse redirects, send Accept-Encoding: identity and treat an unexpected HTML or proxy response as a transport error. The official test vectors are the reference; never invent your own signing method.

5. Build a purchase flow

Read your catalog and account, and choose only a product, billing term and image that the catalog returns. Generate a UUID v4 operation_uuid, then save it together with the exact purchase body before you send anything. The official purchase schema uses operation_uuid, external_product_ref, term_ref and requested_image_ref. Send one purchase for each order. A committed status means the purchase and its charge have been recorded, not that the VPS has been delivered. Save the service and commercial references you receive and check the service status until it is ready. If you lose the response, look up the original operation UUID; never send the purchase again under a new UUID. Reconcile the recorded charges with your account and the customer's retail order.

6. Deliver and manage services

Read the service's current billing status, capabilities and connection details. The initial password can be revealed only once, and a successful reveal that you miss is used up. Never store it in plain text. Show the customer only the actions allowed for that service and that customer. Server actions can run in the background, so use the documented operation lookups to follow them. Before every action, confirm that the customer owns the service and that the product currently supports the action. Reinstalling and terminating are permanent. Use the paid-through date and renewal mode returned by the API, and never send a second, competing renewal. See the operations guide.

7. Handle errors and reconcile

When a retry is allowed, send the same operation with the exact same body, signed again with a new nonce and timestamp. If the outcome of a POST is unclear, use the matching operation lookup instead of creating a new UUID. reconciliation_required does not mean the operation failed. The official retry table explains the difference between a definite rejection, a request that was never sent and an unknown outcome. Start polling with a 3-second backoff that grows to 30 seconds, respect Retry-After and allow at least 60 seconds for POST requests that act on a server. If an operation stays in reconciliation or operator review, escalate it with the identifiers and the UTC time. Never log passwords or credentials. Rate limits and exact response shapes are in the official API documentation, which covers all 28 endpoints; not every endpoint is enabled for every service.

8. Browser console

Browser-based console access is included with every plan. Your backend checks that the customer owns the service and that vps.console is currently available for it, then requests a single-use ticket for your exact registered origin. The browser connects to the short-lived path it receives over WSS, and the API secret stays on your server. Never log the ticket, and request a new one for each reconnection. See the official CONSOLE.md for origin, expiry, CSP and noVNC details. Plan changes are only possible in specific cases: do not offer them unless ServerBike confirms they are available for the target plan. There is no separate API uptime guarantee and no promise of unrestricted upgrades.