Quickstart
Get started with the FLUID Network API in under 5 minutes. This guide walks you through making your first API call to list available banks.
Prerequisites
Before you begin, make sure you have:
- A FLUID Network API key (Get one here)
- A way to make HTTP requests (cURL, Postman, or your favorite programming language)
- Understanding of Authentication basics
Note: This quickstart uses the Sandbox environment. All transactions are simulated and no real money is involved.
Step 1: Set Up Your Environment
First, save your Sandbox API key as an environment variable.
Linux/macOS:
export FLUID_API_KEY="test_sk_your_sandbox_key_here"Windows PowerShell:
$env:FLUID_API_KEY="test_sk_your_sandbox_key_here"Windows CMD:
set FLUID_API_KEY=test_sk_your_sandbox_key_hereStep 2: Make Your First API Call
Let's fetch the list of available banks in the FLUID Network using a GET request to the banks endpoint.
curl -X GET \
https://sandbox-api.fluid-network.com/api/v1/payment-providers/banks \
-H "Authorization: Bearer $FLUID_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json"Implementation Notes:
- Use HTTP GET method
- Include your API key in the
Authorizationheader as a Bearer token - Set
Content-TypeandAcceptheaders toapplication/json - The endpoint returns a list of all available banks in the network
Step 3: Understand the Response
You should receive a response like this:
{
"success": true,
"data": [
{
"name": "Example Bank Ghana",
"identifier": "EXB",
"country_code": "GH"
},
{
"name": "Demo Bank Ghana",
"identifier": "DEM",
"country_code": "GH"
},
{
"name": "Sample Bank",
"identifier": "SAM",
"country_code": "GH"
}
]
}Key fields:
success: Indicates if the request was successfuldata: Array of bank objectsidentifier: Unique bank code used in transaction requests
Step 4: Lookup Customer Banks
Now let's find which banks a customer is linked to using their phone number.
curl -X GET \
https://sandbox-api.fluid-network.com/api/v1/payment-providers/banks/lookup/+233241234567 \
-H "Authorization: Bearer $FLUID_API_KEY" \
-H "Content-Type: application/json"Implementation Notes:
- Use HTTP GET method
- Include the phone number in E.164 format (+233...) as a URL parameter
- URL-encode the phone number if required by your HTTP client
- The endpoint returns the customer's name and their linked banks
Response:
{
"success": true,
"phone_number": "+233241234567",
"customer": "John Doe",
"data": [
{
"name": "Example Bank Ghana",
"identifier": "EXB",
"country_code": "GH"
}
]
}Step 5: Initiate a Debit Request
Now let's create a debit request to charge the customer's account.
curl -X POST \
https://sandbox-api.fluid-network.com/api/v1/payment-providers/debit-requests/charge \
-H "Authorization: Bearer $FLUID_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone_number": "+233241234567",
"bank_identifier": "EXB",
"amount": 100.00,
"currency": "GHS",
"narration": "Test Payment",
"partner_reference": "test_1234567890"
}'Implementation Notes:
- Use HTTP POST method
- Send request body as JSON with the following required fields:
phone_number- Customer's phone in E.164 formatbank_identifier- Bank code from the lookup responseamount- Transaction amount (number or string)currency- Currency code (e.g., "GHS")narration- Description of the transactionpartner_reference- Your unique reference for this transaction
- Generate a unique
partner_referencefor each request (e.g., using timestamp)
Response:
{
"success": true,
"data": {
"reference": "FLU123456789",
"status": "pending",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"timestamp": "2025-11-12T14:30:00Z"
},
"meta": {
"timestamp": "2025-11-12T14:30:00Z",
"request_id": "req_abc123",
"api_version": "v1"
}
}Important: Save the reference value from the response - you'll need it to check the transaction status!
Step 6: Check Transaction Status
Finally, let's check the status of our debit request.
# Replace FLU123456789 with your actual reference
curl -X GET \
https://sandbox-api.fluid-network.com/api/v1/payment-providers/debit-requests/FLU123456789 \
-H "Authorization: Bearer $FLUID_API_KEY" \
-H "Content-Type: application/json"Implementation Notes:
- Use HTTP GET method
- Include the transaction reference from Step 5 as a URL parameter
- Poll this endpoint periodically to check for status changes
- Consider implementing webhooks for real-time status updates instead of polling
Response:
{
"success": true,
"data": {
"reference": "FLU123456789",
"status": "completed",
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"timestamp": "2025-11-12T14:35:00Z"
},
"meta": {
"timestamp": "2025-11-12T14:35:30Z",
"request_id": "req_xyz789",
"api_version": "v1"
}
}Transaction Statuses
| Status | Description |
|---|---|
pending | Waiting for customer approval |
completed | Transaction successful |
failed | Transaction failed (e.g., insufficient funds) |
rejected | Customer rejected the transaction |
timeout | Customer didn't respond in time |
Common Issues
401 Unauthorized
Problem: Invalid or missing API key
Solution:
# Check your API key is set correctly
echo $FLUID_API_KEY
# Make sure it starts with test_sk_ for Sandbox422 Unprocessable Entity
Problem: Invalid request parameters
Solution: Check that:
- Phone number is in E.164 format (
+233...) - Amount is a positive number
- Bank identifier exists (check Step 2)
partner_referenceis unique for each request
429 Too Many Requests
Problem: Rate limit exceeded
Solution: Implement exponential backoff and respect rate limits (30 requests/minute in Sandbox)
Next Steps
Congratulations! You've successfully:
- ✅ Listed available banks
- ✅ Looked up a customer's banks
- ✅ Initiated a debit request
- ✅ Checked transaction status
What's Next?
📚 API Reference
Explore all available endpoints
🔄 Integration Guide
Build a complete integration
🔔 Webhooks
Get real-time transaction updates
🔐 Enhanced Security
Implement HMAC authentication
Need Help?
- 📖 Check our guides for detailed integration steps
- 🔍 See error handling guide for troubleshooting
- 💬 Contact support if you're stuck