Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesA Refund allows the merchant to reimburse the cardholder.
The referenceNumber can be used as a follow-up to a card detection to create a one-tap refund.
The following code snippet demonstrates how you can perform a Refund.
Payment payment = Payment
.builder()
.type(Payment.Type.REFUND)
.amount(Money.EUR(10))
.referenceNumber(referenceNumber)
// Add this to receive card HashData in the result (OPI-DE)
.hashAlgorithm(HashAlgorithm.DEFAULT)
.customerSaltIndex("0-255") // only needed with HashAlgorithm OFFLINE_SHA_256
.build();
PaymentApi paymentService = new PaymentService();
PaymentDelegate paymentDelegate = new PaymentDelegate() {
...
};
paymentService.payment(terminal, payment, paymentDelegate);
The following code snippet demonstrates how you can perform a Refund via card token.
Payment payment = Payment
.builder()
.type(Payment.Type.REFUND)
.amount(Money.EUR(10))
.hashData("123456789")
.build();
PaymentApi paymentService = new PaymentService();
PaymentDelegate paymentDelegate = new PaymentDelegate() {
...
};
paymentService.payment(terminal, payment, paymentDelegate);