Performing Refunds
The Refunds feature enables your merchants to transfer the amount of a previous charge transaction back to the shopper.
Linked Refunds
Refunds are implemented as Linked Refunds, which requires you to provide the
transactionIdentifier
of the previous charge transaction in order to perform the refund. For Linked Refunds, the shopper is not required to present their card again and the refund is paid to the same card used for the charge.To perform a refund, you must create new
MPTransactionParameters
with the transactionIdentifier
of the previous charge transaction.For partial refunds, you must specify the amount that will be refunded.
MPTransactionParameters *parameters = [MPTransactionParameters refundForTransactionIdentifier:@"<transactionIdentifier>" optionals: ^(id<MPTransactionParametersRefundOptionals> _Nonnull optionals) { optionals.subject = @"Refund for Bouquet of Flowers"; optionals.customIdentifier = @"yourReferenceForTheTransaction"; // For partial refunds, specify the amount to be refunded // and the currency from the original transaction // [optionals setAmount:[NSDecimalNumber decimalNumberWithString:@"1.00"] currency:MPCurrencyEUR]; }];
This is a modification to an existing transaction so you now must pass the parameters to the
[MPTransactionProvideramendTransactionWithParameters:]
.As a result, you will receive either:
- The original transaction that now contains information about the refund in thetransaction.refundDetails.
- An error message indicating why refunding the charge failed.
To check if a transaction can be refunded, see
transaction.refundDetails.status
.Standalone Refunds
There might be a rare occasion when the
transactionIdentifier
of the previous charge transaction is not available. For example, this situation could occur if your POS system does not allow the merchant to retrieve the original invoice containing the transactionIdentifier
. In this scenario, Standalone Refunds enable the merchant to perform a refund without reference to the previous charge transaction. The shopper must present their card again for this type of refund.Standalone Refunds have a high risk profile because merchant money can be paid without limitations. Only consider offering standalone refunds after you are absolutely sure that Linked Refunds are not possible in your setup.
Should your merchants require Standalone Refunds, please talk to your account manager before starting your integration to ensure that all prerequisites are met. Specifically you must ensure that:
- Each merchant provides you with a written confirmation that they understand that Standalone Refunds potentially allow for pay out of merchant money without limitations, and that only authorized store personal must be allowed to use them.
- Your POS system protects the use of the Standalone Refund feature. This protection would include your POS system only allowing authorized store personal (such as a store owner or supervisor) to use the feature, and that the use of the feature is protected by a password or PIN. Before allowing you to go live with Standalone Refunds, we will verify that this requirement is met as part of our testing requirements.
Standalone Refunds are run similarly to charge transactions, but use the
refundWithAmount
instead of the chargeWithAmount
when building the MPTransactionParameters
:MPTransactionParameters *parameters = [MPTransactionParameters refundWithAmount:[NSDecimalNumber decimalNumberWithString:@"1.00"] currency:MPCurrencyGBP optionals: ^(id<MPTransactionParametersStandaloneRefundOptionals> _Nonnull optionals) { optionals.subject = @"Refund for Bouquet of Flowers"; optionals.customIdentifier = @"yourReferenceForTheTransaction"; }];
Performing Refunds
The Refunds feature enables your merchants to transfer the amount of a previous charge transaction back to the shopper.
Linked Refunds
Refunds are implemented as Linked Refunds, which requires you to provide the
transactionIdentifier
of the previous charge transaction in order to perform the refund. For Linked Refunds, the shopper is not required to present their card again and the refund is paid to the same card used for the charge.To perform a refund, you must create new
MPTransactionParameters
with the transactionIdentifier
of the previous charge transaction.For partial refunds, you must specify the amount that will be refunded.
TransactionParameters parameters = new TransactionParameters.Builder() .refund("<transactionIdentifer>") // For partial refunds, specify the amount to be refunded // and the currency from the original transaction //.amountAndCurrency(new BigDecimal("1.00"), io.mpos.transactions.Currency.EUR) .build();
This is a modification to an existing transaction so you are now passing the parameters to the
TransactionProvider.amendTransaction()
.As a result, you will receive either:
- The original transaction that now contains information about the refund in thetransaction.refundDetails.
- An error message indicating why refunding the charge failed.
To check if a transaction can be refunded, see
transaction.refundDetails.status
.Standalone Refunds
There might be a rare occasion when the
transactionIdentifier
of the previous charge transaction is not available. For example, this situation could occur if your POS system does not allow the merchant to retrieve the original invoice containing the transactionIdentifier
. In this scenario, Standalone Refunds enable the merchant to perform a refund without reference to the previous charge transaction. The shopper must present their card again for this type of refund.Standalone Refunds have a high risk profile because merchant money can be paid without limitations. Only consider offering standalone refunds after you are absolutely sure that Linked Refunds are not possible in your setup.
Should your merchants require Standalone Refunds, please talk to your account manager before starting your integration to ensure all prerequisites are met. Specifically you must ensure that:
- Each merchant provides you with a written confirmation that they understand that Standalone Refunds potentially allow for pay out of merchant money without limitations and that only authorized store personal must be allowed to use them.
- Your POS system protects the use of the Standalone Refund feature. This protection would include your POS system only allowing authorized store personal (such as a store owner or supervisor) to use the feature, and that the use of the feature is protected by a password or PIN. Note that before allowing you to go LIVE with Standalone Refunds, we will verify this requirements is met as part of our testing requirements.
Standalone Refunds are run similarly to charge transactions, but use the
refund()
instead of the charge()
when building the TransactionParameters
:TransactionParameters transactionParameters = new TransactionParameters.Builder() .refund(new BigDecimal("5.00"), io.mpos.transactions.Currency.EUR) .subject("Refund for Bouquet of Flowers") .customIdentifier("yourReferenceForTheTransaction") .build(); TransactionProcess paymentProcess = transactionProvider.startTransaction(...); // ....