Calculate pricing, tax, discounts, and validation requirements without creating an order or invoice. Authentication is optional: unauthenticated callers can preview a checkout cart, while authenticated callers may use stored account country/currency context. Use this after availability/product-detail lookup and before…
Calculate pricing, tax, discounts, and validation requirements without creating an order or invoice. Authentication is optional: unauthenticated callers can preview a checkout cart, while authenticated callers may use stored account country/currency context. Use this after availability/product-detail lookup and before POST /api/v2/orders so the customer sees the exact total and any missing domain requirements. When supplied, paymentMethod is a checkout hint for the invoice that would be created: card, swish, bankgiro, sepa, or invoice. Account credit is handled after invoice creation.
No authentication required.
Accept Example Content-Type Example items array clientData object Optional for authenticated API-key/session orders. Use only to override or provide missing profile fields returned by availability/validation requirements. Required for unauthenticated signup orders.
paymentMethod string · enum
· Example: card Canonical checkout preference for the invoice created by the order. Use `card` for card-backed hosted checkout flows, `swish` for Swish, `bankgiro` for Swedish SEK invoice payment, `sepa` for EUR SEPA bank transfer, or `invoice` to create the invoice without starting a specific payment flow. Provider names are not public v2 method values. Account credit is applied after invoice creation through the invoice credit action.
card swish bankgiro sepa invoice attemptKey string
· Example: order_attempt_01hxa3b4c5d6e7f8g9h0j1k2m3 Optional caller-generated idempotency key for retry-safe order creation. Generate a fresh value for each logical order/checkout attempt and reuse that exact value only when retrying the same request after a timeout or lost response. If the previous attempt created an order, repeats with the same key within the duplicate-prevention window (currently one hour) return that existing order/invoice instead of creating another order. Do not reuse a key for a different cart.
items array<object> items[].productSlug stringnull required
· Example: vps-med items[].domainName stringnull required
· Example: null items[].type string · enum required
· Example: vps vps shared_hosting addon domain items[].billingCycle stringnull required
· Example: annually items[].periodYears integernull
· Example: 1 Present for multi-year domain previews.
items[].quantity integer required
· Example: 1 items[].unitAmount number required
· Example: 1440 items[].setupAmount number required
· Example: 0 items[].configurableOptionAmounts array<object> required items[].configurableOptionAmounts[].key string required
· Example: backupSlots items[].configurableOptionAmounts[].label string required
· Example: Example Label items[].configurableOptionAmounts[].amount number required
· Example: 0 items[].configurableOptionAmounts[].quantity numbernull required
· Example: 7 items[].subtotal number required
· Example: 1440 items[].currencyCode string required
· Example: SEK subtotal number
· Example: 1440 taxRateDecimal number
· Example: 0.25 taxAmount number
· Example: 360 total number
· Example: 1800 currencyCode string
· Example: SEK reverseCharge boolean
· Example: false priceAssurance object priceAssurance.level string · enum required
· Example: authoritative authoritative provisional priceAssurance.reason stringnull required
· Example: null priceAssurance.revalidatedAtSubmit boolean required
· Example: false type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object type string
· Example: https://developer.hostup.se/errors/invalid_request title string
· Example: Validation failed status integer
· Example: 400 detail string
· Example: The request body failed validation. code string
· Example: invalid_request Stable machine-readable code. Branch on this field, not on `detail`.
instance string
· Example: /api/v2/orders requestId string
· Example: req_01hxa3b4c5d6e7f8g9h0j1k2m3 timestamp string
· Example: 2026-04-27T12:34:56.000Z errors array<object> Field-level validation errors when `code` is `invalid_request`.
errors[].pointer string required
· Example: /items/0/eppCode errors[].detail string required
· Example: `eppCode` is required for this transfer. errors[].code string required
· Example: missing_required extensions object https://cloud.hostup.se/api/v2/orders/preview curl -X POST "https://cloud.hostup.se/api/v2/orders/preview" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"paymentMethod": "bankgiro",
"items": [
{
"type": "domain",
"action": "register",
"domainName": "example.se",
"years": 1,
"acceptedTerms": [
"se_registration_terms"
],
"registrantContact": {
"type": "private",
"firstName": "Anna",
"lastName": "Svensson",
"email": "[email protected]",
"phoneNumber": "+46700000000",
"countryCode": "SE",
"registrationIdentifier": {
"value": "850507-3412",
"countryCode": "SE"
}
}
}
],
"clientData": {
"countryCode": "SE",
"accountType": "private",
"registrationIdentifier": {
"value": "850507-3412",
"countryCode": "SE"
}
}
}' {
"items": [
{
"productSlug": "domain-se",
"domainName": "example.se",
"type": "domain",
"billingCycle": "annually",
"periodYears": 1,
"quantity": 1,
"unitAmount": 79,
"setupAmount": 0,
"configurableOptionAmounts": [],
"subtotal": 79,
"currencyCode": "SEK"
}
],
"subtotal": 79,
"taxRateDecimal": 0.25,
"taxAmount": 19.75,
"total": 98.75,
"currencyCode": "SEK",
"reverseCharge": false,
"priceAssurance": {
"level": "authoritative",
"reason": null,
"revalidatedAtSubmit": false
}
} {
"paymentMethod": "bankgiro",
"items": [
{
"type": "domain",
"action": "register",
"domainName": "example.se",
"years": 1,
"acceptedTerms": [
"se_registration_terms"
],
"registrantContact": {
"type": "private",
"firstName": "Anna",
"lastName": "Svensson",
"email": "[email protected]",
"phoneNumber": "+46700000000",
"countryCode": "SE",
"registrationIdentifier": {
"value": "850507-3412",
"countryCode": "SE"
}
}
}
],
"clientData": {
"countryCode": "SE",
"accountType": "private",
"registrationIdentifier": {
"value": "850507-3412",
"countryCode": "SE"
}
}
}