Integration (API) (eng)

All your requests should be in JSON format.

Attention! If you want to see only code and not to read manual - you can download READY-TO-GO scripts and libraries (in PHP) and test them yourself here.

For all requests there should be parameters:

  1. kassaid
  2. kassatoken

These parameters you can take only in your account. This account we give you only after conclusion of an agreement with us by company (if you want to test your integration - you should send us an email in freestyle to [email protected])

So lets see some example request.

Your unencrypted request should have this style:

{
    "kassaid": "123456",
    "kassatoken": "12345678912345678912345678912345",
    "cms": "ss7-7.3.0.209",
    "check_send_type": "email",
    "name_zakaz":"заказ 51",
    "check_vend_address": "Address of vending machine",
    "check_vend_mesto": "Place of vending machine ",
    "check_vend_num_avtovat": "Number of vending machine ",
    "products_arr": [{
        "name_tovar": "Name of product 1",
        "price_piece_bez_skidki": 7744,
        "skidka": 1297,
        "kolvo": 2,
        "price_piece": 7095,
        "summa": 14191,
        "stavka_nds": 6,
        "priznak_sposoba_rascheta": 4,
        "priznak_predmeta_rascheta": 1,
        "priznak_agenta": "none",
        "phone_oper_perevoda": "",
        "operation_plat_agenta": "",
        "phone_oper_priem_plat": "",
        "name_oper_perevoda": "",
        "address_oper_perevoda": "",
        "inn_oper_perevoda": "",
        "phone_postavshika": "",
        "name_postavshika": "",
        "discount": {
            "type": "amount",
            "value": 12.97
        }
    }, {
        "name_tovar": "Name of product 2",
        "price_piece_bez_skidki": 155,
        "skidka": 26,
        "kolvo": 2,
        "price_piece": 142,
        "summa": 284,
        "stavka_nds": 6,
        "priznak_sposoba_rascheta": 4,
        "priznak_predmeta_rascheta": 4,
        "priznak_agenta": "none",
        "phone_oper_perevoda": "",
        "operation_plat_agenta": "",
        "phone_oper_priem_plat": "",
        "name_oper_perevoda": "",
        "address_oper_perevoda": "",
        "inn_oper_perevoda": "",
        "phone_postavshika": "",
        "name_postavshika": "",
        "discount": {
            "type": "amount",
            "value": 0.26
        }
    }, {
        "name_tovar": "Name of product 3 (marking)",
        "price_piece_bez_skidki": 2277,
        "skidka": 191,
        "kolvo": 1,
        "price_piece": 2086,
        "summa": 2086,
        "stavka_nds": 6,
        "priznak_sposoba_rascheta": 4,
        "priznak_predmeta_rascheta": 1,
        "priznak_agenta": "none",
        "code_tov_nomen": "818208-B21",
        "phone_oper_perevoda": "",
        "operation_plat_agenta": "",
        "phone_oper_priem_plat": "",
        "name_oper_perevoda": "",
        "address_oper_perevoda": "",
        "inn_oper_perevoda": "",
        "phone_postavshika": "",
        "name_postavshika": "",
        "discount": {
            "type": "amount",
            "value": 1.91
        }
    }, {
        "name_tovar": "Delivery by some transport company",
        "price_piece": 30000,
        "summa": 30000,
        "kolvo": 1,
        "stavka_nds": 6,
        "priznak_sposoba_rascheta": 4,
        "priznak_predmeta_rascheta": 1,
        "priznak_agenta": "none",
        "phone_oper_perevoda": "",
        "operation_plat_agenta": "",
        "phone_oper_priem_plat": "",
        "name_oper_perevoda": "",
        "address_oper_perevoda": "",
        "inn_oper_perevoda": "",
        "phone_postavshika": "",
        "name_postavshika": "",
        "deliveryposition": "yes"
    }],
    "oplata_arr": {
        "rezhim_nalog": "2",
        "money_nal": 0,
        "money_electro": 46561,
        "money_predoplata": 0,
        "money_postoplata": 0,
        "money_vstrecha": 0,
        "kassir_inn": "",
        "kassir_fio": "",
        "client_email": "[email protected]",
        "client_phone": "123"
    },
    "itog_arr": {
        "priznak_rascheta": 1,
        "itog_cheka": 46561
    }

So lets descibe all these paramaters.

  • As we said, kassaid and kassatoken you can take in your nanokassa's account. [string]
  • In parameter cms we should specify which CMS (Content Management System) is using. This parameter is requeired. By this parameter we can understand how we should process your request. If your request is typical - so your should use "wordpress" parameter (in 90% of the case)
  • In parameter check_send_type we should specify where we will send a cash receipt. Possible values: "email" or "phone". If you will specify email, so we will get information that customer want to see cash receipt in his email. If you will specify phome, so we will get information that customer want to see cash receipt in his mobile phone by SMS. Cash receipt will send «OFD»(We call OFD which means goverment approved company that is storing cash receipts for a long time (5-10 years)). So you can tell us, which type of transport customer want to take a cash receipt. So this information we tell to our cashbox, and cashbox sending these receipts to OFD. If you choose phone, Merchant should pay for SMS to OFD. (OFD take more money if Merchant sending cash receipts to Customer by SMS) [email, phone]
  • In array products_arr  you should specify products that should be fiscalized. More about this array you can read below.
  • In array oplata_arr  you should specify additional information about payment. More about this array you can read below.
  • In array itog_arr  you should specify conclusion about cash receipt. More about this array you can read below.


Lets describe array products_arr.

  • (1) In parameter name_tovar, you should specify name of product/service that should be fiscalized [string] [max 65 symb].
  • (2) In parameter price_piece_bez_skidki, you should specify product cost for 1 piece without discount (in kopeek) (one Ruble = 100 kopeek (like cents in dollar))
  • (3) In parameter skidka, you should specify discount (in kopeek)
  • (4) In parameter kolvo, you should specify quantity of products [float]
  • (5) In parameter price_piece, you should specify product cost for 1 piece with discount. This number should be final for this product and this number will be sending to cashbox (in kopeek)
  • (6) In parameter summa, you should specify sum of the cost of all products (attention! See carefully in first product to understand interconnection between kolvo, price_piece and summa (summa = kolvo * price_piece)) (in kopeek)
  • (7) In parameter stavka_nds, you should specify VAT rate which is using exactly for this product/service [int]:
    • 1 - НДС 20% (VAT rate 20%)
    • 2 - НДС 10% (VAT rate 10%)
    • 3 - НДС 20/120 (VAT rate 20/120)
    • 4 - НДС 10/110 (VAT rate 10/110)
    • 5 - НДС 0% (VAT rate 0%)
    • 6 - НДС не облагается (without VAT rate)
  • (8) In parameter priznak_sposoba_rascheta you should specify sign of calculation method [int]:
    • 1 - Full advance payment until the transfer of product
    • 2 - Partial advance payment until the transfer of product
    • 3 – Prepaid expense
    • 4 - Full payment, including prepaid expense (advance payment) at the time of transfer of the product
    • 5 - Partial payment of the product at the time of its transfer, followed by payment on credit
    • 6 - Transfer of the product without payment at the time of its transfer, followed by payment on credit
    • 7 - Payment of the product after its transfer with payment on credit (loan payment)
  • (9) In parameter priznak_predmeta_rascheta you should specify, what this products refers to (product contains information about ...):
    • 1 - about the product, excluding excisable goods
    • 2 - about the sold excisable goods
    • 3 - about the work performed
    • 4 - about the service provided
    • 5 - about on the acceptance of bets when carrying out gambling activities
    • 6 - about on the payment of cash in the form of a gain in carrying out gambling activities
    • 8 - about on the payment of cash in the form of a gain in the implementation of lottery activities
    • 9 - about on granting rights to use the results of intellectual activity or means of individualization <
    • 10 - about an advance, a deposit, an advance payment, a loan, a contribution for payment, a penalty, a fine, a fee, a bonus, a bonus and other similar subject of calculation
    • 11 - about the remuneration of the user who is a payment agent
    • 12 - about the product, consisting of items, each of which can be assigned a value from "1" to "11"
    • 13 - about the product, not related to the subjects of calculation, which can be assigned a value from "1" to "12"
  • (10) In parameter priznak_agenta you should specify payment agent. If Merchant that have cashbox is not a payment agent for this product you should specify this parameter like "none". If this parameter is not "none" so you 11-18 parameters are also required. [string]
    • 0 - Provision of services to a buyer (client) by a user who is a bank payment agent (BPA)
    • 1 - Provision of services to a buyer (client) by a user who is a bank payment subagent (BPSA)
    • 2 - Provision of services to the buyer (client) by the user who is the payment agent (PA)
    • 3 - Provision of services to a buyer (client) by a user who is a payment subagent (PSA)
    • 4 - Settlement with a buyer (client) user who is an attorney
    • 5 - Settlement with a buyer (client) user who is a commission agent
    • 6 - Settlement with a buyer (client) user who is an agent and is not a bank payment agent
  • (11) In parameter phone_oper_perevoda you should specify transfer's phone operator (BPA, BPSA) [string]
  • (12) In parameter operation_plat_agenta you should specify transaction by payment agent (BPA, BPSA) [string]
  • (13) In parameter phone_plat_agent you should specify phone payment's agent (PA, PSA) [string]
  • (14) In parameter phone_oper_priem_plat you should specify phone payment's operator (PS, PSA) [string]
  • (15) In parameter name_oper_perevoda you should specify name of the transaction operator (BPA, BPSA) [string]
  • (16) In parameter address_oper_perevoda you should specify transaction's operator address (BPA, BPSA) [string]
  • (17) In parameter inn_oper_perevoda you should specify transaction's operator INN (its like ITIN (or EIN) in USA) (BPA, BPSA) [string]
  • (18) In parameter phone_postavshika you should specify provider's product phone (for all types of agents)
  • (19) In parameter name_postavshika you should specify name of product's provider (for all types of agents)
  • (20) In parameter discount you should specify about the discount - array of 2 parameters
    • (21) In parameter type you should specify type of discount on this product (amount for sum for an example) [string]
    • (22) In parameter value you should specify cost of discount for this product [float]

Lets describe array oplata_arr.

  • In parameter rezhim_nalog you should specify Merchant's tax system [int]
    • 0 – Общая (Main)
    • 1 - Упрощенная доход (Simplified income)
    • 2 - Упрощенная доход минус расход (Simplified revenue minus expense)
    • 3 - Единый налог на вмененный доход (A single tax on imputed income)
    • 4 - Единый сельскохозяйственный налог (Single agricultural tax)
    • 5 - Патентная система налогообложения (Patent Tax System)
  • In parameter money_nal you should specify the amount of money received in cash without commas or dots (in kopeek)
  • In parameter money_electro you should specify the amount of money received in non-cash (electronic) without commas or dots (in kopeek)
  • In parameter money_predoplata you should specify the amount of money received in Prepayment (offset advance payment) without commas or dots (in kopeek)
  • In parameter money_postoplata you should specify the amount of money received in Postpay (on credit) without commas or dots (in kopeek)
  • In parameter money_vstrecha you should specify the amount of money received in Counter presentation without commas or dots (in kopeek)
  • In parameter kassir_inn you should specify INN of the cashier (you can not specify this parameter if you cashbox is working on vending or online store)
  • In parameter kassir_fio you should specify Full Name of the cashier (you can not specify this parameter if you cashbox is working on vending or online store)
  • In parameter client_email you should specify Customer Email. On this email OFD will send electornic receipt. This parameter should pass standart email validation
  • In parameter client_phone you should specify Customer phone number. On this phone OFD will send electronic receipt by SMS. This parameter should have only numbers (without plus)


Lets describe array itog_arr.

  • In parameter priznak_rascheta you should specify sign of calculation [int]:
    • 1 - Приход - Arrival of money (supporting from 01.01.2018)
    • 2 - Возврат прихода - Refund (supporting from 01.01.2018)
    • 3 - Расход - Spending money (supporting from 01.09.2018)
    • 4 - Возврат расхода - Refund money expense (supporting from 01.09.2018)
  • In parameter itog_cheka you should specify the amount of the receipt, taking into account all discounts and all other (in kopeek) (Attention! All sum must be exact. So all cost of amounts of all products should be the same like in itog_cheka

About vending

By our goverment, Merchant can use one cashbox in Data center for all his vending machines. But for all receipt you should send additional information about where vending machine is located. Every receipt should have parameters: address of vending machine, place of vending machine and number of vending machine.
In parameter check_vend_address you should specify address of vending machine [string] [max 256 symb]
In parameter check_vend_mesto you should specify place of vending machine [string] [max 256 symb]
In parameter check_vend_num_avtovat you should specify number of vending machine [string] [max 20 symb]


In parameter test you should specify if this request is test or army. Attention! You must fill it! If you will not fill it - so it will be army request and this request will go to cashbox. (Available values: 0; 1) (1 - test request. 0 - army request). This parameter you should fill in both encryptions. Dont forget about this.

After this you should encrypt this request.

First encryption.