DocsInteractive API Docs/api/v1/shop/order/create
post

/api/v1/shop/order/create

Create a new order. After create a order, please redirect customer to links.orderPageLink.

customer is the payer; issuerCustomer (optional) is the issuer — if omitted, the issuer is the organisation.

Endpoint Info
Base URLapi.bizkithub.com
AuthBearer Token
Methods1
Authentication Required

This endpoint requires a valid API key passed as a query parameter or Bearer token.

Get your API key

Parameters

1 query, 23 body parameters

apiKeystringrequired

Your BizKitHub API key (passed as GET parameter).

Key format: A 32-character string matching: ^(PROD|DEV_|ROOT)[A-Za-z0-9]{28}$
Prefixes: PROD (production key), DEV_ (individual developer), ROOT (system key with no limits). Learn more

customerobjectrequired

Paying customer (payer). This customer pays the order and is used as the primary billing entity. If the specified customer account does not exist, the system will automatically create a new customer and link it to the order.

issuerCustomerobject

Order issuer. The party that issues the order (e.g. delegated purchase or invoicing). Use only when the order is issued by a specific customer. For common e-shop orders, this field should be omitted — the issuer is the organisation by default. If the specified customer does not exist, the system will automatically create one.

copyCustomersstring[]

List of alternative e-mails of customers for e-mail copy.

cartIdstring
itemsobject[]required
orderGroupIdstring

Organisation defined order group code.

localestring

Communication locale code used to filter content.

Supported locales: cs, en, fr, it, pl, de, sk, sv, es, zh, ja, uk, da.

Length: 2 - 2
currencystring

Currency code. Format: 3-letter uppercase code (e.g. CZK).
Supported values: CZK, EUR, USD.

salenumber

Absolute value in order-defined currency.

voucherListstring[]

List of voucher codes to apply to the order.

paymentMethod"credits" | "money"

Payment strategy.

  • credits (default): Uses customer credits first, remaining amount is paid with money.
  • money: Forces full payment with money only; customer credits are ignored.
Values: creditsmoney
Default: credits
deliveryPricenumber

Absolute value in order-defined currency.

paymentPricenumber

Absolute value in order-defined currency.

expirationDatestring
Format: date-time
dueDatestring
Format: date-time
internalNoticestring

Your internal notice for organisation members. Customer should never see this notice.

publicNoticestring

Public notice defined by customer in cart. This notice can be displayed in e-mail and order detail page.

tagsobject
returnUrlstring
notificationUrlstring
formDataobject
forceIgnoreNegativeCreditBalanceboolean

Mark the order as paid immediately. The customer can go into negative credit. Payment will not be processed.

Default: false
forceIssueInvoiceboolean
Default: false

Example Request

JavaScript fetch

const response = await fetch("https://api.bizkithub.com/api/v1/shop/order/create?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "customer": {
      "email": "jan@barasek.com",
      "name": "Jan Barášek",
      "firstName": "Jan",
      "lastName": "Barášek",
      "phone": "+420 777123456",
      "companyName": "BizKitHub",
      "companyRegistrationNumber": "05103118",
      "taxIdentificationNumber": "CZ9609040727",
      "streetAddress": "R. Novotného 1505",
      "city": "Kladno",
      "cityPart": "Kročehlavy",
      "stateRegion": "Středočeský kraj",
      "postalCode": "272 01",
      "country": "CZ",
      "newsletter": false,
      "primaryLocale": "cs",
      "groups": [
        []
      ],
      "customerRealIp": "1.1.1.1",
      "referralId": "1cGIHvFoQDGLAbcA"
    },
    "issuerCustomer": {
      "email": "jan@barasek.com",
      "name": "Jan Barášek",
      "firstName": "Jan",
      "lastName": "Barášek",
      "phone": "+420 777123456",
      "companyName": "BizKitHub",
      "companyRegistrationNumber": "05103118",
      "taxIdentificationNumber": "CZ9609040727",
      "streetAddress": "R. Novotného 1505",
      "city": "Kladno",
      "cityPart": "Kročehlavy",
      "stateRegion": "Středočeský kraj",
      "postalCode": "272 01",
      "country": "CZ",
      "newsletter": false,
      "primaryLocale": "cs",
      "groups": [
        []
      ],
      "customerRealIp": "1.1.1.1",
      "referralId": "1cGIHvFoQDGLAbcA"
    },
    "copyCustomers": [
      []
    ],
    "cartId": "b411056d304d9y6mHe2SoMFBL2Apxfnb",
    "items": [
      {
        "label": "Cheese burger",
        "price": 0,
        "vat": 0,
        "count": 0,
        "sale": 10,
        "unit": "ks",
        "productCode": "burger",
        "variantCode": "cheese-burger",
        "eventCode": "2WRp6X5rSqQa321EjHB2mxZz74u74H84",
        "creditAmount": 100,
        "specialActions": "create-voucher:fixed:500;add-credit:15"
      }
    ],
    "orderGroupId": "branch-vinohrady",
    "locale": "cs",
    "currency": "CZK",
    "sale": 0,
    "voucherList": [
      []
    ],
    "paymentMethod": "credits",
    "deliveryPrice": 10,
    "paymentPrice": 0,
    "expirationDate": "2024-05-01T10:00:00.000Z",
    "dueDate": "2024-05-01T10:00:00.000Z",
    "internalNotice": "example_internalNotice",
    "publicNotice": "example_publicNotice",
    "tags": {},
    "returnUrl": "https://gymroom.cz/rezervace/dekujeme",
    "notificationUrl": "example_notificationUrl",
    "formData": {
      "code": "example_code",
      "data": {}
    },
    "forceIgnoreNegativeCreditBalance": false,
    "forceIssueInvoice": false
  })
});

const data = await response.json();
console.log(data);
post

Example Response

200Success
{
  "orderNumber": "25000087",
  "hash": "sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S",
  "links": {
    "orderPageLink": "https://bizkithub.com/order?hash=sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S",
    "payLink": "https://bizkithub.com/order/pay?hash=sSO98YxzR4KJiOu66Jn6K3wRwa4FPI7S"
  }
}

cURL

Command line example

curl -X POST "https://api.bizkithub.com/api/v1/shop/order/create?apiKey=PRODPGrFxpGEtrOZfuWhnoJohUYBXuOE" \
  -H "Content-Type: application/json" \
  -d '{
  "customer": {
    "email": "jan@barasek.com",
    "name": "Jan Barášek",
    "firstName": "Jan",
    "lastName": "Barášek",
    "phone": "+420 777123456",
    "companyName": "BizKitHub",
    "companyRegistrationNumber": "05103118",
    "taxIdentificationNumber": "CZ9609040727",
    "streetAddress": "R. Novotného 1505",
    "city": "Kladno",
    "cityPart": "Kročehlavy",
    "stateRegion": "Středočeský kraj",
    "postalCode": "272 01",
    "country": "CZ",
    "newsletter": false,
    "primaryLocale": "cs",
    "groups": [
      []
    ],
    "customerRealIp": "1.1.1.1",
    "referralId": "1cGIHvFoQDGLAbcA"
  },
  "issuerCustomer": {
    "email": "jan@barasek.com",
    "name": "Jan Barášek",
    "firstName": "Jan",
    "lastName": "Barášek",
    "phone": "+420 777123456",
    "companyName": "BizKitHub",
    "companyRegistrationNumber": "05103118",
    "taxIdentificationNumber": "CZ9609040727",
    "streetAddress": "R. Novotného 1505",
    "city": "Kladno",
    "cityPart": "Kročehlavy",
    "stateRegion": "Středočeský kraj",
    "postalCode": "272 01",
    "country": "CZ",
    "newsletter": false,
    "primaryLocale": "cs",
    "groups": [
      []
    ],
    "customerRealIp": "1.1.1.1",
    "referralId": "1cGIHvFoQDGLAbcA"
  },
  "copyCustomers": [
    []
  ],
  "cartId": "b411056d304d9y6mHe2SoMFBL2Apxfnb",
  "items": [
    {
      "label": "Cheese burger",
      "price": 0,
      "vat": 0,
      "count": 0,
      "sale": 10,
      "unit": "ks",
      "productCode": "burger",
      "variantCode": "cheese-burger",
      "eventCode": "2WRp6X5rSqQa321EjHB2mxZz74u74H84",
      "creditAmount": 100,
      "specialActions": "create-voucher:fixed:500;add-credit:15"
    }
  ],
  "orderGroupId": "branch-vinohrady",
  "locale": "cs",
  "currency": "CZK",
  "sale": 0,
  "voucherList": [
    []
  ],
  "paymentMethod": "credits",
  "deliveryPrice": 10,
  "paymentPrice": 0,
  "expirationDate": "2024-05-01T10:00:00.000Z",
  "dueDate": "2024-05-01T10:00:00.000Z",
  "internalNotice": "example_internalNotice",
  "publicNotice": "example_publicNotice",
  "tags": {},
  "returnUrl": "https://gymroom.cz/rezervace/dekujeme",
  "notificationUrl": "example_notificationUrl",
  "formData": {
    "code": "example_code",
    "data": {}
  },
  "forceIgnoreNegativeCreditBalance": false,
  "forceIssueInvoice": false
}'

Need an API key?

All BizKitHub API endpoints require authentication via API key.

Get API Key