# Payment Session State Model
For the easiest integration we have designed the session status model to be similar to other payment channels that the e-shop integrates with.
<br>
<p align="center">
<img src="/static/epos-payment-session-state-model.svg" style="width: 440px;"/>
</p>
<br>
| <b>Status</b> | <b>Description</b> |
|  --- | --- |
| <p>pending</p><p></p> | A session is created;<br>Credit application may be or not be in progress;<br>Positive but not accepted credit decisions also remain in this status until they expire. |
| cancelled | The customer has cancelled the process. |
| <p>granted </p><p></p> | Credit has been granted to the customer, there are no obstacles from the Inbank side for sales completion.<br>The process is now waiting for merchant's approval, if configured so.<br>If the flow is configured not to wait for merchant's approval, this state may be omitted (see note below). |
| <b>completed</b> | This is the target state: credit contract between customer and Inbank has been activated, merchant is liable for the delivery of goods/services. |
| declined | Credit was declined by Inbank. |
| expired | The session was not completed during the defined time period. |

The integration flow can be configured to require a final merchant-side confirmation step, before the credit application process is completed. This is somewhat similar to the credit card flows where the amount is first reserved on the credit card account (transaction is approved), and is later 'captured' after the merchant has completed the transaction.
This may be handy if the stock is limited and the merchant does not allocate stock items before it is ensured that the customer can get the credit. If the merchant does not send the final approval (i.e. items are out of stock, order can not be completed), the granted credit is not completed.
