DEV Community

Cover image for Getting Started with the Afriex API: From Signup to Your First Request
0xSonOfUri for Afriex

Posted on

Getting Started with the Afriex API: From Signup to Your First Request

What if you could start building global payment systems in minutes?

Before you can build payment links, payouts, or crypto flows — you need access to the Afriex API.

This guide walks you through going from zero → your first API call.


What You’ll Do

By the end of this guide, you’ll:

  • Create an Afriex Business account
  • Complete onboarding and verification
  • Generate your API key
  • Make your first API request

Step 1: Create an Afriex Business Account

Head to:

https://business.afriex.com/

Sign up using your business email.


Step 2: Select Entity Type

Choose the entity that applies to you:

  • Sole Trader / Sole Proprietorship → if you're an individual
  • Registered Company / Corporate → if you're a company

This determines the documents required during verification.


Step 3: Set Up Your Business

Fill in your details:

  • Phone number
  • Full name
  • Business name
  • Country of residence
  • Password

Step 4: Complete Verification

To unlock full API access, you’ll go through verification:

  1. Provide company details
  2. Upload documents
  3. Add associated parties
  4. Complete phone verification

This is required for compliance and security.


Step 5: Set Up Your Team (Optional)

From the dashboard, you can:

  • Add team members
  • Assign roles
  • Manage permissions

Useful if you're building with others.


Step 6: Generate Your API Key

Once your account is ready:

  1. Go to Settings → API Keys
  2. Generate a new key
  3. Store it securely

Never expose your API key in frontend code or public repositories.


Step 7: Make Your First API Call

Now let’s test the API.

Create a 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"
  }'
Enter fullscreen mode Exit fullscreen mode

Expected Response

{
  "data": {
    "customerId": "69516dd0464b2213bd74cfad",
    "fullName": "John Doe",
    "email": "john.doe@example.com",
    "phone": "+2348192837465",
    "countryCode": "NG"
  }
}
Enter fullscreen mode Exit fullscreen mode

Step 8: Process Your First Transaction

Once you have a customer, you can initiate 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"
  }'
Enter fullscreen mode Exit fullscreen mode

Important Notes

  • Use the sandbox environment for testing
  • Switch to https://api.afriex.com for production
  • Keep your API key secure
  • Always make API calls from your backend

Explore the Docs

https://docs.afriex.com/

You can also fetch the full index here:
https://docs.afriex.com/llms.txt


What Next?

Now that you have access, you can start building:

  • Payment links
  • Cross-border payouts
  • Crypto integrations
  • Multi-currency systems

Next guide: Send a Link, Get Paid: Building Payment Links with the Afriex API


Final Thought

Afriex gives you the rails.

You just made your first step into building on top of them.


Top comments (0)