Operations
An operation represents an action performed on an order, such as a payment or a reversal. The operation is encoded in the API via the "operationId" parameter, whose value is always assigned by XPay and returned in response in calls to:
The APIs made available for managing operations are presented below.
- Search operation (GET /operations/{operationId}): returns information relating to an operation.
- Operations list (GET /operations): returns the list of operations that satisfy the filters set in the request.
- Actions list (GET /operations/{operationId}/actions): retrieve the allowed actions (e.g. Refund , Capture) associated with an operation and the acceptable range of values.
- Refund (POST /operations/{operationId}/refunds): make a refund. A refund is the cancellation of a payment, with the consequent crediting of the amount to the customer.
- Capture (POST /operations/{operationId}/captures): perform a capture operation: the confirmation of an authorized payment.
-
It is necessary to distinguish between two capture methods:
- Implicit: at the same time as the payment phase, each authorized transaction is implicitly captured. It is therefore not necessary to use the capture API.
- Explicit: after the payment phase, it will be necessary to explicitly confirm the authorized transactions that you want to be captured and settled through the capture API.
- Cancel (POST /operations/{operationId}/cancels): cancels a capture operation. It does not apply to any other type of operation.
NOTES:
Operations performed through the back office panel are not visible via API. For instance, in the case of a refund operation carried out in the back office, such activity will not be detectable through the order inquiry API.