NEW APP AVAILABLE FOR DOWNLOAD NOW

Get it on Google PlayDownload on the App Store

Balance & Transactions

Check your account balance and transaction history

Monitor your account balance and review transaction history through the API.

Check Balance

Get your current account balance:

bash
curl -X GET \
  -H "Authorization: Bearer sk_live_your_secret_key" \
  https://my.rizpay.app/api/partners/v1/account/balance

Response:

json
{
  "status": { "code": 200, "message": "Success" },
  "data": {
    "balance": "50000.00",
    "currency": "NGN",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
FieldDescription
balanceCurrent available balance
currencyCurrency code (NGN)
updated_atLast balance update time

Required Scope: read_balance

List Transactions

Get your transaction history with optional filters:

bash
curl -X GET \
  -H "Authorization: Bearer sk_live_your_secret_key" \
  "https://my.rizpay.app/api/partners/v1/account/transactions?status=successful&per_page=50"

Response:

json
{
  "status": { "code": 200, "message": "Success" },
  "data": [
    {
      "id": "txn_abc123",
      "external_reference": "1736234400A1B2C3",
      "rizpay_reference": "RIZ-ABCD-1234",
      "amount": "1000.00",
      "fee": "0.00",
      "total": "1000.00",
      "status": "successful",
      "product_type": "airtime",
      "product_id": "prd_mtn_airtime",
      "phone_number": "08012345678",
      "created_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T10:30:02Z"
    }
  ],
  "pagination": {
    "current_page": 1,
    "per_page": 50,
    "total_pages": 10,
    "total_count": 487
  }
}

Required Scope: read_transactions

Query Parameters

ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (max: 100, default: 20)
statusstringFilter by status: pending, successful, failed, reversed
categorystringFilter by category: funding, purchase, withdrawal, transfer, commission, promo
fromISO8601Start date (e.g., 2024-01-15T00:00:00Z)
toISO8601End date (e.g., 2024-01-31T23:59:59Z). Must be after from
referencestringFilter by external_reference

Filter by Status

bash
# Successful transactions only
GET /account/transactions?status=successful

GET /account/transactions?status=pending

GET /account/transactions?status=failed

Filter by Category

bash
# Purchase transactions only
GET /account/transactions?category=purchase

# Funding transactions only
GET /account/transactions?category=funding

# Withdrawal transactions only
GET /account/transactions?category=withdrawal

Filter by Date Range

bash
# Transactions from January 2024
GET /account/transactions?from=2024-01-01T00:00:00Z&to=2024-01-31T23:59:59Z

Find by Reference

bash
# Find transaction by your reference
GET /account/transactions?reference=1736234400A1B2C3

Validation Errors

Invalid filter parameters return a 400 Bad Request with details:

json
{
  "status": { "code": 400, "message": "Bad Request" },
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid status 'invalid'. Valid values: pending, successful, failed, reversed"
  }
}

Common validation errors:

ErrorCause
Invalid statusStatus not in: pending, successful, failed, reversed
Invalid categoryCategory not in: funding, purchase, withdrawal, transfer, commission, promo
Invalid 'from' date formatDate not in ISO8601 format
Invalid 'to' date formatDate not in ISO8601 format
'from' date must be before 'to' datefrom is after to

Get Transaction Details

Get details for a specific transaction by ID or external_reference:

bash
# By transaction ID
curl -X GET \
  -H "Authorization: Bearer sk_live_your_secret_key" \
  https://my.rizpay.app/api/partners/v1/account/transactions/txn_abc123

# By external_reference (16 chars: 10 digits + 6 alphanumeric)
curl -X GET \
  -H "Authorization: Bearer sk_live_your_secret_key" \
  https://my.rizpay.app/api/partners/v1/account/transactions/1736234400A1B2C3

Response:

json
{
  "status": { "code": 200, "message": "Success" },
  "data": {
    "id": "txn_abc123",
    "external_reference": "1736234400A1B2C3",
    "rizpay_reference": "RIZ-ABCD-1234",
    "amount": "1000.00",
    "fee": "0.00",
    "total": "1000.00",
    "status": "successful",
    "product_type": "airtime",
    "product_id": "prd_mtn_airtime",
    "product_name": "MTN Airtime",
    "phone_number": "08012345678",
    "created_at": "2024-01-15T10:30:00Z",
    "completed_at": "2024-01-15T10:30:02Z"
  }
}

Transaction Statuses

StatusDescription
pendingProcessing with provider
successfulCompleted successfully
failedFailed (balance refunded)
reversedReversed/refunded after success

Requery Transaction

For pending transactions, you can trigger a status requery from the provider:

bash
curl -X POST \
  -H "Authorization: Bearer sk_live_your_secret_key" \
  https://my.rizpay.app/api/partners/v1/purchases/txn_abc123/query

Response:

json
{
  "status": { "code": 200, "message": "Query initiated" },
  "data": {
    "id": "txn_abc123",
    "status": "pending",
    "message": "Transaction status will be updated shortly"
  }
}

Note: Requery is only available for pending transactions. The actual status update happens asynchronously - use webhooks to get notified.

Low Balance Alerts

Configure low balance alerts in your account settings:

  1. Go to Settings > API
  2. Enable "Low Balance Alerts"
  3. Set your threshold amount

When your balance drops below the threshold:

  • You'll receive an email notification
  • A account.low_balance webhook is triggered (if subscribed)

Complete Example

javascript
async function getAccountSummary(apiKey) {
  const BASE_URL = "https://my.rizpay.app/api/partners/v1";
  const headers = { Authorization: `Bearer ${apiKey}` };

  // Get balance
  const balanceRes = await fetch(`${BASE_URL}/account/balance`, { headers });
  const balance = await balanceRes.json();

  // Get recent transactions
  const txnRes = await fetch(`${BASE_URL}/account/transactions?per_page=10`, {
    headers,
  });
  const transactions = await txnRes.json();

  // Get today's stats
  const today = new Date().toISOString().split("T")[0];
  const statsRes = await fetch(
    `${BASE_URL}/account/transactions?from=${today}T00:00:00Z&status=successful`,
    { headers }
  );
  const todayTxns = await statsRes.json();

  return {
    currentBalance: balance.data.balance,
    recentTransactions: transactions.data,
    todayCount: todayTxns.pagination.total_count,
    todayVolume: todayTxns.data.reduce(
      (sum, txn) => sum + parseFloat(txn.amount),
      0
    ),
  };
}

Next Steps