CancelRefund
The CancelRefund
-CUWO is responsible for reverting any authorization or processing a AuthorizeRefund
- or ProcessRefund
-CUWO may have performed before failing (or on user cancellation or failure on the enforePOS side after successful CUWO execution).
As it cannot be guaranteed that the cancelation can be performed, the CUWO may return refund processing data as part of a failure result. That data will be stored as part of the refund (which will be marked as failed) on the enfore side, so that the refund on the enfore side and the transaction on the external side can be manually reconciled.
This type of CUWO is invoked when:
- An
AuthorizeRefund
-CUWO failed (to ensure that the potentially authorized refund is released/reverted) - A
ProcessRefund
-CUWO failed (to ensure that the authorized and potentially processed refund is released/reverted) - An
AuthorizeRefund
-CUWO returned with "success" but the subsequent processing of the refund was canceled or failed on the enforePOS side.
Workflow parameters
The CancelRefund
-CUWO will receive a CancelRefundWorkflowParameters
structure as input.
The structure is defined as:
/**
* The parameter/input structure for a "cancel refund" workflow.
*/
class CancelRefundWorkflowParameters extends WorkflowParameters {
readonly "@type" : string = "n4.cuwo.workflows.refunds.cancelrefund.CancelRefundWorkflowParameters";
/**
* The ID of the refund that is to be canceled.
*/
public refundProcessID : string;
/**
* The reference of the refund to cancel as provided
* by the AuthorizeRefund workflow.
*/
public refundReference? : string;
/**
* The processing data of the refund to cancel as
* provided by the AuthorizeRefund workflow.
*/
public refundProcessingData? : string;
}
Success result
On success, the CancelRefund
-CUWO is expected to pass a CancelRefundWorkflowResult
structure to terminateSuccess
.
The structure is defined as:
/**
* The result/output structure for a successful "cancel refund" workflow.
*/
class CancelRefundWorkflowResult extends WorkflowResult {
readonly "@type" : string = "n4.cuwo.workflows.refunds.cancelrefund.CancelRefundWorkflowResult";
/**
* Optional update for the processing data of the refund.
*
* When provided, replaces the previously stored refund processing
* data. When not provided, a previously stored refund processing
* data stays unchanged.
*/
public refundProcessingData? : string;
}
Failure result
On failure, the CancelRefund
-CUWO is expected to pass a CancelRefundWorkflowFailure
structure to terminateFailure
.
The structure is defined as:
/**
* The result/output structure for a failed "cancel refund" workflow.
*/
class CancelRefundWorkflowFailure extends WorkflowFailure {
readonly "@type" : string = "n4.cuwo.workflows.refunds.cancelrefund.CancelRefundWorkflowFailure";
/**
* The reason for the failure.
*/
public failureReason : CancelRefundWorkflowFailureReason;
/**
* A failure code specific to the CUWO.
*
* 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 UI.
*/
public failureCode? : string;
/**
* Optional update for the processing data of the refund.
*
* When provided, replaces the previously stored refund processing
* data. When not provided, a previously stored refund processing
* data stays unchanged.
*/
public refundProcessingData? : string;
}
Cancelation result
The CancelRefund
workflow does not support cancelation.