Copy, compile and adapt

Examples for every common integration stack

Native Windows examples launch the bonding runtime without a shell and send credentials through stdin. Server-side examples call the Partner Billing API over HTTPS and show the required idempotency contract.

Windows application side

Run starbonding-cli.exe safely.

The full PowerShell and C# launchers cover the long-running bonding lifecycle, complete-line readiness detection, concurrent output draining and graceful stop. Compact language examples execute --restream-get, pass the password through stdin, handle diagnostics and return the CLI exit code.

Stable CLI contract used by the compact examples

starbonding-cli.exe --username ACCOUNT --password-stdin --restream-get
stdin: PASSWORD + newline
stdout: exactly one starbonding.restream.v1 JSON line
stderr: diagnostics
exit: 0 success, 1 runtime/API failure, 2 invalid arguments

Partner server side

Provision and bill customers from your backend.

Every create-account example keeps the API key outside source code, sends JSON over HTTPS, supplies a persistent idempotency key and checks the HTTP result. Replace the example key with the stored key for the intended financial operation.

PHP 8 · complete client

All Partner API operations

List services and accounts, inspect balance and transactions, create accounts and renew accounts.

php partner-api.php services
php partner-api.php balance
php partner-api.php accounts 1
php partner-api.php transactions
php partner-api.php create SERVICE_ID KEY "Customer" customer@example.com
php partner-api.php renew USER_ID SERVICE_ID KEY
Download full PHP client ↓

Financial retry rule

Create the idempotency key when the intended account creation or renewal is recorded. Store it before the request.

Idempotency-Key: create-customer-0001

On timeout, retry the identical request with the same key. A new key represents a new chargeable operation.

Read the complete API contract →