# Add entry action to Paid status in state transition system

**URL:** <https://forum.litium.com/t/add-entry-action-to-paid-status-in-state-transition-system/516>\
**Category:** Questions\
**Tags:** payment\
**Created:** [January 22, 2019, 8:48am UTC](https://forum.litium.com/t/add-entry-action-to-paid-status-in-state-transition-system/516 "2019-01-22T08:48:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![abergman](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@abergman](https://forum.litium.com/u/abergman)\
**Post date:** [January 22, 2019, 8:48am UTC](https://forum.litium.com/t/add-entry-action-to-paid-status-in-state-transition-system/516/1 "2019-01-22T08:48:35Z")

</div>

Is it possible to add an entry action to the payment status Paid in state transition system?

We use the Adyen plugin and we want to execute integration code when a payment gets Paid.

Litium version: 7.02

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [January 22, 2019, 9:09am UTC](https://forum.litium.com/t/add-entry-action-to-paid-status-in-state-transition-system/516/2 "2019-01-22T09:09:23Z")

</div>

> [@abergman](#):
>
> Is it possible to add an entry action to the payment status Paid in state transition system?

No, it is not possible to add entry and exist actions for the payment states.

What you can do is to add a related state so when the state is changed for the payment you will move the order into next state that can have entry/exit actions.

---

<div class="post-metadata">

**Author:** ![abergman](https://avatars.discourse-cdn.com/v4/letter/a/3da27b/32.png) [@abergman](https://forum.litium.com/u/abergman)\
**Post date:** [January 22, 2019, 10:11am UTC](https://forum.litium.com/t/add-entry-action-to-paid-status-in-state-transition-system/516/4 "2019-01-22T10:11:07Z")

</div>

> [@patric.forsgard](#):
>
> What you can do is to add a related state so when the state is changed for the payment you will move the order into next state that can have entry/exit actions.

Ok, is this the recommended way to handle server-to-server background calls from PSPs?

If we for example get at notification from Adyen that a payment is successfully captured.

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [January 22, 2019, 10:17am UTC](https://forum.litium.com/t/add-entry-action-to-paid-status-in-state-transition-system/516/5 "2019-01-22T10:17:25Z")

</div>

Yes, it’s the recommended method.

More information about how the state transition system with our state engine is found [here](https://docs.litium.com/documentation/litium-documentation/sales/working_with_state_transitions).
