---
title: "Create an unpaid order"
method: POST
path: "/api/public/create-order"
---

# Create an unpaid order

`POST /api/public/create-order`

## Request

- Base URL: `https://kodshop.cloud`
- URL: `https://kodshop.cloud/api/public/create-order`
- Auth: none required

No account needed — the delivery email is the only identity. Requires an Idempotency-Key header (8-128 chars of [A-Za-z0-9_\-:.]); replaying the same key returns the same order instead of creating a second one.

## Headers

- `Idempotency-Key` string, required

## Request body

- CreateOrderRequest
  - `email` string, email, required: Where the code / eSIM QR is delivered
  - `product_type` 'giftcard' | 'topup' | 'esim' | 'phone_rental' | 'phone_rental_renew', required
  - `product_id` integer: product_type=giftcard|topup: id from listProducts
  - `item_id` integer: product_type=giftcard|topup: chosen denomination (items[i].id)
  - `quantity` integer: Units of item_id. Optional — omitting it buys 1, including on the many voucher products whose fields[] declares quantity required. Send it only to buy several copies of one denomination; fields[] carries the allowed min/max.
  - `account_number` string: Top-ups: recipient account, when the product's fields require it
  - `amount` number: Variable-amount top-ups only
  - `extra` object: Product-specific inputs that have no dedicated field. Any entry in the product's fields[] whose code is not quantity / account_number / amount goes here, keyed by that code — e.g. game top-ups that need {"zone_id": "1234"} or {"server_id": "eu"}.
  - `bundle_name` string: product_type=esim
  - `country_code` string: product_type=esim / phone_rental

## Response `200`

Order created

- CreateOrderResponse
  - `order_id` string
  - `access_token` string: Pass as ?token= to getOrder
  - `price` number: Amount due, in currency
  - `currency` string
  - `price_rub` number: Legacy alias of price
  - `status` string
  - `product` object

## Other responses

- `400`: Invalid request
- `409`: Product not currently orderable

---

[API](https://skmtc.dev/kodshop/apis/kodshop-public-api.md) · [All operations](https://skmtc.dev/kodshop/apis/kodshop-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/kodshop/apis/kodshop-public-api/revisions/63f1271e61ea?raw)
