Docs

Carts

Last updated: 26 Oct 2026

Carts allow customers to collect items prior to checkout.

Checkout

Payment happens on the SERVOS hosted checkout. Every cart response carries a checkout_url. Send the customer there when the cart is ready:

https://servos.dk/checkout/{organization_id}/{cart_id}

The API does not expose a payment endpoint.

All endpoints are scoped to the organization that owns the API key:

/store/v0

Cart lifecycle

  • Create a cart for a customer session.
  • Add one or more items (bookings, stays, tickets, passes) or packages.
  • Retrieve the cart periodically to keep it fresh and reflect any expirations.
  • Remove items as needed.

Note: carts created through this API hold their items for 15 minutes — the countdown starts when the first item is added, and items_expire_at reflects the deadline.

Create cart

Create a new cart.

POST /store/v0/carts

Response

Returns a cart object.

{
  "cart": {
    "id": "d1c2b3a4-5e6f-4a2b-9c3d-0e1f2a3b4c5d",
    "status": "active",
    "checkout_url": "https://servos.dk/checkout/6b1f0c52-0d1c-4d0e-8a57-3a1f5f0a9c11/d1c2b3a4-5e6f-4a2b-9c3d-0e1f2a3b4c5d",
    "currency": "NOK",
    "items_count": 0,
    "total_quantity": 0,
    "items_expire_at": null,
    "items": [],
    "packages": [],
    "totals": {
      "subtotal": {
        "cents": 0,
        "currency": "NOK",
        "amount": 0.0,
        "formatted": "0 NOK",
        "abbreviated": "0 NOK"
      },
      "tax": {
        "cents": 0,
        "currency": "NOK",
        "amount": 0.0,
        "formatted": "0 NOK",
        "abbreviated": "0 NOK"
      },
      "discount": {
        "cents": 0,
        "currency": "NOK",
        "amount": 0.0,
        "formatted": "0 NOK",
        "abbreviated": "0 NOK"
      },
      "total": {
        "cents": 0,
        "currency": "NOK",
        "amount": 0.0,
        "formatted": "0 NOK",
        "abbreviated": "0 NOK"
      }
    }
  }
}

Get cart

Retrieve a cart by its public ID.

This may refresh the cart server-side (for example, removing expired items).

GET /store/v0/carts/{public_id}

Response

Returns the cart object.

Delete cart

Abandon a cart.

DELETE /store/v0/carts/{public_id}

Response

Returns the cart object.

Cart object reference

FieldTypeDescription
idstringCart public identifier
statusstringExample values: "active", "paid", "completed", "expired"
currencystringISO 4217 currency
items_countintegerNumber of items
total_quantityintegerWhat to show as the cart's count: the quantity of each item, with a package counted once
items_expire_atstring | nullWhen items expire
itemsarrayCart items
packagesarrayPackages in the cart, see Cart packages
totalsobjectTotals (money objects)