Method RefundOrder
RefundOrder(AfterPayCreateRefundRequest, AfterPayCallContext)
Creates a refund against a previously created order.
Declaration
public Task<AfterPayRefund> RefundOrder(AfterPayCreateRefundRequest request, AfterPayCallContext requestContext)
Parameters
Type | Name | Description |
---|---|---|
AfterPayCreateRefundRequest | request | A AfterPayCreateRefundRequest containing details of the refund to create. |
AfterPayCallContext | requestContext | A AfterPayCallContext instance containing additional details required to make the request. |
Returns
Type | Description |
---|---|
Task<AfterPayRefund> | An AfterPayRefund containing details of the refund created within the AfterPay system. |
Implements
Remarks
This method will keep retrying until success, or a non-409 response error is received. If an exception of any type other than AfterPayApiException,
This method will automatically retry on timeout up to MinimumRetries. If the last retry times out, a
Exceptions
Type | Condition |
---|---|
AfterPayApiException | Thrown if the request is rejected by the AfterPay API. |
System.ArgumentNullException | Thrown if |
System.UnauthorizedAccessException | Thrown if the system cannot obtain an authorisation token from AfterPay before making the request. |
System.TimeoutException | Thrown if the request times out on the last retry attempt. If this type of exception is throw a reversal is required. |