Skip to content
Инвойсбокс
post/v3/billing/api/order/order

Creating an order

An order is the central object: it holds the amount, the basket, the buyer and the payment link. To create one, call:

Request and response example

HTTP

POST /v3/billing/api/order/order
Authorization: Bearer b37c4c689295904ed21eee5d9a48d42e
Content-Type: application/json
User-Agent: MyApp 1.0
Accept: application/json

Request body:

{
  "merchantId": "01771534-196a-1105-839a-82422289d6d9",
  "merchantOrderId": "m-1608560079",
  "amount": 366.00,
  "successUrl": "https://shop.example.com/order/4412?result=success",
  "failUrl": "https://shop.example.com/order/4412?result=fail",
  "returnUrl": "https://shop.example.com/order/4412?result=return",
  "vatAmount": 66.00,
  "basketItems": [
    {
      "sku": "5fe0adcfa7fb4",
      "name": "Room booking",
      "measure": "pcs",
      "measureCode": "796",
      "grossWeight": 0,
      "netWeight": 0,
      "quantity": 3,
      "amount": 122.00,
      "amountWoVat": 100.00,
      "totalAmount": 366.00,
      "totalVatAmount": 66.00,
      "vatCode": "RUS_VAT22",
      "type": "service",
      "paymentType": "full_prepayment"
    }
  ],
  "metaData": {
    "@type": "LodgingReservation",
    "reservationId": "abc456",
    "reservationStatus": "https://schema.org/ReservationConfirmed",
    "underName": {
      "@type": "Person",
      "name": "John Smith"
    },
    "reservationFor": {
      "@type": "LodgingBusiness",
      "name": "Hilton San Francisco Union Square",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "333 O'Farrell St",
        "addressLocality": "San Francisco",
        "addressRegion": "CA",
        "postalCode": "94102",
        "addressCountry": "US"
      },
      "telephone": "415-771-1400"
    },
    "checkinTime": "2026-09-14T16:00:00-08:00",
    "checkoutTime": "2026-09-16T11:00:00-08:00"
  },
  "expirationDate": "2026-09-16T00:00:00+00:00",
  "languageId": "en",
  "currencyId": "RUB",
  "description": "Hotel room payment",
  "customer": {
    "type": "legal",
    "name": "Romashka LLC",
    "phone": "79001112233",
    "email": "buh@example.invbox.ru",
    "vatNumber": "7710044140",
    "registrationAddress": "190000, Saint Petersburg, Nevsky prospect 147, office 321"
  }
}

CURL

curl -L -X POST 'https://api.invoicebox.ru/v3/billing/api/order/order' \
  -H 'Authorization: Bearer b37c4c689295904ed21eee5d9a48d42e' \
  -H 'Content-Type: application/json' \
  -H 'User-Agent: MyApp 1.0' \
  -H 'Accept: application/json' \
  -d '{
    "merchantId": "01771534-196a-1105-839a-82422289d6d9",
    "merchantOrderId": "m-1608560079",
    "amount": 366.00,
    "vatAmount": 66.00,
    "currencyId": "RUB",
    "languageId": "en",
    "description": "Hotel room payment",
    "expirationDate": "2026-09-16T00:00:00+00:00",
    "successUrl": "https://shop.example.com/order/4412?result=success",
    "failUrl": "https://shop.example.com/order/4412?result=fail",
    "returnUrl": "https://shop.example.com/order/4412?result=return",
    "basketItems": [
      {
        "sku": "5fe0adcfa7fb4",
        "name": "Room booking",
        "measure": "pcs",
        "measureCode": "796",
        "grossWeight": 0,
        "netWeight": 0,
        "quantity": 3,
        "amount": 122.00,
        "amountWoVat": 100.00,
        "totalAmount": 366.00,
        "totalVatAmount": 66.00,
        "vatCode": "RUS_VAT22",
        "type": "service",
        "paymentType": "full_prepayment"
      }
    ],
    "customer": {
      "type": "legal",
      "name": "Romashka LLC",
      "phone": "79001112233",
      "email": "buh@example.invbox.ru",
      "vatNumber": "7710044140"
    }
  }'

CreateOrderRequest

PropertyRequiredTypeDescriptionExample
descriptionyesstring(1000)Order descriptionHotel room payment
merchantIdyesstring(36)Merchant identifier01771534-1a57-f184-dee3-ebeb91dded76
merchantOrderIdyesstring(256)Order identifier in the merchant's own system; must be uniqueO-12345
merchantOrderIdVisiblenostring(256)Order number shown on the payment page. Falls back to merchantOrderId111TN22-33
amountyesfloatOrder total; no limits19658.45
vatAmountyesfloatVAT amount156.56
currencyIdyesstring(3) enumCurrency code per ISO 4217RUB, USD, EUR, GBP
languageIdnostring(2) enumPayment page languageru, en
expirationDateyesdatetimeHow long the order stays payable2026-09-14T00:00:00+00:00
basketItemsyesarray of BasketItemOrder basket
metaDatanoobjectAdditional order data
customeryesCustomerBuyer details
notificationUrlnostring(1000)URL for status notifications; defaults to the URL in the merchant settings
successUrlnostring(1000)Where to return the buyer after a successful payment
failUrlnostring(1000)Where to return the buyer after a failed payment
returnUrlnostring(1000)Where to return the buyer who left the payment page
invoiceSettingnoInvoiceSettingExtra payment settings
orderSettingnoOrderSettingExtra order settings
parentIdnostring(36)Identifier of the base order — used for correction orders01771534-196a-1105-839a-82422289d6d9
orderContainerIdnostring(36)Identifier of the main order — used to add an order to an existing invoice01771534-196a-1105-839a-82422289d6d9
shopIdnostring(36)Identifier of the linked shop or marketplace06581534-196a-1105-839a-82422289d6d8
userAccountIdnostring(36)Loyalty programme identifier06581534-196a-1105-839a-82422289d6d7
processablenoboolWhether the order is processabletrue, false
subtypenostring(36)Order subtype: order — a regular order (default), hold — an order with a holdorder, hold

OrderResponse

Repeats every property of CreateOrderRequest and adds:

PropertyRequiredTypeDescriptionExample
idyesstring(36)Order identifier in Invoicebox01771534-1a57-f184-dee3-ebeb91dded75
paymentUrlyesstring(1000)Link to the payment gateway
createdAtyesdatetimeWhen the order was created2026-09-14T00:00:00+00:00
statusyesstring(50) enumOrder status: created — awaiting payment, completed — paid, hold — funds reservedcompleted, hold
paidAtnodatetimeWhen the order was paid, if it was2026-09-14T00:00:00+00:00
paymentInfonoPaymentInfoPayment and payer details{"maskedPan": "220024**0954", "expiration": "202601", "paymentSystem": "MIR", "cardholderName": "CARDHOLDER NAME"}
holdTillnodatetimeWhen reserved funds are captured, for orders with subtype hold2026-09-14T00:00:00+00:00

Important

Depending on your scenario, paymentUrl is either a link you redirect the browser to, or a value you encode in a QR code for the buyer to scan with a camera or the Invoicebox app.

Customer

PropertyRequiredTypeDescriptionExample
typenostring(10) enumBuyer typelegal — a company or sole trader, private — an individual
namenostring(500)NameRomashka LLC
phonenostring(100)Phone number79001112233
emailnostring(100)Emailbuh@example.invbox.ru
vatNumbernostring(20)Taxpayer number (INN)7710044140
taxRegistrationReasonCodenostring(9)Tax registration reason code (KPP)770201001
registrationAddressnostring(1000)Registered address including the postal code190000, Saint Petersburg, Nevsky prospect 147, office 321

BasketItem

The order basket. Read the rules for naming the items carefully: what you send here is what the buyer sees in the fiscal receipt.

PropertyRequiredTypeDescription
skuyesstring(36)Stock keeping unit, for example 5fe0adcfa7fb4
nameyesstring(300)Item name, for example Room booking
typeyesstring(10)Item type per the reference, or service, or commodity
groupNamenostring(500)Item group name, used when building the closing documents
measureyesstring(10)Unit of measure (in Russia — per OKEI), for example pcs
measureCodeyesstring(4)Unit of measure code (in Russia — per OKEI), for example 796
originCountrynostring(20)Country of origin, for example Russia
originCountryCodenostring(4)Country of origin code, for example 643 for Russia
grossWeightnofloatGross weight, for example 125.45
netWeightnofloatNet weight, for example 125.45
quantityyesfloatQuantity, for example 3
amountyesfloatUnit price, for example 100.55; no limits
amountWoVatyesfloatUnit price excluding VAT
totalAmountyesfloatTotal for all units including VAT, for example 123.55
totalVatAmountyesfloatTotal VAT, for example 23
excisenofloatExcise duty, for example 10.00
gtdNumbernostring(23)Customs declaration number
vatCodeyesstring(20) enumInvoicebox VAT rate code, see the VAT rates reference
serviceDatenodateDate the service was rendered, if the item is a service, for example 2026-09-14
paymentTypeyesstring(20) enumPayment type: full_prepayment, prepayment, advance, full_payment
categoryTyperequired with categorystring(20) enumCategory reference: merchantHonestSignMap (the merchant's own categories) or honestSign (Honest Sign)
categorynostring(20) enumProduct group in the merchant's or Honest Sign reference: milk, water and so on
metaDatanoobjectAdditional basket item data

InvoiceSetting

PropertyRequiredTypeDescriptionExample
customerLockednoboolForbid editing every payer detailtrue to forbid; false by default
customerLockedFieldsnoarray<string>Which Customer fields to lock on the payment page['type', 'name', 'phone', 'email', 'vatNumber', 'registrationAddress']
paymentMethodIdLockednoboolForbid changing the payment methodtrue to forbid; false by default
paymentMethodIdnointIdentifier of the preselected payment method123
paymentMethodCodenostringCode of the preselected payment method. Publicly available: invoice — by invoice, invoice-rtp — invoice via Request to Pay, acquiring — card, sbp — SBP. Other methods are provided on request for a specific integrationinvoice, invoice-rtp, acquiring, sbp
paymentMethodAutosubmitnoboolSend the buyer straight to the payment system from paymentMethodCode, skipping the Invoicebox payment page. Requires a fully filled Customertrue
deliveryAddressnostringFull delivery addressMoscow region, Khimki, Vashutinskoe shosse 6
savePaymentDatanoboolStore the card details for recurring paymentstrue, false
clientIdnostringClient identifier in the merchant's system123, c-102322

OrderSetting

PropertyRequiredTypeDescription
roundPolicynostring(20) enumHow the order total is rounded. strict — no rounding, exact match; none — no rounding, allowed when quantity * amount <= totalAmount; floor — down to the nearest integer; ceil — up to the nearest integer; halfUp — 0.50 rounds up; halfDown — 0.50 rounds down

PaymentInfo

PropertyRequiredTypeDescription
paymentTokennostringPayment token
cardholderNamenostringCardholder name
expirationnostringCard expiry
maskedPannostringMasked card number
paymentSystemnostringCard payment system

Read next »

Параметры запроса — POST

14 required of 76
ПолеТипОписание
description#string≤ 1000 символовОписание заказа
currencyId *#string≤ 3 символовКод валюты заказа по ISO 4217: https://docs.invoicebox.ru/docs/dictionary/iso4217/RUBUSDEURGBP
amount *#numberот 0Сумма заказа. Денежное значение: ровно два знака после точки. В коде считайте Decimal/BigDecimal, не двоичным float
vatAmount *#numberот 0Сумма НДС заказа. Денежное значение: ровно два знака после точки. В коде считайте Decimal/BigDecimal, не двоичным float
basketItems#BillingProviderDomainOrderEntityBasketItemApiCreateCollectionКорзина заказа. Наименования попадают в фискальный чек как есть: требования к номенклатуре — https://docs.invoicebox.ru/docs/merchant/fz54/
merchantId *#stringИдентификатор магазина. В примерах документации стоит демо-магазин — свой возьмите в личном кабинете, вкладка «Интеграция (API)»
status#string≤ 50 символовСтатус заказа (в ответе): created — ожидает оплаты, completed — оплачен, hold — средства захолдированы, canceled — отменён, expired — просрочен
subtype#string≤ 100 символовПодтип заказа: order — обычный (по умолчанию), hold — заказ с холдированиемorderhold
processingStatus#string | null≤ 100 символов
merchantOrderId *#string≤ 100 символовИдентификатор заказа в учётной системе магазина, должен быть уникальным. При повторе после сбоя не меняйте номер — сначала проверьте выборкой, создался ли заказ
merchantOrderIdVisible#string | nullНомер заказа, отображаемый на платёжной странице. Если не заполнено, показывается значение из merchantOrderId
expirationDate#string | nulldate-timeСрок действия заказа. Когда наступает, заказ сам переходит в статус expired — оплатить по старой ссылке нельзя
metaData#ArrayMap | nullДополнительные данные заказа: https://docs.invoicebox.ru/docs/merchant/order/metadata/
notificationUrl#string | null≤ 1000 символовURL для уведомлений об изменениях статуса заказа; по умолчанию используется URL из настроек магазина. Только HTTPS, на localhost уведомление не придёт
orderSetting#BillingProviderDomainOrderEntityOrderSettingApiCreateДополнительные настройки параметров заказа
shopId#integer | nullИдентификатор связанного магазина или маркетплейса
parentId#stringИдентификатор базового заказа — для корректирующих заказов: https://docs.invoicebox.ru/docs/merchant/refund/correction/
returnUrl#string | nullСсылка для возврата на сайт магазина (кнопка «вернуться в магазин» на платёжной странице)
successUrl#string | nullСсылка для перехода на сайт магазина в случае успешной оплаты
failUrl#string | nullСсылка для перехода на сайт магазина в случае ошибки оплаты
customer#BillingProviderDomainOrderEntityCustomerApiCreate | nullИнформация о заказчике. По реквизитам заказчика-юрлица уходят закрывающие документы
languageId#string | nullЯзык интерфейса платёжной страницыruen
contactId#integer | null
contactCounterpartyId#integer | null
processable#booleanПризнак процессингового заказа: true — расчёты проходят в биллинге Инвойсбокса (по умолчанию); false — непроцессинговый заказ: оплату принимает магазин, а Инвойсбокс формирует документы (https://docs.invoicebox.ru/docs/merchant/order/non-processable-order/)
userAccountId#string | nullИдентификатор программы лояльности
invoiceSetting#BillingProviderDomainOrderEntityInvoiceSettingApiCreateДополнительные настройки параметров оплаты
orderContainerId#string | nullИдентификатор контейнера заказов — группы заказов, объединённых одним процессом оплаты покупателя. Указывается, чтобы добавить заказ к уже существующему счёту
paymentInfo#ArrayMap | nullИнформация об оплате и плательщике (в ответе, если заказ оплачен)
holdTill#string | nulldate-timeДата и время списания холдированных средств — для заказов с подтипом hold
Was this page helpful?
postСоздание заказаDemo
curl -X POST 'https://api.invoicebox.ru/v3/billing/api/order/order' \
  -H 'Authorization: Bearer <ВАШ_ТОКЕН>' \
  -H 'Content-Type: application/json' \
  -H 'User-Agent: MyApp 1.0' \
  -d '{
  "merchantId": "ffffffff-ffff-ffff-ffff-ffffffffffff",
  "merchantOrderId": "demo-order-1789910670550",
  "amount": 12000,
  "vatAmount": 0,
  "currencyId": "RUB",
  "languageId": "ru",
  "description": "Оплата бронирования № 4412",
  "expirationDate": "2026-09-21T13:24:30+00:00",
  "successUrl": "https://shop.example.com/order/4412?result=success",
  "failUrl": "https://shop.example.com/order/4412?result=fail",
  "returnUrl": "https://shop.example.com/order/4412?result=return",
  "basketItems": [
    {
      "sku": "room-deluxe",
      "name": "Проживание в номере «Делюкс», 2 ночи",
      "measure": "шт",
      "measureCode": "796",
      "quantity": 1,
      "amount": 12000,
      "amountWoVat": 12000,
      "totalAmount": 12000,
      "totalVatAmount": 0,
      "vatCode": "RUS_VAT0",
      "type": "service",
      "paymentType": "full_prepayment"
    }
  ],
  "customer": {
    "type": "legal",
    "name": "ООО «Ромашка»",
    "vatNumber": "7701234560",
    "taxRegistrationReasonCode": "770101001",
    "phone": "79001112233",
    "email": "buh@example.invbox.ru"
  }
}'
getПолучение списка заказов магазинаDemo
curl -X GET 'https://api.invoicebox.ru/v3/billing/api/order/order' \
  -H 'Authorization: Bearer <ВАШ_ТОКЕН>' \
  -H 'Content-Type: application/json' \
  -H 'User-Agent: MyApp 1.0'