Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesPartial approval means that in case a cardholder has insufficient funds to approve the transaction for the full amount. Example: when the total amount of the transaction is EUR 100,- and the balance of the cardholder account is EUR 80,- the transaction will be approved for EUR 80,-. In this example this means there will be a remainder EUR 20,- to be paid by other means.
Partial Approval is applicable to:
The TotalAmount present in the response shows the partial amount that is actually authorized. Now it is up to the POS to determine that the actual amount paid is EUR 80, and the remaining EUR 20,- still have to be paid.
The E-Journal is enhanced to report the partial approval. The following elements in the E-Journal are involved:
When the cardholder has no means to pay the remaining amount, you need to a cancellation any to enable reversal of the partial approval amount. You can find how to do that here.
createTerminal(ExternalTerminal.TerminalType.OPI_NL);
PaymentApi paymentService = new PaymentService();
PaymentDelegate paymentDelegate = new PaymentDelegate() {
@Override
public void onPaymentSuccess(PaymentResult result) {
// The payment is completed successful!
// The paymentResult contains all information about the transaction
}
@Override
public void onError(Error error) {
// The payment failed
// The Error object contains information about what went wrong
}
};
Payment payment = Payment
.builder()
.type(Payment.Type.SALE)
.amount(new Money(amount, Currency.getInstance("EUR")))
.supportOfPartialApproval(true)
.build();
paymentService.payment(terminal, payment, delegate);
For OPI-DE terminals, partial approval is enabled on the ExternalTerminal with partialApprovalAllowed(true). It is sent for payments (Payment.Type.SALE) and reservations (Payment.Type.PREAUTHORIZATION).
The PaymentResult exposes the outcome:
partialApproval(): true when the terminal approved only part of the requested amount.amount(): the amount that was actually approved.originalAmount(): the amount that was originally requested, as reported by the terminal (null if not reported).
ExternalTerminal terminal = ExternalTerminal.builder()
// ...
.terminalType(ExternalTerminal.TerminalType.OPI_DE)
.partialApprovalAllowed(true)
.build();
PaymentDelegate paymentDelegate = new PaymentDelegate() {
@Override
public void onPaymentSuccess(PaymentResult result) {
if (result.partialApproval()) {
BigDecimal remainder = result.originalAmount().value().subtract(result.amount().value());
// The remainder still has to be paid by other means
}
}
@Override
public void onError(Error error) {
// The payment failed
}
};