Skip to main content

Recent Transaction Users API

Overview

Retrieve a list of users who have recently transacted with a specific user, filtered by product code. This API helps identify frequent transaction partners and provides user details for quick transaction initiation.

API Details

Endpoint

POST https://api.gafapay.com:8443/gafapay/v3/analytics/recent_transaction_users

Request Body

{
"user_id": "9034ba0b63494ce59233655013925b6f",
"product_code": "P2P",
"limit": 10
}

Request Parameters

ParameterTypeRequiredDescription
user_idStringYesUser ID for which recent transactions are wanted
product_codeStringYesProduct code to filter transactions (e.g., "P2P", "CIB", "COB", "MS", "AS", "CS")
limitIntegerNoNumber of recent users to return (default: 100, max: 1000)
start_dateLongNoStart date in epoch seconds
end_dateLongNoEnd date in epoch seconds

Headers

companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: b35d332f-131e-44c1-892f-8322e022da74
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4MzU2MjM4fQ.u8gjlrl72lsif6oWqQV8mlGUaziy0TlvNPzmPZrEzcQ
Content-Type: application/json

Response

{
"success": 1,
"error": [],
"data": {
"recent_users": [
{
"id": "ccefe7a926f8443b90ca3e4e8cd02530",
"first_name": "Gg",
"last_name": "Gh",
"email": "",
"dial_code": "+221",
"phone_number": "111111111",
"user_type": 2,
"status_id": 1,
"image": "293",
"kyc_status": 1,
"kyc_process_status": 2,
"display_name": null,
"display_image": null,
"last_transaction_date": 1757738996,
"transaction_count": 12,
"total_transaction_amount": 8517.0
},
{
"id": "f50e653ee5ee493fbc386c9c6b305b36",
"first_name": "Al",
"last_name": "Amine",
"email": "gafapay@gmail.con",
"dial_code": "+221",
"phone_number": "776534328",
"user_type": 2,
"status_id": 1,
"image": "https://s3.ap-south-1.amazonaws.com/digipaypython/ajzb75.jpeg",
"kyc_status": 2,
"kyc_process_status": 4,
"display_name": null,
"display_image": null,
"last_transaction_date": 1757663508,
"transaction_count": 2,
"total_transaction_amount": 590.0
},
{
"id": "a8393cea08594a0c93ba9b0fbaba13a4",
"first_name": "seju",
"last_name": "patel",
"email": null,
"dial_code": "+91",
"phone_number": "7984103543",
"user_type": 2,
"status_id": 1,
"image": null,
"kyc_status": 1,
"kyc_process_status": 1,
"display_name": null,
"display_image": null,
"last_transaction_date": 1755778236,
"transaction_count": 1,
"total_transaction_amount": 100.0
},
{
"id": "52052c7886bb40378ca28d6a5740f786",
"first_name": "Test",
"last_name": "Txn Cust",
"email": "dkxgn@d.com",
"dial_code": "+221",
"phone_number": "444555666",
"user_type": 2,
"status_id": 1,
"image": null,
"kyc_status": 1,
"kyc_process_status": 1,
"display_name": null,
"display_image": null,
"last_transaction_date": 1755184130,
"transaction_count": 5,
"total_transaction_amount": 263.0
}
],
"product_code": "P2P"
}
}

Response Fields

  • success (integer): Response status indicator
    • 1 = Success
    • 0 = Failure
  • error (array): Array of error messages (empty on success)
  • data (object): Response data object
    • recent_users (array): Array of recent transaction user objects
    • product_code (string): Product code used for filtering

Recent User Object Fields

Each object in the recent_users array contains:

FieldTypeDescription
idStringUnique user identifier
first_nameStringUser's first name
last_nameStringUser's last name
emailStringUser's email address (can be null)
dial_codeStringCountry dial code (e.g., "+221", "+91")
phone_numberStringUser's phone number
user_typeIntegerUser type identifier
status_idIntegerUser status identifier
imageStringUser's profile image URL or ID (can be null)
kyc_statusIntegerKYC verification status
kyc_process_statusIntegerKYC process status
display_nameStringUser's display name (can be null)
display_imageStringUser's display image URL (can be null)
last_transaction_dateLongLast transaction date in epoch seconds
transaction_countIntegerNumber of transactions with this user
total_transaction_amountDoubleTotal transaction amount with this user

Example Usage

Basic Request

curl --location 'https://api.gafapay.com:8443/gafapay/v3/analytics/recent_transaction_users' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4MzU2MjM4fQ.u8gjlrl72lsif6oWqQV8mlGUaziy0TlvNPzmPZrEzcQ' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: b35d332f-131e-44c1-892f-8322e022da74' \
--header 'Content-Type: application/json' \
--data '{
"user_id": "9034ba0b63494ce59233655013925b6f",
"product_code": "P2P",
"limit": 10
}'

Notes

  • This API returns users who have transacted with the specified user_id as either debit or credit users
  • The requesting user is automatically excluded from the results
  • Results are sorted by most recent transaction date (newest first)
  • The limit parameter controls the maximum number of users returned (default: 100, max: 1000)
  • Date parameters use Unix timestamps (epoch seconds)
  • The API filters transactions based on the specified product_code