Online point of sale (OS) should:
Working principle: The OS system use basic API of PG, which services were upgraded for additional information reception. This additional information involves all necessary data for fiscal document creation. After aggregation in PG, it is transferred to online fiscal services. This services receive these data, make a record on fiscal drive, form fiscal receipt, and send data to fiscal data controlling company.
Fiscalization service is integrated into basic PG service, which is responsible for operations on orders - orderv2. OS aggregates additional information about the sale (order cart) and pass it to PG service in register request. Such approach allows to perform order registration and cart data transfer in one call. The information about order cart is passed in OrderItem block of parameters. Each unique order cart element (goods or service) or a group of same unique order cart elements is passed in one OrderItem block. In case if order cart contains various elements - each of them is passed in its own separate OrderItem block.
Note:
parameter | Optinal (O) / Mandatory (M) | type | description | comment | example |
---|---|---|---|---|---|
OrderItem | O | complex | order cart element (s) description | ||
typename | M | string | order cart element type | goods / service | |
taxation_system | О | string | taxation system type (list of taxation system types is available in p.3.2) | taxation system parameter can not be passed in case if OS uses only one taxation system type; taxation system parameter should be passed for every OrderItem element in case if OS uses several taxation system types; fiscal check will not be formed if taxation system parameter is fulfilled incorrectly |
general |
quantity | O | float, integer part must be no more than 5 digits, fractional part - no more than 3 digits | order cart element / same order cart elements quantity | 10 | |
name | O | string max 64 | order cart element description | Футболка | |
measure | O | string max 64 | order cart element measure | Штука by default | |
amount | O | complex | total cost for one or group of same element(s) | ||
amount/currency | M | string | currency code | RUB | |
amount/amount | M | float | cost | 1000.00 | |
taxes | O | complex | tax description for order cart element(s) | ||
taxes/tax | M | complex | tax description | ||
taxes/tax/type | M | string | tax type | vat | |
taxes/tax/percentage | M | string | tax percentage value (list of tax percentage values is available in p.3.1) | OS should pass percentage = no in case if OrderItem element is not subject to VAT; PG will set 18 percent value in case if OS pass incorrect value of percentage parameter in request (not from table) |
10 |
taxes/tax/amount | M | complex | tax cost value | ||
taxes/tax/amount/currency | M | string | currency code | RUB | |
taxes/tax/amount/amount | M | float | total tax cost value for one or group of same element(s) | 100.00 | |
clearing | string | O | settlement type | travel specific parameter | card |
number | string | M | web order number or order cart element reference number in service-provider system (travel specific parameter) | 12345 | |
host | string | O | service-provider system code | travel specific parameter | sirena |
Request example:
<soap-env:Envelope
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<register>
<order>
<shop_id>123</shop_id>
<number>12345</number>
</order>
<cost>
<currency>RUB</currency>
<amount>1010</amount>
</cost>
<customer>
<phone>+79859998877</phone>
<name>Vasya Pupkin</name>
<email>vasya@gmail.ru</email>
</customer>
<description>
<timelimit>2015-04-21T23:23:23</timelimit>
<sales>
<OrderItem>
<typename>goods</typename>
<quantity>10</quantity>
<name>Футболка</name>
<amount>
<currency>RUB</currency>
<amount>1000.00</amount>
</amount>
<number>12345</number>
<taxation_system>general</taxation_system>
<taxes>
<tax type="vat">
<percentage>10</percentage>
<amount>
<currency>RUB</currency>
<amount>100.00</amount>
</amount>
</tax>
</taxes>
</OrderItem>
<OrderItem>
<typename>service</typename>
<name>Сервисные сборы</name>
<clearing></clearing>
<amount>
<currency>RUB</currency>
<amount>10</amount>
</amount>
<number>12345</number>
<host>sirena</host>
<taxation_system>simple_income</taxation_system>
<taxes>
<tax type="vat">
<percentage>no</percentage>
<amount>
<currency>RUB</currency>
<amount>0</amount>
</amount>
</tax>
</taxes>
</OrderItem>
</sales>
</description>
<postdata>
<PostEntry>
<name>Language</name>
<value>ru</value>
</PostEntry>
<PostEntry>
<name>ReturnURLOk</name>
<value>http://abc.ru</value>
</PostEntry>
<PostEntry>
<name>ReturnURLFault</name>
<value>http://abc.ru</value>
</PostEntry>
</postdata>
</register>
</soap-env:Body>
</soap-env:Envelope>
Response example:
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:Body>
<registerResponse xmlns="http://www.sirena-travel.ru">
<retval>
<session>c857e452e31349d7b2e9a4b1738e9453</session>
<paycode>01112223334440</paycode>
<redirect_url>https://sandbox.egopay.ru/payments/request</redirect_url>
</retval>
</registerResponse>
</soap-env:Body>
</soap-env:Envelope>
Note: more information about services description can be found in basic PG API.
value | description |
---|---|
20 | VAT 20% |
10 | VAT 10% |
20/120 | VAT 20/120 |
10/110 | VAT 10/110 |
0 | VAT 0% |
no | no VAT |
abbreviation | description |
---|---|
general | common system of taxation |
simple_income | simplified taxation system (on income) |
simple_profit | simplified taxation system (on income-expense) |
unified_agricultural | uniform agricultural tax |
patent | patent system of taxation |