Package com.flutterwave.services
Class Transactions
java.lang.Object
com.flutterwave.services.Transactions
APIs endpoints that are important for general transaction management and operations.
Some of these operations include transaction queries, confirming transaction fees, resending failed webhook responses and managing refunds.
- Author:
- Cleopatra Douglas
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunGetTransactions(Optional<String> from, Optional<String> to, Optional<String> page, Optional<String> customer_email, Optional<String> status, Optional<String> tx_ref, Optional<String> customer_fullname, Optional<String> currency) Query previously initiated transactions.runGetTransactionsFees(BigDecimal amount, String currency) Query the fees expected to be paid for a particular transaction.runResendWebhook(int id, Optional<Integer> wait) Resend webhooks from failed sending queues to your server.runVerifyTransaction(int id) Query the final status of a transaction.runViewTimeline(int id) View the timeline for a transaction.
-
Constructor Details
-
Transactions
public Transactions()
-
-
Method Details
-
runVerifyTransaction
Query the final status of a transaction. This can be used to check transactions of all payment types after they have been attempted.- Parameters:
id- int This is a unique transaction identifier generated by our systems. It is returned in the initiate charge response as data.id- Returns:
- Response
-
runGetTransactions
public ListResponse runGetTransactions(Optional<String> from, Optional<String> to, Optional<String> page, Optional<String> customer_email, Optional<String> status, Optional<String> tx_ref, Optional<String> customer_fullname, Optional<String> currency) Query previously initiated transactions. You can do a single or bulk query with the endpoint depending on your use case.- Returns:
- ListResponse
-
runGetTransactionsFees
Query the fees expected to be paid for a particular transaction. This endpoint only returns fees for collections i.e. inflows.- Parameters:
amount- BigDecimal This is the amount of the product or service to be charged from the customer.currency- String This is the specified currency to charge in.- Returns:
- Response
-
runResendWebhook
Resend webhooks from failed sending queues to your server.- Parameters:
id- int This is a unique transaction identifier generated by our systems. It is returned in the initiate charge response as data.idwait- Optional This parameter would hold for the hook response and return what you respond with as the response. The expected value is 1.- Returns:
- Response
-
runViewTimeline
View the timeline for a transaction. A transaction timeline is a list of events that happened to a selected transaction. Some key events include: loading the payment modal, Switching payment methods and Entering details in modal fields. Using the response, you can get insights into the transactions and payment behaviour of users.- Parameters:
id- int This is a unique transaction identifier generated by our systems. It is returned in the initiate charge and verify transaction responses as data.id- Returns:
- ListResponse
-