# Status Transitions

This page explains the possible status transitions a transaction could go through and what they mean.

## Credit Card transaction statuses

`OPEN` - Credit Card transaction has been created. This is the initial status.\
`AUTHORIZED` - Credit Card payment is authorized.\
`SUCCESS` - Credit Card transaction has been successfully paid.\
`CANCELLED` - Credit Card transaction has not succeeded; cancelled by the consumer.\
`EXPIRED` - Credit Card transaction has not succeeded; expired.\
`FAILURE` - Credit Card transaction has not succeeded; unknown reason.

## Status Transitions

The diagram below shows all state transitions a Credit Card transaction could go through.

![](https://files.readme.io/5018cb3-State_-_CreditCard_Statuses.png)

Once a Credit Card transaction has been created the status will be `OPEN`. While the state of a Credit Card transaction is `OPEN` a consumer can try to make a payment with it.

Once a payment is successful, the transaction status will transition to `SUCCESS`.  This is the happy-flow. At this point the consumer has paid and the funds will eventually make its way to your accounts.

It can also happen that the payment of a transaction has been authorized, but not yet paid, in this case the status will be `AUTHORIZED`. Eventually it can transitions to `SUCCESS`.

Of course there are other possibilities as you will have seen in the state diagram.

It could transition to `CANCELLED` if the consumer did not complete the payment and instead clicked on the cancel button.

It could transition to `EXPIRED` if the `expiresAt` timestamp has been reached and the transaction is still `OPEN`.

It could transition to `FAILURE` if the payment failed.