Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.afriex.com/llms.txt

Use this file to discover all available pages before exploring further.

Quickstart Guide

Get up and running with the Afriex Business API in three simple steps.

Prerequisites

Before you begin, you’ll need:
  • An Afriex Business account (Sign up here)
  • Your API key from the dashboard
  • A tool for making HTTP requests (cURL, Postman, or your preferred HTTP client)

Step 1: Get your API key

  1. Log in to the Afriex Dashboard
  2. Navigate to Settings > API Keys
  3. Generate a new API key for your integration
  4. Copy and securely store your API key
The dashboard has a Test / Live toggle at the top. Make sure you are in Test mode while developing so you use sandbox credentials. Switch to Live mode only when you are ready to go to production. Each mode has different API keys.
Keep your API key secure and never expose it in client-side code or public repositories.

Step 2: Make your first API call

Create your first customer:
curl -X POST https://sandbox.api.afriex.com/api/v1/customer \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"fullName": "John Doe",
"email": "john.doe@example.com",
"phone": "+2348192837465",
"countryCode": "NG"
}'
Use the staging environment for testing. Switch to https://api.afriex.com for production.
A successful response will return the created customer:
{
  "data": {
    "customerId": "69516dd0464b2213bd74cfad",
    "fullName": "John Doe",
    "email": "john.doe@example.com",
    "phone": "+2348192837465",
    "countryCode": "NG"
  }
}

Step 3: Process your first transaction

Once you have a customer and payment method set up, you can create a transaction:
curl -X POST https://sandbox.api.afriex.com/api/v1/transaction \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"customerId": "CUSTOMER_ID",
"type": "WITHDRAW",
"sourceAmount": "10",
"destinationAmount": 5000,
"sourceCurrency": "USD",
"destinationCurrency": "NGN",
"destinationId": "PAYMENT_METHOD_ID"
}'

Next Steps

Now that you’ve made your first API calls, explore these guides:
Planning to use webhooks? Allowlist these Afriex IP addresses on your server so webhook deliveries are not blocked:
  • Sandbox: 34.234.189.210
  • Production: 34.197.33.100
See Webhook setup for full details.

API Reference

Explore all available endpoints and their parameters.

Customers

Learn how to manage customer profiles and KYC.

Payment Methods

Set up bank accounts and mobile money wallets.

Webhooks

Receive real-time notifications for events.

Support

Need help? Contact us at support@afriex.com.