CapturePayment
The CapturePayment
-CUWO is responsible for capturing a previously authorized amount for a payment request. This type of CUWO will only be used, when an AuthorizeOrCapturePayment
-CUWO returns with state AUTHORIZED
, as only then a separate capture step is needed.
If the CUWO fails, it is unclear whether the amount was captured or not. Thus, the enfore platform will execute the CancelPayment
-CUWO to try to release the authorization/revert the capture.
Workflow parameters
The CapturePayment
-CUWO will receive a CapturePaymentWorkflowParameters
structure as input.
The structure is defined as:
/**
* The parameter/input structure for a "capture payment" workflow.
*/
class CapturePaymentWorkflowParameters extends WorkflowParameters {
readonly "@type" : string = "n4.cuwo.workflows.paymentsandpayouts.capturepayment.CapturePaymentWorkflowParameters";
/**
* The ID of the payment request whose payment is to be captured.
*/
public paymentRequestID : string;
/**
* The payment reference of the payment to capture as provided
* by the AuthorizeOrCapturePayment workflow.
*/
public paymentReference? : string;
/**
* The payment processing data of the payment to capture as
* provided by the AuthorizeOrCapturePayment workflow.
*/
public paymentProcessingData? : string;
}
Success result
On success, the CapturePayment
-CUWO is expected to pass a CapturePaymentWorkflowResult
structure to terminateSuccess
.
The structure is defined as:
/**
* The result/output structure for a successful "capture payment" workflow.
*/
class CapturePaymentWorkflowResult extends WorkflowResult {
readonly "@type" : string = "n4.cuwo.workflows.paymentsandpayouts.capturepayment.CapturePaymentWorkflowResult";
/**
* Optional update for the payment processing data of the payment.
*
* When provided, replaces the previously stored payment processing
* data. When not provided, a previously stored payment processing
* data stays unchanged.
*/
public paymentProcessingData? : string;
/**
* Additional information to be stored with/printed on the payment
* receipt/invoice for the payment.
*/
public customReceiptDocumentInformation? : DataList<CustomDocumentInformation>
}
Failure result
On failure, the CapturePayment
-CUWO is expected to pass a CapturePaymentWorkflowFailure
structure to terminateFailure
.
The structure is defined as:
/**
* The result/output structure for a failed "capture payment" workflow.
*/
class CapturePaymentWorkflowFailure extends WorkflowFailure {
readonly "@type" : string = "n4.cuwo.workflows.paymentsandpayouts.capturepayment.CapturePaymentWorkflowFailure";
/**
* The reason for the failure.
*/
public failureReason : CapturePaymentWorkflowFailureReason;
/**
* A failure code specific to the payment method.
*
* The enfore platform simply stores that code and displays it to the user but does
* not understand it or base any processing on it.
*
* This enables storing a short error identifier from an external system in a way
* that allows it to be shown in the enforePOS sales/payment history UI.
*/
public failureCode? : string;
/**
* Optional update for the payment processing data of the payment.
*
* When provided, replaces the previously stored payment processing
* data. When not provided, a previously stored payment processing
* data stays unchanged.
*/
public paymentProcessingData? : string;
}
Cancelation result
The CapturePayment
workflow does not support cancelation.