Performing Refunds
Refunds allow your merchants to transfer the amount of a previous charge
transaction back to the shopper.
Refunds are implemented as Linked Refunds, meaning you need to provide the
transactionIdentifier
of the previous charge transaction in
order to perform the refund. For Linked Refunds it is not required for the
shopper to present their card again, and the refund will be paid out on the
exact same card as used for the charge.
To perform a refund, you need to create new
MPTransactionParameters
with the
transactionIdentifier
of the previous charge transaction.
For partial refunds, you need to specify the amount that should 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 one of the following:
The original transaction that now contains information about the refund in the
transaction.refundDetails
An error message indicating why refunding the charge failed
To check if a transaction can be refunded in general, see
transaction.refundDetails.status
.
There might be the rare occasion when the
transactionIdentifier
of
the previous charge is not available, e.g. should your POS system not allow the
merchant to retrieve the original invoice containing the
transactionIdentifier
.
In this scenario Standalone Refunds allow the merchant to perform a refund without
reference to the previous charge transaction. The shopper must present their card
again.
Standalone Refunds have a high risk profile, i.e. merchant money can be
paid out without limitations. Only consider offering them 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 beforehand to ensure all prerequisites are met. Specifically you need to
ensure that:
Each merchant provides you with a written confirmation that they understand that
Standalone Refunds potentially allow to pay out merchant money without
limitations and that only authorized store personal must be allowed to use
them.
Your POS system protects usage of the Standalone Refund feature, i.e. your POS system
make sure that only authorized store personal (like store owner or supervisor)
can use it and that usage is protected by a password or PIN. Note that before
allowing you to go LIVE with Standalone Refunds, we will verify this
requirements 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(...);
// ....