Order lifecycle
#Statuses
| Status | Terminal | Meaning |
|---|---|---|
pending |
No | The order was accepted and activation or delegation is in progress. |
active |
Yes | Delegation was confirmed and billing was finalized. |
failed |
Yes | Activation or delegation failed. The merchant was not charged. |
expired |
Yes | The order can no longer be processed. |
cancelled |
Yes | The order was cancelled before completion. |
New order requests normally return HTTP 202 with status: pending. A later
GET /api/v1/energy/orders/{clientOrderId} still returns HTTP 200; inspect
the JSON status field to determine business state.
#Recommended integration
Use webhooks as the primary completion signal and status polling as recovery:
- Persist the
202response. - Wait for
energy.order.activeorenergy.order.failed. - If no event arrives within the merchant's expected window, query status.
- Treat webhook deliveries and polling results as idempotent state updates.
- Do not submit another order merely because the first one is still pending.
#Billing point
The balance is charged only after delegation is confirmed and the order is finalized as active. A failed activation or delegation leaves the merchant balance unchanged, including when the activation transaction itself succeeded.