Reseller integration
One persistent customer, one hourly VPS, one isolated balance.
Start with an isolated customer
Use an account-wide backend API key with server write and billing write. Never expose it to buyers. Read GET /v1/reseller/config for the active checkout authority. Create or recover a customer with POST /v1/reseller/customers and {"external_reference":"YOUR_PERSISTENT_BRIDGE_ID"}. Exact reference retries return the same account.
Persist the returned id and client_reference. For normal server, quote and billing routes add X-UNode-Customer-Id: CUSTOMER_UUID to the parent's bearer key. UNode checks ownership and uses the child's actual balance. Parent funds and other customers' funds are never automatically shared. Management routes under /v1/reseller/ omit this header.
Fund the same account repeatedly
In customer context use the persistent deposit endpoints to obtain and reuse an address/memo for each asset/network. No user-created payment intent is needed. Alternatively allocate existing funded reseller credit with POST /v1/reseller/customers/{id}/credits, funding_reference and integer amount_cents. Transfers debit the parent and credit only that child atomically; they cannot mint money. References are unique across all customers and transfers for the reseller. A changed amount/customer/direction conflicts.
Use one funding path per deposit. Detection and indicative quotes do not prove credited money. Only the canonical verified settlement credits the child's balance.
Direct funding from a uSwap provider leg
For an existing uSwap payment bridge, check GET /v1/reseller/config and require direct_funding_enabled: true before offering funded checkout. Issue an invoice with the parent key, no customer header: POST /v1/reseller/customers/{id}/funding-invoices, funding_reference and amount_raw (expected NEAR USDT output, 6 decimals, minimum 10000 raw). Exact retries return the same invoice; changed customer or amount conflicts.
uSwap must bind the invoice token, receiver and expected amount to its server-owned intent and provider leg before dispatch and before the 15-minute quote expiry. No second bridge or parent credit allocation is needed. Reconcile with POST /v1/reseller/customers/{id}/funding-invoices/{invoiceId}/reconcile without a body; GET that invoice path to recover the receipt. UNode independently checks canonical authority and finalized on-chain delivery, including the binding timestamp, and consumes each receipt once. Caller-supplied hashes and status patches cannot create credit. Reconciliation returns 503 until the matching authority is deployed and enabled.
amount_raw and net_credit_cents are estimates. credited_raw and credited_cents are actual credit; underpayments can credit less and overpayments more. Genuine sub-cent delivery retains carry with zero cents and null ledger ID. Invoice remaining_credit_raw is the remainder at settlement; the customer snapshot reports current carry. A valid pre-bound late settlement is accepted. Create the VPS only once the actual child balance meets its live quote.
Quote and create an hourly password VPS
Discover live stock, OS and password support through the catalog. In catalog_price_limit mode call POST /v1/server-quotes with the selection and auth_method: "password", omitting prepaid terms. Pass its price_limit unchanged into POST /v1/servers, with a durable Idempotency-Key and the customer's exact returned client_reference. The quote reports minimum_balance_cents; hourly admission requires one rounded-up hourly quantum. Quotes neither reserve stock nor lock prices.
In commercial_quote mode use the current offer/inventory revision IDs and POST /v1/commercial-quotes; include its quote ID and revision IDs on creation. Do not mix the two authorities. Managed customers support hourly/password service only; prepaid terms and add-ons are refused.
Deliver credentials after creation succeeds
A create response means acceptance, not delivery. Persist resource, node and operation IDs. Poll /v1/operations/{operationId} until creation succeeds, then fetch the server and GET /v1/servers/{nodeId}/credentials in customer context. This requires server WRITE API key access. Responses have available, pending or unavailable status; only available responses contain the IP, root username and password.
Credentials are encrypted at rest and retrievable for delivery retries. Pending create/reset/reinstall operations hide old passwords. Terminated, SSH-key and older unstored credentials are unavailable. Responses are private and no-store. Do not put credentials in logs, analytics, public webhooks or caches; deliver only to the authenticated buyer.
Show server graphs
Read GET /v1/servers/{nodeId}/metrics?range=24h with server read permission and the same isolated customer header. Draw CPU, memory, network and disk-I/O graphs in your own UI. See monitoring for units, missing data and availability states.
One lifetime rental per bridge
Repeat funding tops up this customer's same VPS; it does not buy another. Recover uncertain creation with the exact client reference and reuse the exact request. Never change references to retry a timeout. A terminated lifetime rental is not recreated by a top-up. A new rental needs a new bridge/customer.
Honor current server capabilities for controls. Stop still bills. End a rental with DELETE /v1/servers/{nodeId} and wait for the delete operation to succeed.
Budgets, reconciliation and unused credit
Hourly settlement carries fractional cents at a frozen price, caps charges at the child's remaining balance and never overdraws it. Deletion settles the final interval before unused credit can be returned; final sub-cent amounts are waived. At zero balance the 15-minute billing sweep queues durable termination after hourly settlement, with no ordinary grace period. Monetary isolation is enforced; exact wall-clock cutoff depends on tick timing, provider availability and retries.
Read GET /v1/reseller/customers/{id}/ledger?after_id=0&limit=100 without a customer header. Deduplicate stable entry IDs and persist the ascending cursor. Entries correlate funding references, usage, refunds, source transactions and verified settlement transactions where available. Balance is current, not an as-of-cursor snapshot; include funding entries with null resource IDs.
After confirmed termination, POST /v1/reseller/customers/{id}/refunds returns unused credit to the parent with a new funding reference. It refuses while a resource is live. This is an internal transfer, not an external crypto refund. Your application must implement external refund policy.
Use the live API reference for complete schemas and signed webhooks as optional wakeups, with polling for recovery. Buyer authentication and ownership checks remain your backend's responsibility.