OpenAPI Documentation
OpenAPI Documentation

Static proxy purchase workflow

Static proxy purchases enter asynchronous processing after the order is accepted and payment succeeds. A successful creation response does not mean that the resources are ready. During normal processing, either the entire order succeeds or the entire order fails; partial purchase success does not occur.

sequenceDiagram
    participant C as Caller
    participant A as Open API
    participant W as Callback receiver

    C->>A: List static proxy regions
    A-->>C: Return proxy type and region codes
    C->>A: Query real-time inventory
    A-->>C: Return available quantity
    C->>A: Get purchase quote (type, region, duration, quantity)
    A-->>C: Return current total amount without locking the price
    C->>A: Create purchase order (type, region, duration, request_no, optional callback_url)
    A-->>C: Payment succeeds; return PURCHASING and order number
    par Automatic polling
        loop While order is PURCHASING
            C->>A: Get purchase order details
            A-->>C: Return the latest order status
        end
    and callback_url was provided
        A->>W: Notify once on first transition to COMPLETED or FAILED
        W-->>A: Return any 2xx response
    end
    C->>A: Get purchase order details
    A-->>C: Return resources when COMPLETED

Integration steps

  1. Call List static proxy regions, then select static_type and region_code.
  2. Select a purchase duration: ISP supports 7 and 30 days; ISP_NATIVE supports 7, 30, and 90 days.
  3. Call Get static proxy inventory. Inventory is real-time and may still change before order creation.
  4. Call Get a static proxy purchase quote to obtain the current total amount. A quote does not create an order, charge the wallet, reserve inventory, or lock the price.
  5. Call Create a static proxy purchase order and save the returned order_no. Inventory and price are checked again at creation time, so the final amount may differ from the quote.
  6. Call Get static proxy purchase order details every 10–30 seconds until the status is COMPLETED or FAILED.
  7. When the order is COMPLETED, read connection information from the detail response resources.

If you provide callback_url when creating the order, you must still retain polling and recovery-query capabilities. A callback is only a notification and cannot replace order queries.

If the order is FAILED, no automatic refund is issued. Contact support for manual handling.

Creation error 300320 means that the resource price does not exist or does not match the requested specification. The actual msg follows X-LANG; if omitted or unsupported, en_US is used.

On this page