Documentation Index
Fetch the complete documentation index at: https://mintlify.com/theresasogunle/Fintech-flutterwave-Java-Library/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheEndpoints class manages all API endpoint URLs for the Flutterwave Rave Java Library. It automatically configures endpoints based on the environment setting (staging or live) and provides getter methods to access properly formatted endpoint URLs.
Class Definition
Public Fields
Endpoint Constants
Endpoint for retrieving the list of supported banks.Access:
publicEndpoint for initiating payment charges.Access:
public staticEndpoint for validating card charges (OTP, PIN, etc.).Access:
public staticEndpoint for validating account/bank charges.Access:
public staticEndpoint for handling timeout scenarios with polling enabled.Access:
public staticEndpoint for polling transaction status.Access:
public staticEndpoint for calculating transaction fees.Access:
public staticEndpoint for processing refunds.Access:
public staticEndpoint for foreign exchange rate queries.Access:
public staticEndpoint for verifying transaction status.Access:
public staticEndpoint for cross-verifying transaction queries.Access:
public staticEndpoint for capturing pre-authorized transactions.Access:
public staticEndpoint for refunding or voiding transactions.Access:
public staticEndpoint for initiating charges with timeout polling.Access:
public staticEndpoint for validating card charges with timeout polling.Access:
public staticEndpoint for validating account charges with timeout polling.Access:
public staticPublic Methods
getBankEndPoint()
String - The complete bank endpoint URL based on current environment
getChargeEndPoint()
String - The complete charge endpoint URL
getValidateCardChargeEndPoint()
String - The complete card validation endpoint URL
getValidateAccountChargeEndPoint()
String - The complete account validation endpoint URL
getFeesEndPoint()
String - The complete fees endpoint URL
getRefundEndPoint()
String - The complete refund endpoint URL
getForexEndPoint()
String - The complete forex endpoint URL
getVerifyEndPoint()
String - The complete verification endpoint URL
getVerifyXrequeryEndPoint()
String - The complete xrequery endpoint URL
getCaptureEndPoint()
String - The complete capture endpoint URL
getRefundOrVoidEndPoint()
String - The complete refund/void endpoint URL
getChargeTimeoutEndpoint()
String - The complete charge timeout endpoint URL
getValidateCardChargeTimeoutEndpoint()
String - The complete card validation timeout endpoint URL
getValidateAccountChargeTimeoutEndpoint()
String - The complete account validation timeout endpoint URL
Usage Example
Basic Usage
Environment-Aware Endpoints
Each getter method automatically calls
init() internally, which configures all endpoints based on the current RaveConstant.ENVIRONMENT setting. The endpoints dynamically switch between staging and live URLs.How It Works
- Initialization: When any getter method is called, it triggers the
init()method - Environment Check: The
init()method checksRaveConstant.ENVIRONMENT - URL Selection: Based on the environment, either staging or live base URL is selected:
- Staging:
https://ravesandboxapi.flutterwave.com/ - Live:
https://api.ravepay.co/
- Staging:
- Endpoint Construction: All endpoint constants are constructed by appending specific paths to the base URL
- Return Value: The getter method returns the fully qualified endpoint URL
Best Practices
- Always configure
RaveConstant.ENVIRONMENTbefore creatingEndpointsinstances - Create new instances if you switch environments to ensure fresh endpoint configuration
- Use getter methods instead of accessing fields directly for guaranteed initialization
- Cache endpoint instances within the same environment context to avoid repeated initialization
Related
- RaveConstant - Configuration class that stores environment settings
- Environment - Environment enum used for endpoint selection