Create an order for domains, VPS, or web hosting

Create an order from `cartItems` for the authenticated customer account, or include `clientData` to create a new customer account first. Use `clientData` only for unauthenticated checkout or account creation. The response returns `invoiceId` for payment and `orderId` for activation.

Billing & Orders Orders

Context

Used in the dashboard

/cart/checkout /cart/en/checkout /signup /signup/en /

Where to get IDs / values

Workflow links

Headers

Accept Example
Content-Type Example

Body

required
application/json
attemptKey string · Example: order-20260326-001

Optional idempotency key. Reuse the same value when retrying the same order request to avoid duplicate orders.

cartItems array required · Example: [{"type":"vps","productId":"3060","cycle":"m","domain":"vps.example.com","configoptions...

Order line items. Send an empty array only when you want to create a customer account without placing an order.

clientData object

Include `clientData` only when you want this endpoint to create a new customer account, or when you place an order without authentication. Omit it when calling with an authenticated session or API key.

turnstileToken string · Example: YOUR_TURNSTILE_TOKEN

Required only for unauthenticated browser checkout when Turnstile protection is enabled.

referralCode string · Example: AB12CD34

Optional referral code for supported signup flows.

euEligibilityConfirmed boolean · Example: true

Set to `true` when your integration already confirmed the registrant meets any EU residency requirements for the selected domain.

Responses

200 Successful response
invoiceId string

ID of the invoice to pay (may be null).

orderId string

ID of the created order (may be null).

paymentUrl string

Relative URL you can open to pay the invoice.

redirectUrl string

Relative URL you can redirect the customer to (for example a verification step).

pendingManualProcessing string

True if the order requires manual approval before activation.

accountCreated string

True if a new customer account was created during the request.

clientId string

Client ID associated with the order or account.

success string

Indicates if the operation was successful.

message string

A message describing the result of the operation.

POST https://cloud.hostup.se/api/create-order
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/create-order" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "attemptKey": "order-20260326-001",
    "cartItems": [
      {
        "type": "vps",
        "productId": "3060",
        "cycle": "m",
        "domain": "vps.example.com",
        "configoptions": {
          "os": "ubuntu-22.04"
        }
      }
    ]
  }'
Response
{
  "invoiceId": "string",
  "orderId": "string",
  "paymentUrl": "string",
  "redirectUrl": "string",
  "pendingManualProcessing": "string",
  "accountCreated": "string",
  "clientId": "string",
  "success": "string",
  "message": "string"
}
Request Body API: VPS
{
  "attemptKey": "order-20260326-001",
  "cartItems": [
    {
      "type": "vps",
      "productId": "3060",
      "cycle": "m",
      "domain": "vps.example.com",
      "configoptions": {
        "os": "ubuntu-22.04"
      }
    }
  ]
}