Flutterwave

Learn how to use Flutterwave with Composio

Overview

SLUG: FLUTTERWAVE

Description

Flutterwave is a payments technology company that provides payment infrastructure and APIs enabling businesses to accept and send payments in Africa and globally.

Authentication Details

generic_secret
stringRequired

Connecting to Flutterwave

Create an auth config

Use the dashboard to create an auth config for the Flutterwave toolkit. This allows you to connect multiple Flutterwave accounts to Composio for agents to use.

1

Select App

Navigate to the Flutterwave toolkit page and click “Setup Integration”.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Integration”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2from composio.types import auth_scheme
3
4# Replace these with your actual values
5flutterwave_auth_config_id = "ac_YOUR_FLUTTERWAVE_CONFIG_ID" # Auth config ID created above
6user_id = "0000-0000-0000" # UUID from database/app
7
8composio = Composio()
9
10def authenticate_toolkit(user_id: str, auth_config_id: str):
11 # Replace this with a method to retrieve an API key from the user.
12 # Or supply your own.
13 user_api_key = input("[!] Enter API key")
14
15 connection_request = composio.connected_accounts.initiate(
16 user_id=user_id,
17 auth_config_id=auth_config_id,
18 config={"auth_scheme": "API_KEY", "val": user_api_key}
19 )
20
21 # API Key authentication is immediate - no redirect needed
22 print(f"Successfully connected Flutterwave for user {user_id}")
23 print(f"Connection status: {connection_request.status}")
24
25 return connection_request.id
26
27
28connection_id = authenticate_toolkit(user_id, flutterwave_auth_config_id)
29
30# You can verify the connection using:
31connected_account = composio.connected_accounts.get(connection_id)
32print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Flutterwave toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["FLUTTERWAVE"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Create Beneficiary

Description

Tool to create a new transfer beneficiary. use when you need to add a beneficiary before making a transfer.

Action Parameters

account_bank
stringRequired
account_number
stringRequired
beneficiary_name
string

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Create Bulk Virtual Account Numbers

Description

Tool to create multiple virtual account numbers. use when you need to generate multiple static virtual accounts for customers in a single request.

Action Parameters

batch_ref
stringRequired
bulk_data
arrayRequired
narration
string

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Create Payment Plan

Description

Tool to create a new payment plan. use after confirming plan and customer details.

Action Parameters

amount
number
currency
string
duration
integer
interval
stringRequired
name
stringRequired

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Create Subaccount

Description

Tool to create a new subaccount. use when you need to configure split disbursement accounts.

Action Parameters

account_bank
stringRequired
account_number
stringRequired
business_contact
string
business_contact_mobile
string
business_email
string
business_mobile
string
business_name
stringRequired
country
string
meta
array
split_type
stringRequired
split_value
numberRequired

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Create Virtual Account

Description

Tool to create a new virtual account number. use after confirming customer details when assigning a unique account for bank transfers.

Action Parameters

amount
number
bvn
string
duration
integer
email
stringRequired
firstname
string
frequency
integer
is_permanent
boolean
lastname
string
narration
string
phonenumber
string
tx_ref
string

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Delete Beneficiary

Description

Tool to delete a beneficiary by id. use when you need to remove a saved transfer beneficiary by its unique id after confirming the id.

Action Parameters

id
integerRequired

Action Response

data
stringRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Fetch Beneficiary

Description

Tool to retrieve details of a specific beneficiary by id. use after obtaining a beneficiary id to fetch its full details from flutterwave.

Action Parameters

id
integerRequired

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Fetch Subaccount

Description

Tool to retrieve details of a specific subaccount by id. use when you need full subaccount info after creating or updating splits.

Action Parameters

id
stringRequired

Action Response

data
objectRequired
error
string
message
string
status
stringRequired
successful
booleanRequired

Tool Name: Generate Transaction Reference

Description

Tool to generate a unique transaction reference. use when initiating a new flutterwave transaction requires a unique reference to prevent duplication.

Action Parameters

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get All Subscriptions

Description

Tool to retrieve all subscriptions, including cancelled ones. use when you need a comprehensive list of subscription records for auditing or reporting.

Action Parameters

Action Response

data
arrayRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Retrieve all transactions

Description

Tool to retrieve a list of all transactions with optional filters. use when you need to paginate or filter transaction history after confirming valid api credentials.

Action Parameters

currency
string
customer_email
from_date
page
integer
status
string
to_date
tx_ref
string

Action Response

data
arrayRequired
error
string
message
stringRequired
meta
objectRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get All Wallet Balances

Description

Tool to retrieve all wallet balances across currencies. use when reconciling balances after authentication.

Action Parameters

Action Response

data
arrayRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get Balances per Currency

Description

Tool to retrieve wallet balance for a specific currency. use after transactions to confirm available and ledger balances in a given currency.

Action Parameters

currency
stringRequired

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get Bill Categories

Description

Tool to retrieve available bill categories. use after authenticating to flutterwave to display bill payment options to users.

Action Parameters

Action Response

data
arrayRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get Multiple Refund Transactions

Description

Tool to retrieve multiple refund transactions with optional filters. use when you need to fetch paginated refund data after confirming valid api credentials.

Action Parameters

flw_ref
string
from_date
page
integer
page_size
integer
status
string
to_date

Action Response

data
arrayRequired
error
string
message
stringRequired
meta
objectRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get Payment Plans

Description

Tool to retrieve a list of all payment plans. use when you need to fetch and present your account’s configured billing plans.

Action Parameters

Action Response

data
arrayRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get Transaction

Description

Tool to retrieve details of a specific transaction by id. use after obtaining the transaction id to fetch its details from flutterwave.

Action Parameters

id
integerRequired

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get Transaction Fee

Description

Tool to retrieve the fee for a specific transaction. use when you need to calculate the total charge including fees before initiating the transaction.

Action Parameters

amount
integerRequired
currency
stringRequired

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Get Transfer Fee

Description

Tool to retrieve the fee for initiating a transfer. use when you need to estimate transfer costs before creating a transfer. example: "calculate the fee for transferring ngn 5000 to an account."

Action Parameters

amount
integerRequired
currency
string
type
string

Action Response

data
arrayRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: Initiate Mobile Money Tanzania

Description

Tool to initiate a mobile money payment in tanzania. use after collecting customer details to charge via tanzanian mobile money networks.

Action Parameters

amount
numberRequired
client_ip
string
currency
stringRequired
device_fingerprint
string
email
stringRequired
fullname
string
meta
object
network
string
phone_number
stringRequired
tx_ref
stringRequired

Action Response

data
objectRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired

Tool Name: List All Beneficiaries

Description

Tool to list all saved beneficiaries. use when you need to retrieve all transfer beneficiaries associated with your account.

Action Parameters

Action Response

data
arrayRequired
error
string
message
stringRequired
meta
objectRequired
status
stringRequired
successful
booleanRequired

Tool Name: View Transaction Timeline

Description

Tool to retrieve the event timeline for a transaction. use after obtaining the transaction id to audit or track the sequence of events.

Action Parameters

id
integerRequired

Action Response

data
arrayRequired
error
string
message
stringRequired
status
stringRequired
successful
booleanRequired