# Lifecycle and reconciliation ## Purchase → delivery | Step | Signal | Your action | | --- | --- | --- | | Admission | `POST /purchases` → `committed` (or lookup `committed`) | Store `commercial_service_ref`, `service_uuid`, `business_transaction_ref`. | | Refused | `422` or lookup `rejected` + `rejection_code` | Nothing was charged. Tell the customer; do not retry blindly. | | Provisioning | `runtime-state.operational_status`: `queued`, `authorization_pending`, `provisioning`, `installing` | Wait. | | Failed | `provisioning_failed`, `failed_definitely_not_sent`, `authorization_refused` | Contact support; a refund follows proof that nothing was created. | | Running | `running` / `stopped` with `metrics_status: available` | Deliver: `guest-access` + one-time reveal. | ## Power, reinstall, password The request starts the action; the platform finishes it. Poll the matching operation route (3 s, backing off to 30 s). Only `complete` is success; `failed_definitely_not_sent` and `failed_provider_rejected` mean nothing changed. `unknown`/`unknown_sent_outcome`/`reconciliation_required` are settled from provider evidence — never resend. * **Restart** is a graceful stop followed by a start. A guest that ignores the graceful stop for 5 minutes ends the restart as `failed_provider_rejected`; the server keeps running. * **Password change**: some images apply a new password only at the next full power cycle. The platform then does one graceful stop and start itself (`applying`). If it cannot, the status is `power_cycle_required`: ask the customer to Stop and Start; until then the previous password works. * **Reinstall** completes only on provider proof of one finished rebuild. ## Renewal Authority: `GET /services/{s}/commercial` → `renewal.authority`. * `reseller_api`: call `POST /renewals` before `paid_through`; the settlement's `paid_through` is the new date. * `serverbike_automatic`: ServerBike renews; API renewals answer `409 BUSINESS_CONFLICT`. * Overdue (`billing_state`) or `financial_hold` may lead to commercial suspension by ServerBike; holds appear under `renewal` and in `/services/{s}` (`commercial_status`). ## Plan change Deferred upgrade, applied by the customer's own power cycle. Phases (`GET /services/{s}/plan-changes/{o}`): | `phase` | Meaning | `settlement_status` | | --- | --- | --- | | `awaiting_admission` | ServerBike has not answered the admission yet. | `pending_admission` | | `waiting_for_stage` | The difference is held; the provider stage has not been sent. | `reserved` | | `staging` | The one stage edit is being sent. | `reserved` | | `verifying_stage` | Waiting for evidence that the target is staged. | `reserved` | | `activation_ready` | Staged: the customer's Stop (or Power off) and Start apply it. | `reserved` | | `applying` | The provider is applying the target inside the customer's Start. | `reserved` | | `verifying_application` | Applied; resources are being verified. | `reserved` | | `settlement_pending` | Proven applied (capture) or proven not applied (release); being recorded. | `capture_pending` / `release_pending` | | `operator_review` | Evidence is ambiguous; ServerBike support decides. Nothing automatic. | `under_review` | | `completed` | Applied and captured. Terminal. | `captured` | | `released` | Nothing applied; the held amount was released. Terminal. | `released` | | `rejected` | Refused before anything was held. Terminal. | `not_reserved` | `activation_ready` is true only when the staged target has actually been observed and the service is usable; `customer_power_cycle_permitted` is false while another power action of the service is open. Amounts: `GET /operations/{o}/settlement` → `plan_change.held_amount`, `captured_amount`, `released_amount`. Renewals while a change is pending renew the plan currently applied (the source plan). ## Suspension, unsuspension, termination Commercial lifecycle calls take `{operation_uuid, commercial_service_ref, service_uuid}` (`service_uuid` may be `null` to let ServerBike resolve your unique binding). The commercial commit comes first; operational effects follow. A lookup of a suspension or unsuspension stays `pending` until the platform has applied it. Termination deletes the server afterwards; `runtime-state` reaches `terminated`. ## Financial reconciliation | Question | Source | | --- | --- | | What did this operation cost? | `GET /operations/{o}/settlement` → `transactions[]` (`debit`/`credit`, `amount`, `recorded_at`), `net_amount`. | | What is the paid-through date now? | `GET /services/{s}/commercial` → `paid_through`. | | What did this renewal extend it to? | `GET /operations/{o}/settlement` → `paid_through`. | | What is held for an upgrade? | `GET /operations/{o}/settlement` → `plan_change`. | | What is my balance? | `GET /account/commercial` → `credit_balance`. | All figures are ServerBike's recorded transactions; a later catalogue price change never alters them. Values that ServerBike has no record of are `null`, never estimated.