Getting Started with SwiftFin API

Follow these steps to integrate SwiftFin API into your application and make your first API call.

Step 1: Get Your API Credentials

API credentials for both sandbox (demo) and production environments are provided exclusively by SwiftFin support.How to request:
  1. Email SwiftFin support at support@swiftfin.com
  2. Specify your environment: Sandbox (testing) or Production
  3. Provide your business details and use case
  4. Wait for SwiftFin support to provision your credentials
Sandbox credentials allow you to test without real transactions. Production credentials are for live operations.
Once you receive your API token from SwiftFin support:
  1. Store it securely in environment variables
  2. Never commit it to version control (use .env files)
  3. Never expose it in client-side code
  4. Rotate tokens periodically for security
Never share your API token or commit it to version control!

Step 2: Make Your First API Call

Test your API token with a simple request to get bank lists:
cURL
curl --request GET \
  --url https://demoapi.saasphereltd.com/api/v1/utils/bank-lists \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json'
Node.js
const axios = require('axios');

const response = await axios.get(
  'https://demoapi.saasphereltd.com/api/v1/utils/bank-lists',
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    }
  }
);

console.log(response.data);
Python
import requests

url = "https://demoapi.saasphereltd.com/api/v1/utils/bank-lists"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}

response = requests.get(url, headers=headers)
print(response.json())
Expected Response:
{
  "status": "00",
  "message": "Success",
  "data": [
    {
      "bank_code": "044",
      "bank_name": "Access Bank"
    }
    // ... more banks
  ]
}
Make an inter-bank transfer using the SwiftFin API:
cURL
curl --request POST \
  --url https://demoapi.saasphereltd.com/api/v1/operations/inter-transfer \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "bank_code": "044",
    "account_number": "1234567890",
    "amount": "5000.00",
    "narration": "Payment for services",
    "reference": "REF123456789",
    "account_name": "John Doe",
    "source_account": "0987654321",
    "source_account_name": "Jane Smith"
  }'
Node.js
const axios = require('axios');

const transferData = {
  bank_code: "044",
  account_number: "1234567890",
  amount: "5000.00",
  narration: "Payment for services",
  reference: "REF123456789",
  account_name: "John Doe",
  source_account: "0987654321",
  source_account_name: "Jane Smith"
};

const response = await axios.post(
  'https://demoapi.saasphereltd.com/api/v1/operations/inter-transfer',
  transferData,
  {
    headers: {
      'Authorization': 'Bearer YOUR_API_TOKEN',
      'Content-Type': 'application/json'
    }
  }
);

console.log(response.data);
Python
import requests

url = "https://demoapi.saasphereltd.com/api/v1/operations/inter-transfer"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Content-Type": "application/json"
}
data = {
    "bank_code": "044",
    "account_number": "1234567890",
    "amount": "5000.00",
    "narration": "Payment for services",
    "reference": "REF123456789",
    "account_name": "John Doe",
    "source_account": "0987654321",
    "source_account_name": "Jane Smith"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
Expected Response:
{
  "status": "00",
  "message": "Transfer successful",
  "data": {
    "reference": "REF123456789",
    "status": "completed"
  }
}

Step 3: Handle Responses

Always check the status field to determine if the request was successful:
// Success handler
if (response.data.status === "00") {
  console.log("Success:", response.data.message);
  // Process response.data.data
} 
// Authentication error
else if (response.data.status === "04") {
  console.error("Authentication failed:", response.data.error);
  // Refresh token or re-authenticate
} 
// General error
else {
  console.error("Error:", response.data.error);
  // Handle specific error cases
}
Store the status code constants in your application for easier error handling.

Common Use Cases

Testing Environment

Sandbox (Demo) Base URL: https://demoapi.saasphereltd.com
  • Request sandbox credentials from SwiftFin support
  • No real money transactions
  • Safe environment for testing and development
  • Test data is reset periodically
  • Rate limit: 100 requests/minute
Production Environment: Contact SwiftFin support for production base URL and credentials.

Next Steps

Need Help?

Developer Support

API Status

Check system status at status.swiftfin.com