Skip to main content
GET
/
v1
/
transactions
JavaScript
import FingoPay from '@fingoafrica/fingo-pay';

const client = new FingoPay({
  apiKey: process.env['FINGO_PAY_API_KEY'], // This is the default and can be omitted
});

const transactions = await client.transactions.list({ endDate: '2019-12-27', startDate: '2019-12-27' });

console.log(transactions.data);
{
  "status": "success",
  "message": "Transactions fetched",
  "data": {
    "items": [
      {
        "publicId": "txn_01j7b6f9p5y9h",
        "status": "completed",
        "currency": "KES",
        "accountType": "collections",
        "type": "charge",
        "paymentMethod": "mobile_money",
        "processor": "mpesa",
        "createdAt": 1723717200000,
        "updatedAt": 1723717320000,
        "merchantTransactionId": "mtx_123",
        "message": "Payment completed successfully",
        "amount": 10000,
        "chargedAmount": 10000,
        "processorReference": "ODI31ABC123",
        "phoneNumber": "+254712345678",
        "narration": "Invoice #1234",
        "customerId": "<string>",
        "customer": {},
        "fees": 100
      }
    ],
    "count": 150,
    "startDate": "2025-01-01",
    "endDate": "2025-01-31"
  }
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. Example: Authorization: Bearer sk_live_...

Query Parameters

startDate
string<date>
required

Start date for the query range (ISO 8601 format, e.g., 2025-01-01).

endDate
string<date>
required

End date for the query range (ISO 8601 format, e.g., 2025-01-31).

type
enum<string>

Filter by transaction type.

Available options:
charge,
transfer,
payment,
settlement,
airtime,
reversal,
bank_deposit,
bank_withdrawal
status
enum<string>

Filter by transaction status.

Available options:
pending,
completed,
failed,
settled,
initiated,
rejected
accountType
enum<string>

Filter by account type.

Available options:
collections,
payouts
accountNo
string

Filter by specific account number.

customerId
string

Filter by customer ID.

limit
integer
default:10000

Maximum number of results to return.

Required range: 1 <= x <= 10000

Response

Transactions fetched successfully

status
string
required
Example:

"success"

message
string
required
Example:

"Transactions fetched"

data
object
required