Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesHere you can find how you can capture the amount of a previous Authorization.
The function CardFinancialAdvice is used to finalize the earlier pre-authorized transaction after delivery of goods. To send a CardFinancialAdviceRequest the terminal must be in Idle.
The following code snippet demonstrates how you can perform a CardFinancialAdvice after performing a CardPreAuthorisation.
PaymentService paymentService = new PaymentService(); TokenApi tokenServiceDelegate = new TokenService() { ... }; FinancialAdviceRequest financialAdviceRequest = FinancialAdviceRequest.builder() .totalAmount(Money.EUR(3.02)) .environment(Environment.EVCHARGING) .preAuthReferenceRequest(tokenSuccessResult.preAuthReference()) .eReceiptAdditionalTextRequestList(eReceiptAdditionalTextRequest()) .build(); paymentService.financialAdvice(terminal, financialAdviceRequest, tokenServiceDelegate);
The function CardFinancialAdvice is used to cancel the earlier pre-authorized transaction by sending amount 0 and providing a FinancialAdviceCancellationReasonCode. To send a CardFinancialAdviceRequest the terminal must be in Idle.
The following code snippet demonstrates how you can perform a CardFinancialAdvice to cancel a CardPreAuthorisation.
PaymentService paymentService = new PaymentService(); TokenApi tokenServiceDelegate = new TokenService() { ... }; FinancialAdviceCancellationReasonCode financialAdviceCancellationReasonCode = FinancialAdviceCancellationReasonCode.AMOUNT_ZERO_OR_NO_VOLUME; FinancialAdviceRequest financialAdviceRequest = FinancialAdviceRequest.builder() .totalAmount(Money.EUR(0)) .environment(Environment.EVCHARGING) .preAuthReferenceRequest(tokenSuccessResult.preAuthReference()) .eReceiptAdditionalTextRequestList(eReceiptAdditionalTextRequest()) .financialAdviceCancellationReasonCode(financialAdviceCancellationReasonCode) .build(); paymentService.financialAdvice(terminal, financialAdviceRequest, tokenServiceDelegate);
FinancialAdviceCancellationReasonCode | Description |
---|---|
NO_ERROR | 00 |
DISPENSER_BACK_OFFICE_SYSTEM_NOT_RESPONDING_TO_REQUEST | 01 |
AVAILABLE_FUNDS_TOO_SMALL_TO_DELIVER | 02 |
CLIENT_DID_NOT_TAKE_PRODUCT_IN_TIME | 05 |
DISPENSER_BACK_OFFICE_SYSTEM_INTERNAL_FAILURE | 06 |
WRONG_PRODUCT | 10 |
UNEXPECTED_OPERATION_RESULT | 22 |
AMOUNT_ZERO_OR_NO_VOLUME | 25 |
PaymentApi paymentService = new PaymentService(); PaymentDelegate paymentDelegate = new PaymentDelegate() { ... }; Money money = new Money(new BigDecimal("10.00"), Currency.getInstance("EUR")); Payment payment = Payment .builder() .type(Payment.Type.FINANCIAL_ADVICE) .amount(money) .transactionId("123") // STAN of the preauthorization you want to capture (Can be found in the paymentResult of the preauthorization) .approvalCode("123456789") // ApprovalCode of the preauthorization you want to capture (Can be found in the paymentResult of the preauthorization) .build(); paymentService.payment(externalTerminal, payment, paymentDelegate);
PaymentApi paymentService = new PaymentService(); PaymentDelegate paymentDelegate = new PaymentDelegate() { ... }; Money money = new Money(new BigDecimal("15.00"), Currency.getInstance("EUR")); Payment payment = Payment .builder() .type(Payment.Type.EXTENDED_FINANCIAL_ADVICE) .amount(money) .transactionId("124") // STAN of the financial advice you want to extend (Can be found in the paymentResult of the preauthorization) .approvalCode("123456789") // ApprovalCode of the financial advice you want to extend (Can be found in the paymentResult of the preauthorization) .build(); paymentService.payment(externalTerminal, payment, paymentDelegate);