VixonPay
  • Overview

  •  

    Getting Started

  •  

    Webhook & Callbacks

  •  

    Collection

  •  

    Disbursement

  •  

    WalletBalance

  •  

    Transaction History

  •  

    Transaction Status

v1

VixonPay v1

Overview

The VixonPay API enables seamless integration between your systems and VixonPay services. With it, you can:

  • Collect Payments: Receive mobile money payments directly into your VixonPay wallet.
  • Make Disbursements: Send funds from your wallet to mobile money accounts or commercial bank accounts.
  • Manage Transactions: Access and work with transaction data to streamline your financial operations.

This documentation provides detailed guidance on available endpoints, request/response formats, and authentication requirements to help you integrate VixonPay efficiently.

Getting Started

Follow these 4 simple steps to start accepting payments with VixonPay:

  1. Register an Account - Sign up with your email and basic information
  2. Verify KYC - Submit your kyc documents for verification
  3. Get API Keys - Access your Api keys from the dashboard Settings → API Keys
  4. Accept Payments - Integrate our API and start accepting Mobile Money, Cards, and Wallet transfers


Webhook and Callback Notifications

The VixonPay API can automatically notify your system when transaction statuses change, eliminating the need for continuous polling. Webhooks provide real-time updates for collection and disbursement transactions.

How webhooks work

  1. Initiate a collection or disbursement request from your system to VixonPay.
  2. VixonPay processes the transaction and sends an HTTP POST request to your configured webhook URL when the transaction status changes.
  3. The webhook payload contains the complete transaction details and includes security headers for verification.

Example Incoming Webhook

JSON Payload

{
  "event": "transaction.failed",
  "data": {
    "id": 31542,
    "internal_reference": "VXN99817266291345",
    "merchant_reference": "COL85b83e2a54193470735",
    "transaction_type": "COLLECTION",
    "request_currency": "UGX",
    "transaction_amount": "500.00",
    "transaction_charge": "0.00",
    "transaction_account": "256751142954",
    "total_credit": "0.00",
    "provider_code": "airtel_ug",
    "customer_name": "JOHN DOE",
    "customer_email": "johndoe@gmail.com",
    "transaction_status": "Failed",
    "status_message": "Transaction failed due to timeout",
    "description": "Test Collection"
  }
}

Webhook Headers

Headers
  • Content-Type
    string
    required
  • X-VixonPay-Signature
    string
    required

    HMAC SHA512 hash of the raw request body, computed using your webhook secret key

Webhook Events

Event Types
  • transaction.completed

    Transaction successfully completed - Triggered when transaction status changes to Completed

  • transaction.failed

    Transaction failed - Triggered when transaction status changes to Failed

  • transaction.pending

    Transaction is pending - Triggered when transaction is initiated and pending

Authentication

All webhook requests include an X-VixonPay-Signature header with a HMAC SHA512 hash of the payload for security verification. You should verify this signature to ensure the request is legitimate.

Signature Header
X-VixonPay-Signature: <hmac-sha512-signature>

This is a HMAC SHA512 hash of the raw request body, computed using your webhook secret key. You should compute the same hash and compare it to this value.

Content-Type
The request body is always JSON format containing transaction details.

Verification Steps

  1. Read the raw request body
  2. Compute HMAC SHA512 hash of the body using your webhook secret
  3. Compare your computed hash to the value in the X-VixonPay-Signature header
  4. Only process the webhook if the signatures match

Webhook Parameters

Webhook Parameters
  • event
    String
    required

    Event type (e.g., transaction.failed)

  • data
    Object
    required

    Transaction data object

Transaction Data Fields

Data Fields
  • id
    Integer

    Transaction ID

  • internal_reference
    String

    Internal transaction reference

  • merchant_reference
    String

    Merchant's reference ID

  • transaction_type
    String

    Transaction type (COLLECTION/PAYOUT)

  • request_currency
    String

    Transaction currency (UGX)

  • transaction_amount
    String

    Transaction amount

  • transaction_charge
    String

    Transaction fee charged

  • transaction_account
    String

    Phone number used for transaction

  • total_credit
    String

    Total amount credited

  • provider_code
    String

    Mobile money provider (airtel_ug, mtn_ug)

  • customer_name
    String

    Customer name

  • customer_email
    String

    Customer email

  • transaction_status
    String

    Transaction status (Completed, Pending, Failed)

  • status_message
    String

    Status description message

  • description
    String

    Transaction description

Code Examples

Receiving an event: A valid request from VixonPay has the header X-VixonPay-Signature which is a HMAC SHA512 hash of the payload. This hash is computed using your webhook secret key. To verify the authenticity of the request, you need to:

  1. Read the raw request body.
  2. Compute the HMAC SHA512 hash of the body using your webhook secret.
  3. Compare your computed hash to the value in the X-VixonPay-Signature header.

Below are sample codes in PHP:

PHP

$secret_key = 'your_webhook_secret';
$body = file_get_contents('php://input');
$data = json_decode($body, true);

$signature = $_SERVER['HTTP_X_VIXONPAY_SIGNATURE'] ?? '';

// Compute HMAC SHA512 hash of the raw body
(transaction_status, merchant_reference and internal_reference only)
$hash = hash_hmac('sha512', $body, $secret_key, false);

if (!hash_equals($hash, $signature)) {
    http_response_code(401);
    echo 'Unauthorized request!';
    exit;
}

// Access the webhook data
$transactionStatus = $data['transaction_status'] ?? null;
$merchantReference = $data['merchant_reference'] ?? null;
$internalReference = $data['internal_reference'] ?? null;

// Your business logic here
// Process the transaction based on transactionStatus

http_response_code(200);
echo 'Success!';

Collection

​
Collection Operations
  • POST /api/v1/collections/initialize

Initiate Mobile Money Collection

​

This endpoint is used to perform a mobile money collection request from a specified payer to your VixonPay wallet.

The transaction flow works as follows:

  1. A collection request is initiated
  2. The payer receives a prompt on their mobile device
  3. The transaction remains in Pending status until:
    • The payer authorizes the payment (status changes to Completed)
    • The payer declines the payment (status changes to Failed)
    • The system times out the request (status changes to Failed)

Request Example

curl -X POST "https://my.vixonpay.cc/api/v1/collections/initialize" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <--your-api-key-->" \
  -d '{ 
    "phone": "2567123456789",
    "amount": 500,
    "currency": "UGX",
    "customer_email": "johndoe@gmail.com",
    "customer_name": "JOHN DOE",
    "merchant_reference": "MCR56242426224262",
    "description": "Test Collection"
  }'
Headers
  • Authorization
    Bearer Token
    required

    Your API key for authentication

  • Content-Type
    string
    required
Request Body
  • phone
    String
    required

    The phone number from which payment is being requested, in international format (e.g., 256751142954)

  • amount
    Number
    required

    The amount being requested from the customer

  • currency
    String
    required
    • UGX
  • customer_email
    String

    The email of the customer

  • customer_name
    String

    The full name of the customer

  • merchant_reference
    String
    required

    The unique reference for this request, generated by the merchant

  • description
    String

    A description/narration of the transaction

Response Format

Success Response

{
  "code": 202,
  "status": "accepted",
  "message": "Request Accepted",
  "data": {
    "internal_reference": "VXN36672262219635",
    "merchant_reference": "MCR56242426224262"
  }
}

Error Response

{
  "status": "error",
  "message": "Invalid phone number provided"
}

Disbursement

​

The Disbursement API allows you to send money from your VixonPay wallet to your customers via mobile money, bank transfers, or wallet-to-wallet transfers.

Disbursement Operations
  • POST /api/v1/payout/initialize

Disburse Funds

​

Quick Start

Request Example

curl -X POST "https://my.vixonpay.cc/api/v1/payout/initialize" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <--your-api-key-->" \
  -d '{ 
    "phone": "2567123456789",
    "amount": 500,
    "currency": "UGX",
    "customer_email": "johndoe@gmail.com",
    "customer_name": "JOHN DOE",
    "merchant_reference": "MCR56242426224262",
    "description": "Test Payout"
  }'
Headers
  • Authorization
    Bearer Token
    required

    Your API key for authentication

  • Content-Type
    string
    required
Request Body
  • phone
    String
    required

    The phone number from which payment is being requested, in international format (e.g., 256751142954)

  • amount
    Number
    required

    The amount being requested from the customer

  • currency
    String
    required
    • UGX
  • customer_email
    String

    The email of the customer

  • customer_name
    String

    The full name of the customer

  • merchant_reference
    String
    required

    The unique reference for this request, generated by the merchant

  • description
    String

    A description/narration of the transaction

Response Format

Success Response:

{
  "code": 202,
  "status": "accepted",
  "message": "Request Accepted",
  "data": {
    "internal_reference": "VXN36672262219635",
    "merchant_reference": "MCR56242426224262"
  }
}

Error Response:

{
  "status": "error",
  "message": "Invalid phone number provided"
}

WalletBalance

​

The Wallet Balance API allows you to retrieve real-time balance information for your VixonPay wallet, including available balance, actual balance, and currency details.

WalletBalance Operations
  • GET /api/v1/wallet/balance

Get Wallet Balance

​

Use this endpoint to retrieve the current balance of your VixonPay wallet. The response includes both available and actual balance information.

Quick Start

Request Example:

curl -X GET "https://my.vixonpay.cc/api/v1/wallet/balance" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <--your-api-key-->"
Headers
  • Authorization
    Bearer Token
    required

    Your API key for authentication

  • Content-Type
    string
    required

Response Format

Success Response:

{
  "code": 200,
  "status": "success",
  "message": "Request completed successfully.",
  "data": {
    "available_balance": "596000.00",
    "actual_balance": "596000.00",
    "currency": "UGX",
    "business_name": "CAFE JAVAS UGANDA LIMITED"
  }
}

Transaction History

​

The Transactions API allows you to retrieve your complete transaction history with filtering options. You can filter by date range, transaction status, method type, and more for comprehensive transaction monitoring and reconciliation.

Transactions Operations
  • GET /api/v1/transactions/history

Get Transactions History

​

Retrieve your transaction history with filtering options. Filter transactions by date range, status, method type, and more. Get detailed transaction information including amounts, charges, customer details, and timestamps.

Quick Start

Request Example with Filtering

curl -X GET "https://my.vixonpay.cc/api/v1/transactions/history?from=2026-01-01&to=2026-01-22&status=Completed&method=COLLECTION" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <--your-api-key-->"
Headers
  • Authorization
    Bearer Token
    required

    Your API key for authentication

  • Content-Type
    string
    required
Query Parameters
  • from
    String

    Start date for filtering (YYYY-MM-DD)

  • to
    String

    End date for filtering (YYYY-MM-DD)

  • status
    String

    Transaction status (Completed, Pending, Failed)

    • Completed
    • Pending
    • Failed
  • method
    String

    Transaction type (COLLECTION, PAYOUT)

    • COLLECTION
    • PAYOUT

Response Example

{
  "code": 200,
  "status": "success",
  "count": 15,
  "transactions": {
    "data": [
      {
        "id": "68",
        "internal_reference": "VXN71762566262977",
        "merchant_reference": "INTMK41D91VVFN8TX",
        "transaction_type": "COLLECTION",
        "request_currency": "UGX",
        "transaction_amount": "150000.00",
        "transaction_charge": "0.00",
        "transaction_account": "256751234567",
        "total_credit": "150000.00",
        "provider_code": "airtel_ug",
        "customer_name": "John Doe",
        "customer_email": "example@gmail.com",
        "transaction_status": "Failed",
        "status_message": "Transaction failed due to timeout",
        "description": "Payment from John Doe",
        "createdAt": "2026-01-15 19:33:59",
        "completedAt": "2026-01-17 12:30:43"
      },
      {
        "id": "65",
        "internal_reference": "VXN61922872277851",
        "merchant_reference": "INT24QG9PQJUEXJTX",
        "transaction_type": "PAYOUT",
        "request_currency": "UGX",
        "transaction_amount": "50000.00",
        "transaction_charge": "2400.00",
        "transaction_account": "256771234567",
        "total_credit": "47600.00",
        "provider_code": "mtn_ug",
        "customer_name": "John Doe",
        "customer_email": "johndoe@gmail.com",
        "transaction_status": "Completed",
        "status_message": "Request completed successfully",
        "description": "Withdrawal Request",
        "createdAt": "2026-01-15 19:13:32",
        "completedAt": "2026-01-15 19:16:07"
      }
    ]
  }
}
Response Fields
  • code
    Integer

    HTTP status code

  • status
    String

    Request status (success/error)

  • count
    Integer

    Number of transactions returned

  • transactions
    Object

    Transaction data container

  • transactions.data
    Array

    Array of transaction objects

Transaction Fields
  • id
    String

    Transaction ID

  • internal_reference
    String

    Internal transaction reference

  • merchant_reference
    String

    Merchant's reference ID

  • transaction_type
    String

    Transaction type (COLLECTION/PAYOUT)

  • request_currency
    String

    Transaction currency (UGX)

  • transaction_amount
    String

    Transaction amount

  • transaction_charge
    String

    Transaction fee charged

  • transaction_account
    String

    Phone number used for transaction

  • total_credit
    String

    Total amount credited

  • provider_code
    String

    Mobile money provider (airtel_ug, mtn_ug)

  • customer_name
    String

    Customer name

  • customer_email
    String

    Customer email

  • transaction_status
    String

    Transaction status (Completed, Pending, Failed)

  • status_message
    String

    Status description message

  • description
    String

    Transaction description

  • createdAt
    String

    Transaction creation timestamp

  • completedAt
    String

    Transaction completion timestamp

Transaction Statuses

Completed
The transaction was successfully processed.

Failed
The transaction could not be completed due to an error or rejection.

Pending
The transaction is still being processed and the final status is not yet available.

Transaction Status

​

The Transaction Status API allows you to check the current status of a specific transaction using either the internal reference or merchant reference.

Transaction Status Operations
  • GET /api/v1/transactions/status

Get Transaction Status

​

Check the status of a specific transaction. Get detailed transaction information including status, amount, provider details, customer information, and timestamps.

Quick Start

Request Example

curl -X GET "https://my.vixonpay.cc/api/v1/transactions/status?internal_reference=VXN77195718575967" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <--your-api-key-->"
Headers
  • Authorization
    Bearer Token
    required

    Your API key for authentication

  • Content-Type
    string
    required
Query Parameters
  • internal_reference
    String

    Internal transaction reference (provide either this or merchant_reference)

  • merchant_reference
    String

    Merchant's reference ID (provide either this or internal_reference)

Response Example

{
  "code": 200,
  "status": "success",
  "data": {
    "id": "87",
    "internal_reference": "VXN77195718575967",
    "merchant_reference": "INT771P7GBP7NQ5TX",
    "transaction_type": "COLLECTION",
    "request_currency": "UGX",
    "transaction_amount": "50000.00",
    "transaction_charge": "0.00",
    "transaction_account": "256751234567",
    "total_credit": "50000.00",
    "provider_code": "airtel_ug",
    "customer_name": "John Doe",
    "customer_email": "johndoe@gmail.com",
    "transaction_status": "Pending",
    "status_message": "Collection is pending",
    "description": null,
    "createdAt": "2026-01-22 06:15:51",
    "completedAt": null
  }
}
Response Fields
  • code
    Integer

    HTTP status code

  • status
    String

    Request status (success/error)

  • data
    Object

    Transaction data

Transaction Data Fields
  • id
    String

    Transaction ID

  • internal_reference
    String

    Internal transaction reference

  • merchant_reference
    String

    Merchant's reference ID

  • transaction_type
    String

    Transaction type (COLLECTION/PAYOUT)

  • request_currency
    String

    Transaction currency (UGX)

  • transaction_amount
    String

    Transaction amount

  • transaction_charge
    String

    Transaction fee charged

  • transaction_account
    String

    Phone number used for transaction

  • total_credit
    String

    Total amount credited

  • provider_code
    String

    Mobile money provider (airtel_ug, mtn_ug)

  • customer_name
    String

    Customer name

  • customer_email
    String

    Customer email

  • transaction_status
    String

    Transaction status (Completed, Pending, Failed)

  • status_message
    String

    Status description message

  • description
    String

    Transaction description

  • createdAt
    String

    Transaction creation timestamp

  • completedAt
    String

    Transaction completion timestamp

Transaction Statuses

Completed
The transaction was successfully processed.

Failed
The transaction could not be completed due to an error or rejection.

Pending
The transaction is still being processed and the final status is not yet available.