Skip to main content

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

The RaveConstant class serves as the central configuration point for the Flutterwave Rave Java Library. It stores static fields for API credentials and environment settings that are used throughout the library.

Class Definition

public class RaveConstant

Public Fields

SECRET_KEY
String
Your Flutterwave secret key used for server-side API authentication. This key should be kept confidential and never exposed in client-side code.Access: public static
PUBLIC_KEY
String
Your Flutterwave public key used for client-side operations and initial API requests. This key can be safely exposed in frontend applications.Access: public static
ENVIRONMENT
Environment
The current environment setting that determines whether API calls are made to the staging or live Flutterwave servers. Must be set to either Environment.STAGING or Environment.LIVE.Access: public static

Usage Example

Basic Configuration

import com.github.theresasogunle.RaveConstant;
import com.github.theresasogunle.Environment;

// Configure for staging environment
RaveConstant.PUBLIC_KEY = "FLWPUBK_TEST-xxxxxxxxxxxxx-X";
RaveConstant.SECRET_KEY = "FLWSECK_TEST-xxxxxxxxxxxxx-X";
RaveConstant.ENVIRONMENT = Environment.STAGING;

Production Configuration

import com.github.theresasogunle.RaveConstant;
import com.github.theresasogunle.Environment;

// Configure for live/production environment
RaveConstant.PUBLIC_KEY = "FLWPUBK-xxxxxxxxxxxxx-X";
RaveConstant.SECRET_KEY = "FLWSECK-xxxxxxxxxxxxx-X";
RaveConstant.ENVIRONMENT = Environment.LIVE;
Important: Always configure RaveConstant with your API credentials and environment before making any API calls. The library relies on these static fields for authentication and routing.

Best Practices

  • Never hardcode credentials in your source code. Use environment variables or secure configuration files.
  • Keep SECRET_KEY secure and never expose it in client-side code or version control.
  • Use STAGING environment for development and testing to avoid charges on real transactions.
  • Validate credentials are set before initializing any Rave services.

Build docs developers (and LLMs) love