Transaction State Transitions
Overview
Concardis Payengine comes with an order and state transition concept that allows you as merchant and/or integrator to get information on the current state of a payment, i.e. if funds have been transferred or if a customer got declined by a processor etc.
Based on the dedicated status that is always returned through our API, you may take appropriate actions, such as shipping the goods, contact the customer for clarification or similar.
It's worth mentioning that "listening" to the Payengine order and transaction state changes is enough to deal with any possible business case that may arise with any supported payment method- you don't need to translate each payment method's individual states. This job is done by Concardis Payengine, offering you a sole source of aggregated payment status information.
This following section allows you to understand (also in the context of a certain payment method that was used by the customer)
-
a) what each status means
-
b) when a certain status occurs
-
c) what a possible following status could be
State Transitions: Order
Payengine payment transactions always need a parenting entity: the order. An order carries all required information to perform multiple types of transactions, that is a customer, a persona, shipping & billing addresses and payment information. Before you can debit a payment instrument (e.g. a credit card of your customer), you need to create an order. Therefore, the initial status of an order is CREATED. During the 'lifetime' of an order, it remains OPEN but as soon as no further action can follow, it will change to CLOSED.
STATUS | Meaning & Rules | Cards | PayPal | Paydirect | Ratepay |
---|---|---|---|---|---|
CREATED | Initial Status. As long as no transaction is created within order, it remains in CREATED. As soon as first transaction is created it changes to OPEN. | n/a | n/a | n/a | n/a |
OPEN | Remains until one of the amounts are used up, i.e. 100% of initial amount is refunded or 100% of initial amount in cancelled. The order gets expired by scheduler. | n/a | n/a | n/a | n/a |
CLOSED | Final Status. No change on order possible (i.e. no refund/cancel/debit/capture/preauth possible). API replies with according exception „no more transaction possible“ or similar. | n/a | n/a | n/a | n/a |
State Transitions: debit & capture
Transaction types debit and capture are both booking a certain amount on the customers payment instrument, which is the reason why state transitions are handled identically for these two transaction types. Based on the payment method and its individual payment flows, timeframes for each state transition may vary as well as the meaning behind some of the status. Both debit and capture transactions are initially CREATED and will result in a final state- either in a successful or in a failed one.
STATUS | Meaning & Rules | Cards | PayPal | Paydirect | Ratepay |
---|---|---|---|---|---|
CREATED | Initial Status. As long as no contact to processor it remains in CREATED. As soon as processor is contacted it changes to PENDING | Valid for 3ds. Non-3ds result in a direct change to INPROGRESS. | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | n/a |
PENDING | (Customer) Interaction needed. Mostly for async flows (eg PayPal). Directly changes to eg INPROGRESS in case of sync flow or where needed. Might change to INPROGRESS, meaning that the data input has happened and processor can begin with processing. Might change into FAILURE, DECLINED, ABORTED and EXPIRED. | Valid for 3ds. Non-3ds result in a direct change to INPROGRESS. | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | n/a |
IN PROGRESS | Data input successful. Processor is processing the transaction. | n/a | n/a | n/a | n/a |
OK | Processing technically successful. However it is not clear yet if the funds will arrive at all. Also a following risk analysis might result in a DECLINE, depending on the following processes and/or payment method used. | n/a | n/a | n/a | n/a |
SUCCESS | Funds have been booked correctly (SEPA) or got confirmed by processor (see payment method) | n/a | Mapped to SUCCESS status via IPN | Mapped to SUCCESS status | Mapped to SUCCESS status |
FAILURE | Processor declined the transaction. Technical issue caused an excpetion on processor side. | n/a | mapped to according PayPal API exceptions | mapped to according Paydirekt API exceptions | mapped to according Ratepay API exceptions |
DECLINED | Evasion / Payengine declines the transaction (Risk Engine). | n/a | n/a | n/a | n/a |
ABORTED | Customer aborts transaction. Mostly in async flow on processors payment page. Not supported by all payment methods. | n/a | if customer hits „Back to Shop“ on PP payment page and gets redirected to CancelURL | if customer hits „Back to Shop“ on pd payment page and gets redirected to CancelURL | n/a |
EXPIRED | Automatic expiration of non-handled transactions (ie pending for X days) |
Note: Especially in the async flow (but not limited to it), a status update might come in through backchannel/processor notification service (eg IPN for paypal). These updates will change the evasion transaction state as descibed in the table, even after checkout has happened.
State transitions: preauth
Transaction type preauth (preauthorisation) is a non-booking reservation on the according customers payment instrument. It needs to be captured by the merchant, either through API or using the Payengine Merchant Center. A preauth is handled quite similarly to both debit and capture with regards to state transitions, the most important differences are expiration times and the lack of final status SUCCESS (which expresses that funds have been successfully transferred which is not the case within a preauth).
STATUS | Meaning & Rules | Cards | PayPal | Paydirekt | Ratepay |
---|---|---|---|---|---|
CREATED | Initial Status. As long as no contact to processor it remains in CREATED. As soon as processor is contacted it changes to PENDING. | Valid for 3ds. Non-3ds result in a direct change to INPROGRESS. | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | n/a |
PENDING | (Customer) Interaction needed. Mostly for async flows (eg PayPal). Directly changes to eg INPROGRESS in case of sync flow or where needed. Might change to INPROGRESS, meaning that the data input has happened and processor can begin with processing. Might change into FAILURE, DECLINED, ABORTED and EXPIRED. | Valid for 3ds. Non-3ds result in a direct change to INPROGRESS. | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | Until customer is not redirected to any of the URLs (Success, Cancel, Failure), the status remains PENDING | n/a |
IN PROGRESS | Data input successful. Processor is processing the transaction. | n/a | n/a | n/a | n/a |
OK | Processing technically successful. However it is not clear yet if the funds will arrive at all. Also a following risk analysis might result in a DECLINE, depending on the following processes and/or payment method used. | n/a | n/a | n/a | n/a |
FAILURE | Processor declined the transaction. Technical issue caused an excpetion on processor side. | n/a | mapped to according PayPal API exceptions | mapped to according Paydirekt API exceptions | mapped to according Ratepay API exceptions |
DECLINED | Evasion / Payengine declines the transaction (Risk Engine). | n/a | n/a | n/a | n/a |
ABORTED | Customer aborts transaction. Mostly in async flow on processors payment page. Not supported by all payment methods. | n/a | if customer hits „Back to Shop“ on PP payment page and gets redirected to CancelURL | if customer hits „Back to Shop“ on pd payment page and gets redirected to CancelURL | n/a |
EXPIRED | Automatic expiration of non-handled transactions (ie pending for X days). | 14days for pending transactions ( 3DS not run ), 365 days for OK → Expired, if no capture in this timeframe | 365 days | 365 days | 180 days |
State transitions: cancel & refund
Whereas cancel allows you to reverse a non-booked transaction (i.e. a preauth) only, a refund is the equivalent for booked transactions (i.e. debit and capture).
STATUS | Meaning & Rules | Cards | PayPal | Paydirekt | Ratepay |
---|---|---|---|---|---|
CREATED | Initial Status. As long as no contact to processor it remains in CREATED. As soon as processor is contacted it changes to PENDING. | n/a | n/a | n/a | n/a |
IN PROGRESS | Data input successful. Processor is processing the transaction. | n/a | n/a | n/a | n/a |
OK | Processing technically successful. However it is not clear yet if the funds will arrive at all. Also a following risk analysis might result in a DECLINE, depending on the following processes and/or payment method used. | n/a | n/a | n/a | n/a |
SUCCESS | Funds have been booked correctly (SEPA) or got confirmed by processor (see payment method). | n/a | n/a | n/a | n/a |
FAILURE | Processor declines the transaction (rule engine). Technical issue caused an exception on processor side. | n/a | n/a | n/a | n/a |
Type | General Description | Cards | PayPal | Paydirekt | Ratepay |
---|---|---|---|---|---|
cancel | Cancels an amount up to 100% of preauth amount. A preauth must exist. The status of a preauth must be OK. | n/a | n/a | n/a | n/a |
refund | Reverts funds to a specific payment instrument used for a debit or capture. Up to 100% of captured amount (capture+debit) can be refunded. Captured amount must exist. The status of the debit and/or capture transactions must be SUCCESS. | n/a | n/a | n/a | n/a |
capture | Books up to 100% of a preceding preauth. Preauth must be in status OK. | n/a | n/a | n/a | n/a |