.. _fiscalization_service: Fiscalization service ##################### .. contents:: :local: .. role:: ex .. role:: code Overview ^^^^^^^^^^^^^^^^^^^^^^^^^^ | Fiscalization service is used for registration of financial cheques and invoices in Payneteasy payment gateway and their further processing. Fiscalization is supported for both initial and recurring :ex:`Sale` and :ex:`Preauth` transactions, via Server-To-Server or Form integration. See the suitable integration scenario in respective Use-Cases or ask support manager for details. Transaction with cheque/invoice is processed by Payneteasy Payment Gateway with additional requests for tax accounting. Fiscalization service parameter (cheque) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | In order to initiate a transaction with the use of fiscalization service, Connecting Party sends an :ex:`HTTPS POST` request for sale or preauth transaction with additional parameter. .. list-table:: :widths: 30,30, 40 :header-rows: 1 :class: longtable * - Request Parameters - Type - Comment * - :code:`cheque` - Json string - Financial cheque or invoice. Mandatory for transaction request with Fiscalization Json string structure for cheque parameter ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | A simple json string example for :ex:`cheque` parameter: .. code-block:: none { "cheque_type" : 1, "tax_system" : 1, "positions" : [ { "quantity" : 2, "price" : 322.94, "tax" : 4, "description" : "Product/Service 1" }, { "quantity" : 1, "price" : 500, "tax" : 4, "description" : "Product/Service 2" } ] } | Json string parameters: .. list-table:: :widths: 15, 15, 20, 50 :header-rows: 1 :class: longtable * - Parameter - Type - Comment - Possible values * - :code:`cheque_type` - Decimal - Calculation type/sign - 0 - income, 1 - expense, 2 - return of income, 3 - return of expense * - :code:`tax_system` - Decimal - Tax system - 0 - General taxation system, 1 - Simplified income taxation system, 2 - Simplified income minus expense taxation system, 3 - Unified tax on imputed income, 4 - Unified agricultural tax, 5 - Patent system of taxation * - :code:`positions` - Array - Array of products/services - Array of products/services * - :code:`quantity` - Decimal - Quantity of product/service - * - :code:`price` - Decimal - Price per product/service considering discounts and mark-ups - * - :code:`tax` - Decimal - value-added tax - 1 - 22% value-added tax, 2 - 10% value-added tax, 3 - 0% value-added tax, 4 - without value-added tax, 5 - 22/122 value-added tax, 6 - 10/110 value-added tax * - :code:`description` - String(128) - Description of product/service - .. Note:: Please take into consideration that the total price of all products/services which are provided in :ex:`positions` array should be equal to :ex:`amount` parameter value of sale request. Example of transaction request with fiscalization ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | This example of Server-To-Server Sale request body with fiscalization displays how to correctly include the cheque parameter. Response example is provided in relevant API command documentation. .. code-block:: none client_orderid=902B4FF5 &order_desc=Test Order Description &first_name=John &last_name=Smith &ssn=1267 &birthday=19820115 &address1=100 Main st &city=Seattle &state=WA &zip_code=98102 &country=US &phone=%2B12063582043 &cell_phone=%2B19023384543 &amount=700.00 &email=john.smith@gmail.com ¤cy=USD &ipaddress=65.153.12.232 &site_url=www.google.com &credit_card_number=4538977399606732 &card_printed_name=CARD HOLDER &expire_month=12 &expire_year=2099 &cvv2=123 &purpose=user_account1 &redirect_url=https://doc.payneteasy.com/doc/dummy.htm &server_callback_url=https://httpstat.us/200 &merchant_data=VIP customer &cheque={ "cheque_type" : 1, "tax_system" : 1, "positions" : [ { "quantity" : 2, "price" : 100.00, "tax" : 4, "description" : "Product/Service 1" }, { "quantity" : 1, "price" : 500, "tax" : 4, "description" : "Product/Service 2" } ] } &control=768eb8162fc361a3e14150ec46e9a6dd8fbfa483