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
- Method: POST
- URL: https://api.gafapay.com:8443/gafapay/v3/analytics/recent_transaction_users
- Content-Type: application/json
- companyid: 59388167894b4d10a04fe5da3b8a2104
- requestid: b35d332f-131e-44c1-892f-8322e022da74
- Authorization: Token required
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
| Parameter | Type | Required | Description |
|---|---|---|---|
| user_id | String | Yes | User ID for which recent transactions are wanted |
| product_code | String | Yes | Product code to filter transactions (e.g., "P2P", "CIB", "COB", "MS", "AS", "CS") |
| limit | Integer | No | Number of recent users to return (default: 100, max: 1000) |
| start_date | Long | No | Start date in epoch seconds |
| end_date | Long | No | End 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= Success0= 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:
| Field | Type | Description |
|---|---|---|
| id | String | Unique user identifier |
| first_name | String | User's first name |
| last_name | String | User's last name |
| String | User's email address (can be null) | |
| dial_code | String | Country dial code (e.g., "+221", "+91") |
| phone_number | String | User's phone number |
| user_type | Integer | User type identifier |
| status_id | Integer | User status identifier |
| image | String | User's profile image URL or ID (can be null) |
| kyc_status | Integer | KYC verification status |
| kyc_process_status | Integer | KYC process status |
| display_name | String | User's display name (can be null) |
| display_image | String | User's display image URL (can be null) |
| last_transaction_date | Long | Last transaction date in epoch seconds |
| transaction_count | Integer | Number of transactions with this user |
| total_transaction_amount | Double | Total 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_idas 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
limitparameter 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