• Home
  • API Documentation
Show / Hide Table of Contents
  • Yort.AfterPay.InStore
    • AfterPayApiError
      • ErrorCode
      • ErrorId
      • HttpStatusCode
      • Message
    • AfterPayApiException
      • AfterPayApiException
      • ErrorCode
      • ErrorId
      • HttpStatusCode
    • AfterPayCallContext
      • OperatorId
    • AfterPayClient
      • AfterPayClient
      • CreateOrder
      • DisposeManagedResources
      • Ping
      • PreapprovalEnquiry
      • RefundOrder
      • RegisterDevice
      • ReverseOrder
      • ReverseRefund
      • SendInvite
    • AfterPayConfiguration
      • AfterPayConfiguration
      • DefaultCurrency
      • DeviceId
      • DeviceKey
      • Environment
      • HttpClient
      • MerchantId
      • MinimumRetries
      • ProductName
      • ProductVendor
      • ProductVersion
      • RetryDelaySeconds
      • SystemClock
    • AfterPayConstants
      • JsonMediaType
      • ProductionRootUrl
      • SandboxRootUrl
    • AfterPayCreateOrderRequest
      • Amount
      • MerchantReference
      • OrderItems
      • PreapprovalCode
      • RequestedAt
      • RequestId
    • AfterPayCreateRefundRequest
      • Amount
      • MerchantReference
      • OrderId
      • OrderMerchantReference
      • RequestedAt
      • RequestId
    • AfterPayCurrencies
      • AustralianDollars
      • NewZealandDollars
    • AfterPayDeviceRegistration
      • DeviceId
      • Key
    • AfterPayDeviceRegistrationRequest
      • Attributes
      • Name
      • Secret
    • AfterPayEnvironment
      • Production
      • Sandbox
    • AfterPayInviteRequest
      • ExpectedAmount
      • MobileNumber
      • NormalizePhoneNumber
    • AfterPayMoney
      • AfterPayMoney
      • Amount
      • Currency
      • Equality
      • Equals
      • GetHashCode
      • Inequality
      • ToString
    • AfterPayMoneyJsonConverter
      • CanConvert
      • ReadJson
      • WriteJson
    • AfterPayOrder
      • Amount
      • MerchantReference
      • OrderedAt
      • OrderId
      • OrderItems
      • PreapprovalCode
      • RequestedAt
      • RequestId
    • AfterPayOrderItem
      • Name
      • Price
      • Quantity
      • Sku
    • AfterPayOrderReversal
      • RequestedAt
      • ReversedAt
      • ReverseId
      • ReversingRequestId
    • AfterPayPreapprovalRequest
      • PreapprovalCode
    • AfterPayPreapprovalResponse
      • Amount
      • ExpiresAt
      • Minimum
    • AfterPayRefund
      • Amount
      • MerchantReference
      • OrderId
      • OrderMerchantReference
      • RefundedAt
      • RefundId
      • RequestedAt
      • RequestId
    • AfterPayRefundReversal
      • RequestedAt
      • ReversedAt
      • ReverseId
      • ReversingRequestId
    • AfterPayReverseOrderRequest
      • RequestedAt
      • ReversingRequestId
    • AfterPayReverseRefundRequest
      • RequestedAt
      • ReversingRequestId
    • AfterPaySystemClock
      • DefaultInstance
      • Now
    • AfterPayToken
      • ExpiresAt
      • ExpiresIn
      • IsExpired
      • IssuedAt
      • Token
    • AfterPayTokenRequest
      • Key
    • IAfterPayClient
      • CreateOrder
      • Ping
      • PreapprovalEnquiry
      • RefundOrder
      • RegisterDevice
      • ReverseOrder
      • ReverseRefund
      • SendInvite
    • IAfterPaySystemClock
      • Now

Method ReverseRefund

ReverseRefund(AfterPayReverseRefundRequest, AfterPayCallContext)

Creates a refund reversal against a previously created refund.

Declaration
public Task<AfterPayRefundReversal> ReverseRefund(AfterPayReverseRefundRequest request, AfterPayCallContext requestContext)
Parameters
Type Name Description
AfterPayReverseRefundRequest request

A AfterPayReverseRefundRequest containing details of the refund reversal to create.

AfterPayCallContext requestContext

A AfterPayCallContext instance containing additional details required to make the request.

Returns
Type Description
Task<AfterPayRefundReversal>

An AfterPayRefundReversal containing details of the refund reversal created within the AfterPay system.

Implements
IAfterPayClient.ReverseRefund(AfterPayReverseRefundRequest, AfterPayCallContext)
Remarks

This method is intended to ensure a refuund is cancelled when it's status is/was unknown at the time the customer was present. For more information see https://docs.afterpay.com.au/instore-api-v1.html#refund-reversal

This method will keep retrying until success, or a non-409 response error is received. If an exception of any type other than AfterPayApiException, , is thrown by this method, a reversal should be retried later.

This method will automatically retry on timeout up to MinimumRetries. If the last retry times out, a will be thrown. On a 409 response it will retry until any other error or response is received.

Exceptions
Type Condition
AfterPayApiException

Thrown if the request is rejected by the AfterPay API.

System.ArgumentNullException

Thrown if request or requestContext is null.

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 the reversal must be retried later.

Back to top Copyright (c) 2017 Troy Willmot