Table of Contents
Overview
The Payment Device SDK for iOS and Android offers two different methods of refunding. This article will discuss how the two refunds, Linked and Standalone, differ from each other. There will also be examples of how to perform each type of refund using the Payment SDK for Android/iOS.
Linked Refund
A linked refund is a refund that is associated with and linked to an original transaction. This type of refund is typically processed by referencing the original transaction and using the same payment information from the original transaction to issue the refund. The main benefit of a linked refund is that it is faster and easier to process compared to a standalone refund since the payment information is already on file and does not need to be re-entered.
In order to perform a Linked Refund transaction you will need to reference the original transaction. To do this you will need to use the Sale Reference (ONE Platform) or CardEase Reference (CardEase Platform) from the original transaction. This will link the refund back to the original transaction, including the amount.
It is worth noting that the amount can be specified if you would like to refund a lower amount than the original transaction (Partial Refund). Below is the function used to process a linked refund, along with the parameter keys that you will want to include in the request. When using the SalesReference
parameter key, you will not use the CardEaseReference
parameter key and vice versa.
Android Examples
Parameters params = new Parameters();
params.add(ParameterKeys.Currency, "USD");
params.add(ParameterKeys.UserReference, "123456789"); params.add(ParameterKeys.SalesReference, "test-transaction-reference");
// Can choose to use CardEaseReference instead of SalesReference params.add(ParameterKeys.CardEaseReference, "5bee1699-2ea6-ed11-80f0-0050569c467c");
Parameters response = linkedRefundTransaction(params);
iOS Examples
CCParameters *request = [[CCParameters alloc] init]; [request setValue:"USD" forKey:CCParamCurrency]; [request setValue:"123456789" forKey:CCParamUserReference]; [request setValue:"test-transaction-reference" forKey:CCParamSaleReference];
// Can use this instead of SalesReference [request setValue:"5bee1699-2ea6-ed11-80f0-0050569c467c" forKey:CCParamCardEaseReference]; CCParameters *response = [[ChipDnaMobile sharedInstance] linkedRefundTransaction:request];
Standalone Refund
A standalone refund, on the other hand, is a refund that is processed independently of any previous transaction. This type of refund may also be referred to as a "blind" credit. This is because the refund will not link to any previous transaction.
The main benefit of a standalone refund is that it allows for more flexibility, as it can be issued for any amount, regardless of the original transaction amount. Standalone refunds are typically not recommended and are not enabled by default for merchant accounts, due to the risk of being able to enter any amount.
Below is the function used to start a standalone refund, along with the parameter keys required to process this type of transaction.
Android Examples
Parameters params = new Parameters();
params.add(ParameterKeys.UserReference, "123456789");
params.add(ParameterKeys.Currency, "USD");
params.add(ParameterKeys.TransactionType, ParameterValues.Refund);
params.add(ParameterKeys.Amount, "123");
Parameters response = ChipDnaMobile.getInstance().startTransaction(params);
iOS Examples
CCParameters *request = [[CCParameters alloc] init]; [request setValue:"123" forKey:CCParamAmount]; [request setValue:"USD" forKey:CCParamCurrency]; [request setValue:CCValueRefund forKey:CCParamTransactionType]; [request setValue:"123456789" forKey:CCParamUserReference]; CCParameters *response = [[ChipDnaMobile sharedInstance] startTransaction:request];