.. _closeday: Close day #################################### .. toctree:: :maxdepth: 1 .. contents:: :local: .. role:: ex .. role:: code Overview ================================ For some processors, funds are transferred to the bank account only after the Close Day procedure, which initiates bank clearing. Close Day procedure can be initiated via API, manually with "Close Day" button on the Gate level, or automatically each day at pre-set or system selected time. If for any reason it is not possible to make "Close Day" using via API, then it is necessary to perform "Close Day" procedure manually on the Gate level. .. Warning:: During the Close Day procedure the following gate will be blocked and transactions will not go through it. .. _forced_close_day: Manual day closure ================================== | | In order to perform Close Day procedure, go to :code:`Settings` -> :code:`Configuration` -> :code:`Gates`: | .. image:: ../../../_static/images/gates/gatestepsnew.png :alt: gatesteps :align: center :width: 650 | .. image:: ../../../_static/images/gates/gatesteps1new.png :alt: gatesteps1 :align: center :width: 650 | | On the gate details page, click the :code:`Close day` button and confirm this action on the pop-up window. The window “Close day for ‘gate name’” will appear on the page. Wait for the operation to complete: | .. image:: ../../../_static/images/gates/closedaybuttonnew.png :alt: closedaybutton :align: center :width: 500 | | After the successful day closure, the gate details page will display the day closing date and the amount of transactions from the last to the current day closing date: | .. image:: ../../../_static/images/gates/lastdaynew.png :alt: lastday :align: center :width: 500 .. _automatic_close_day: Automatic day closure ===================================== | | In order to perform Close Day automatically, go to :code:`Settings` -> :code:`Configuration` -> :code:`Gates`: | .. image:: ../../../_static/images/gates/gatestepsnew.png :alt: gatesteps :align: center :width: 650 | .. image:: ../../../_static/images/gates/gatesteps1new.png :alt: gatesteps1 :align: center :width: 650 | | On the gate details page, click the :code:`Edit` button, mark :code:`Automatic closing of the day` and click :code:`Save`. The optimal Close Day time is selected by the system automatically (UTC+3): | .. image:: ../../../_static/images/gates/autoclosurenew.png :alt: autoclosure :align: center :width: 700 | | After each successful day closure, the gate details page will display the day closing date and the amount of transactions from the last to the current day closing date: | .. image:: ../../../_static/images/gates/lastdaynew.png :alt: lastday :align: center :width: 500 .. _automatic_pre_set: Automatic scheduled day closure ========================================================== | | In order to perform Close Day automatically at pre-set time, go to :code:`Settings` -> :code:`Configuration` -> :code:`Gates`: | .. image:: ../../../_static/images/gates/gatestepsnew.png :alt: gatesteps :align: center :width: 650 .. image:: ../../../_static/images/gates/gatesteps1new.png :alt: gatesteps1 :align: center :width: 650 | | On the gate details page, click the :code:`Edit` button and mark :code:`Close day automatically`. After that :code:`Close day time` row. Select the preferred close day time and then click :code:`Save`. Please note, that :code:`Automatic closing of the day` checkbox must be turned off, otherwise the gate closing time will be selected automatically by the system: | .. image:: ../../../_static/images/gates/autoclosepresetnew.png :alt: autoclosepreset :align: center :width: 700 | | After each successful day closure, the gate details page will display the day closing date and the amount of transactions from the last to the current day closing date: | .. image:: ../../../_static/images/gates/lastdaytimenew.png :alt: lastdaytime :align: center :width: 500 .. _closeday_via_api: Allow closing day via API ========================================================== | In order to allow this procedure via API, go to :code:`Settings` -> :code:`Configuration` -> :code:`Gates`: .. image:: ../../../_static/images/gates/gatestepsnew.png :alt: gatesteps :align: center :width: 650 .. image:: ../../../_static/images/gates/gatesteps1new.png :alt: gatesteps1 :align: center :width: 650 | On the gate details page, click the :code:`Edit` button, mark :code:`Allow closing day via API`. The number of days after which the Close Day will be triggered automatically can be set in the :code:`Day closing maximum delay (days)` (3 days is automatically set) then click :code:`Save`: .. image:: ../../../_static/images/gates/closeday_via_api_new.png :alt: closeday_via_api :align: center :width: 700 Gate Lock Release Tool ========================================================== If during the gate closure via API one or more Gates remained blocked (in the body of the response with :ex:`status`: :ex:`finished` for Gate - :ex:`isDayClosing : true`), then removal of the lock can be done manually. In order to make this procedure go to :code:`Settings` -> :code:`Configuration` -> :code:`Gates`: .. image:: ../../../_static/images/gates/gatestepsnew.png :alt: gatesteps :align: center :width: 650 | .. image:: ../../../_static/images/gates/gatesteps1new.png :alt: gatesteps1 :align: center :width: 650 | | On the Gate details page tap on :code:`Locks`: | .. image:: ../../../_static/images/gates/gatelocknew.png :alt: gatelock :align: center :width: 650 | The current Gate lock information is displayed in the “Current locks” menu: * :code:`Lock session ID` - ID of the lock session. * :code:`Start day closing date` - the start date of the Close Day. * :code:`Bank terminal lock status`- blocking the :code:`Endpoint` for performing transactions (Blocked/Free). * :code:`Initial gate job status` - the status of the initialization :code:`Gate`. * :code:`Close day job status` - the status of the closing :code:`Gate`. * :code:`Is day closing` - the :code:`Gate` is in the closing stage which means that is it locked or not (:ex:`Y`/:ex:`N`). :ex:`Y` - the Gate is blocked, :ex:`N` - not blocked. The following unlock commands are available: * :code:`CLEAR_TRANSACTION_LOCK` - reset the session that caused the lock. * :code:`CLEAR_INIT_ATTEMPT`- reset the status of the initialization :code:`Gate`. * :code:`CLEAR_CLOSING_DAY_ATTEMPTS` - reset the status of the closing :code:`Gate`. * :code:`CLEAR_CLOSING_DAY_FLAG` - reset the assignment of the closing :code:`Gate`, remove the lock. Mark the applicable menu checkbox and click the :code:`Update` button. After the unlock, re-open the Gate Lock Release Tool and check that the status of the lock parameter has changed in the “Current locks” menu. For example, if the :code:`Gate` was blocked, then after removing the lock, the parameter equals to :ex:`Is day closing = N`. .. image:: ../../../_static/images/gates/closedaylocknew.png :alt: closedaylock :align: center :width: 300