History API
The History API defines a server to server specification for querying operation history information from the Payen Platform.
In certain scenarios (as depicted in Figure 1), it is not possible to send the response derived by the Payen Platform (or Gateway) back to the client once the transaction has been completed, typically due to transient communication issues outside the control of the client or the Payen Platform.

This can leave an inconsistency between the data held at the gateway and the data held at the client, often requiring intervention to correct. This API is designed to allow a faster, automated approach to reconciling systems upstream from the Payen Platform.
Operations
The API enables the client to use an automated process to accurately reconcile their records based on the operations that constitute the transactions, rather than at transaction level. This ensures that the API will always provide the same information for a given period, negating the need to poll the same period periodically for potential changes, reducing the overhead for both the client and the gateway.
Scenarios
Some operation outcome examples follow.
Scenario 1
Normal flow, with AUTH and CAPTURE events

Here, we see a typical sequence of AUTH followed by CAPTURE. A subsequent invocation of the History API would return:

Scenario 2
Here we have a successful flow, depicting an interrupted client notification.

Here the capture completes normally, however the Payen Platform was unable to notify the client in a timely manner. Invoking the history API here will return the missing information:

Scenario 3
Here we have a successful flow; however the Payen Platform was unable to retrieve the outcome at the time of the transaction. Retry processing will later confirm the outcome.

In this scenario, invoking the history API will return the missing information:

This shows how a new event is created to log the success, historical information is never modified.