curl --request GET \
--url https://api.example.com/api/v1/wallets/fiat/{walletId}/transactions \
--header 'x-api-key: <x-api-key>'{
"transactions": [
{
"transactionId": "txn_abc123",
"transactionType": "deposit",
"walletId": "wal_xyz789",
"accountNumber": "1234567890",
"status": "completed",
"amount": 50000,
"fee": 0,
"originator": {
"accountNumber": "0987654321",
"accountName": "JOHN DOE",
"bankName": "GTBank"
},
"narration": "Payment from John Doe",
"reference": "FP-20240115-001",
"createdAt": "2024-01-15T10:30:45Z"
},
{
"transactionId": "txn_def456",
"transactionType": "withdrawal",
"walletId": "wal_xyz789",
"accountNumber": "1234567890",
"status": "completed",
"amount": 75000,
"fee": 50,
"beneficiary": {
"accountNumber": "1122334455",
"accountName": "JANE SMITH",
"bankName": "Zenith Bank"
},
"narration": "Payment to Jane Smith",
"reference": "FP-20240115-002",
"createdAt": "2024-01-15T14:20:30Z"
}
],
"total": 125,
"page": 1,
"limit": 10,
"totalPages": 13
}
Retrieve all transactions for a wallet with pagination
curl --request GET \
--url https://api.example.com/api/v1/wallets/fiat/{walletId}/transactions \
--header 'x-api-key: <x-api-key>'{
"transactions": [
{
"transactionId": "txn_abc123",
"transactionType": "deposit",
"walletId": "wal_xyz789",
"accountNumber": "1234567890",
"status": "completed",
"amount": 50000,
"fee": 0,
"originator": {
"accountNumber": "0987654321",
"accountName": "JOHN DOE",
"bankName": "GTBank"
},
"narration": "Payment from John Doe",
"reference": "FP-20240115-001",
"createdAt": "2024-01-15T10:30:45Z"
},
{
"transactionId": "txn_def456",
"transactionType": "withdrawal",
"walletId": "wal_xyz789",
"accountNumber": "1234567890",
"status": "completed",
"amount": 75000,
"fee": 50,
"beneficiary": {
"accountNumber": "1122334455",
"accountName": "JANE SMITH",
"bankName": "Zenith Bank"
},
"narration": "Payment to Jane Smith",
"reference": "FP-20240115-002",
"createdAt": "2024-01-15T14:20:30Z"
}
],
"total": 125,
"page": 1,
"limit": 10,
"totalPages": 13
}
deposit or withdrawalcurl "https://api-staging.fossapay.com/api/v1/wallets/fiat/wal_abc123xyz/transactions?page=1&limit=10&transactionType=deposit" \
-H "x-api-key: fp_live_sk_xxxxxxxx"
const response = await fetch('https://api-staging.fossapay.com/api/v1/wallets/fiat/wal_abc123xyz/transactions?page=1&limit=10&transactionType=deposit&startDate=2024-01-01&endDate=2024-01-31', {
headers: {
'x-api-key': 'fp_live_sk_xxxxxxxx'
}
});
const data = await response.json();
const transactions = data.transactions;
import requests
url = "https://api-staging.fossapay.com/api/v1/wallets/fiat/wal_abc123xyz/transactions"
params = {
"page": 1,
"limit": 10,
"transactionType": "deposit",
"startDate": "2024-01-01",
"endDate": "2024-01-31"
}
headers = {"x-api-key": "fp_live_sk_xxxxxxxx"}
response = requests.get(url, headers=headers, params=params)
data = response.json()
transactions = data["transactions"]
Show transaction object
deposit or withdrawal{
"transactions": [
{
"transactionId": "txn_abc123",
"transactionType": "deposit",
"walletId": "wal_xyz789",
"accountNumber": "1234567890",
"status": "completed",
"amount": 50000,
"fee": 0,
"originator": {
"accountNumber": "0987654321",
"accountName": "JOHN DOE",
"bankName": "GTBank"
},
"narration": "Payment from John Doe",
"reference": "FP-20240115-001",
"createdAt": "2024-01-15T10:30:45Z"
},
{
"transactionId": "txn_def456",
"transactionType": "withdrawal",
"walletId": "wal_xyz789",
"accountNumber": "1234567890",
"status": "completed",
"amount": 75000,
"fee": 50,
"beneficiary": {
"accountNumber": "1122334455",
"accountName": "JANE SMITH",
"bankName": "Zenith Bank"
},
"narration": "Payment to Jane Smith",
"reference": "FP-20240115-002",
"createdAt": "2024-01-15T14:20:30Z"
}
],
"total": 125,
"page": 1,
"limit": 10,
"totalPages": 13
}
// Get all transactions with pagination
let page = 1;
let allTransactions = [];
while (true) {
const response = await fetch(`https://api-staging.fossapay.com/api/v1/wallets/fiat/wal_abc123xyz/transactions?page=${page}&limit=50`, {
headers: {
'x-api-key': 'fp_live_sk_xxxxxxxx'
}
});
const data = await response.json();
allTransactions.push(...data.transactions);
if (page >= data.totalPages) {
break;
}
page++;
}
console.log(`Retrieved ${allTransactions.length} transactions`);