4D Payments SDK 2016 .NET Edition
4D Payments SDK 2016 .NET Edition
Questions / Feedback?

Refund Method

Refunds a previous transaction.

Syntax

[VB.NET]
Public Sub Refund(ByVal PNRef As String)
[C#]
public void Refund(string PNRef);

Remarks

This method issues a refund based on a previously authorized and settled transaction (Either a Sale, Capture, or Force). A transaction can only be refunded if it exists in a previous batch. (If the transaction is in the current open batch, use VoidTransaction instead). To process a refund, call Refund with the PNRef parameter set to the PNRef returned in response from the transaction for which you wish to issue a refund and set the TransactionAmount to the amount you wish to refund. You may issue a partial refund for any value up to the original sale amount. For example:

Full Refund:

component.TransactionAmount = "25.00"; // Original transaction was for $25.00, so this is a full refund
component.Refund("123456"); // "123456" is the PNRef from the original transaction
Partial Refund:
component.TransactionAmount = "15.00"; // Original transaction was for $25.00, so this is a partial refund
component.Refund("123456"); // "123456" is the PNRef from the original transaction

If you do not know the PNRef from the original transaction, use Credit instead.

Note: Partial refunds are supported regardless of the time and date or batch status (open or closed). To perform a partial refunds, pass any TransactionAmount that is less than the original transaction amount to the Refund transaction as per the example above.

 
 
Copyright (c) 2020 4D Payments Inc. - All rights reserved.
4D Payments SDK 2016 .NET Edition - Version 16.0 [Build 7311]