Class PreAuthorization

java.lang.Object
com.flutterwave.services.Charge
com.flutterwave.services.PreAuthorization

public class PreAuthorization extends Charge
Manage preauth attempts on Card and PayPal transactions. You can capture, void or refund preauth transactions.
Author:
Cleopatra Douglas
  • Constructor Details

    • PreAuthorization

      public PreAuthorization()
  • Method Details

    • runTransaction

      public Response runTransaction(PreAuthorizationRequest preAuthorizationRequest)
      Create a lien on the customer's account for the transaction amount. The hold on the funds only lasts for seven working days.
      Parameters:
      preAuthorizationRequest - bean
      Returns:
      Response
    • runCaptureTransaction

      public Response runCaptureTransaction(String flw_ref, BigDecimal amount)
      capture the payment of an existing but uncaptured charge. This is the final step of a two-part payment flow. Where you first need to create the charge.
      Parameters:
      flw_ref - String This is the data.flw_ref returned in the charge response.
      amount - BigDecimal This is the amount to be captured. This allows you to capture an amount less than the original amount authorised on the card.
      Returns:
      Response
    • runPaypalCaptureTransaction

      public Response runPaypalCaptureTransaction(String flw_ref)
      Capture the payment of a previously uncaptured PayPal charge. Like Card charge capture, This is also the second leg of a two-part flow.
      Parameters:
      flw_ref - String This is a unique reference internally generated by Flutterwave. It is returned as data.flw_ref in the charge response.
      Returns:
      Response
    • runVoidTransaction

      public Response runVoidTransaction(String flw_ref)
      Voids the payment of a captured charge. This releases the hold on the previously captured funds
      Parameters:
      flw_ref - String This is a unique reference internally generated by Flutterwave. It is returned as data.flw_ref in the charge response.
      Returns:
      Response
    • runPaypalVoidTransaction

      public Response runPaypalVoidTransaction(String flw_ref)
      Release the hold on the PayPal funds i.e. if value was not given for the service, the merchant would typically be required to void the transaction.
      Parameters:
      flw_ref - String This is the data.flw_ref returned in the charge response.
      Returns:
      Response
    • runRefundTransaction

      public Response runRefundTransaction(String flw_ref, BigDecimal amount)
      Refunding a transaction would return the charged amount for an existing, unrefunded transaction. Funds will be refunded to the debit or credit cards charged originally.
      Parameters:
      flw_ref - String This is a unique reference internally generated by Flutterwave. It is returned as data.flw_ref in the charge response.
      amount - BigDecimal This is the amount to be refunded.
      Returns:
      Response