Transaction History by User_Id API Documentation
This document explains how to retrieve the transaction history for a specific user, including support for pagination.
Overview
The transaction/history/user/:userId endpoint allows you to fetch a list of all transactions associated with a particular user. This is useful for providing transaction statements or history within your user-facing applications.
Retrieve User Transaction History
Description: Retrieves a paginated list of transaction history records for a specific user.
Path Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
userId | string | Yes | The unique UUID of the user whose transaction history is being requested. |
Query Parameters
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
page | integer | No | The page number to retrieve (defaults to 1). |
limit | integer | No | The number of records per page (defaults to 10). |
cURL Command
curl --request GET \
--url 'https://api.swiftramp.in/v1/transaction/history/user/[USER_ID]?page=1&limit=10' \
--header 'Authorization: Bearer [ACCESS_TOKEN]' \
--header 'Content-Type: application/json'Success Response (200 OK)
{
"status": true,
"code": 200,
"message": "Transactions fetched successfully",
"data": {
"total_transactions": 10,
"page": 1,
"limit": 10,
"total_pages": 1,
"transactions": [
{
"id": "019e5e8a-0d0c-71ea-8b92-34552bb084b1",
"client_transaction_id": "87b2b208-a8e6-4185-90ba-67629a95eb49",
"neokred_transaction_id": "87b2b208-a8e6-4185-90ba-67629a95eb50",
"client_id": "ab937578-6553-4c46-8148-553869e1d88f",
"user_id": "87b2b208-a8e6-4185-90ba-67629a95eb48",
"account_holder_name": "Ravinder Joshi",
"account_number": "987654321123",
"ifsc_code": "SBIN0000031",
"bank_name": "State Bank Of India",
"amount": "100.00",
"status": "PENDING",
"currency": "INR",
"utr": null,
"remark": "remark",
"metadata": null,
"created_at": "2026-05-25T04:19:26.156Z",
"updated_at": "2026-05-25T04:19:26.156Z"
}
]
}
}Response Payload Details (Based on Model Schema)
| Property Name | Type | Description |
|---|---|---|
id | uuid | Unique identifier for the transaction record. |
amount | decimal(12,2) | The transaction amount. |
status | enum | Current state: PENDING, PROCESSING, SUCCESS, FAILED. |
currency | string(3) | Transaction currency (default: INR). |
utr | string(100) | Unique Transaction Reference number. |
remark | string(50) | Optional transaction note. |
Enums and Constants
Transaction Status
| Value | Description |
|---|---|
PENDING | Transaction has been initiated and is awaiting final processing. |
PROCESSING | Transaction is currently being handled by the banking network. |
SUCCESS | Transaction has been successfully completed. |
FAILED | Transaction failed to complete. |
- π‘ Path Parameter: Ensure you replace
[USER_ID]in the URL with the actual userβs UUID. - π‘ Schema Sync: All fields are synchronized with the
TransactionHistorydatabase model. - π‘ Authentication: Include a valid Bearer token in the
Authorizationheader for all requests.