Перейти к основному содержимому

CheckoutCreateRequest

Create a checkout: one referenceId holding multiple shop positions.

v1 is shop-only — ordersType is a Literal["shop"] so dtu / esim (and anything else) are rejected at the boundary with HTTP 422. referenceId is REQUIRED: it is both the cart id and the idempotency key, unique within the calling API key's account.

The orders list is capped at CHECKOUT_MAX_ITEMS (settings-driven, default 20). shop-service imposes no cap of its own (InternalPurchaseRequest.orders is min_length=1 only), so this is the Public-API guard rail.

orders object[]required

Cart positions (at least one). Capped at CHECKOUT_MAX_ITEMS (default 20) line items per request. Each (denominationId, fields) combination must appear at most once — merge quantities into a single line rather than repeating it (duplicates are rejected with HTTP 422).

Possible values: >= 1, <= 20

  • Array [
  • denominationIdDenominationidrequired

    Item/denomination id from the GET /services catalog.

    fields object[]

    Optional extra fields required by some products.

  • Array [
  • keyKeyrequired

    Field key (e.g. account_reference for DTU orders).

    valueValuerequired

    Field value.

  • ]
  • isLongOrderIslongorder

    If true, places a long order for this position (may be delivered asynchronously). Use isLongOrder / minQtyToLongOrder from the catalog to decide when it is allowed.

    Default value: false
    quantityQuantity

    Quantity to purchase for this position.

    Possible values: >= 1

    Default value: 1
  • ]
  • ordersTypeOrderstyperequired

    Order type. v1 supports shop only (vouchers/codes).

    Constant value: shop
    referenceIdReferenceidrequired

    Cart id and idempotency key. REQUIRED and unique within your account. Reuse it in GET /orders?referenceId=... to list every order created by the checkout.

    Possible values: non-empty and <= 40 characters

    CheckoutCreateRequest
    {
    "orders": [
    {
    "denominationId": "string",
    "fields": [
    {
    "key": "string",
    "value": "string"
    }
    ],
    "isLongOrder": false,
    "quantity": 1
    }
    ],
    "ordersType": "shop",
    "referenceId": "string"
    }