Get Transaction by ID
Retrieve a specific transaction using its unique ID.
Endpoint
GET https://api.cashonrails.com/api/v1/{id}
Headers
| Header | Type | Description |
|---|---|---|
| Authorization | string | Bearer token with your secret key |
| Content-Type | string | application/json |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | Yes | The unique transaction ID |
Sample Request
GET https://api.cashonrails.com/api/v1/{id}Sample cURL Request
curl -X GET "https://api.cashonrails.com/api/v1/{id}" \
-H "Authorization: Bearer YOUR_SECRET_KEY" \
-H "Content-Type: application/json"Sample Response
{
"status": true,
"message": "Transactions retrieved",
"data": {
"id": 204404,
"domain": "live",
"status": "success",
"reference": "100004251010120646142810790227",
"amount": "1000",
"gateway_response": null,
"paid_at": "2025-10-10 13:07:03",
"created_at": "2025-10-10T12:07:03.000000Z",
"channel": "banktransfer",
"currency": "NGN",
"ip_address": "162.158.230.113"
},
"log": {
"time_spent": 0,
"attempts": 0,
"authentication": null,
"errors": 0,
"success": true,
"channel": "banktransfer",
"history": []
},
"fees": "10",
"customer": {
"id": 998,
"customer_code": "CUS_yhlknqpurtkar5p",
"first_name": "Sunday",
"last_name": "Akinlabi",
"email": "akinlabisamson15@gmail.com",
"phone": "07040237649",
"metadata": "{}"
},
"plan": null,
"paid_at": "2025-10-10 13:07:03",
"created_at": "2025-10-10T12:07:03.000000Z",
"requested_amount": "1000"
}Response Fields
| Field | Type | Description |
|---|---|---|
status | boolean | Indicates if the request was successful |
message | string | Human-readable message |
data | object | Transaction details |
log | object | Processing log information |
fees | string | Transaction fees charged |
customer | object | Customer information |
plan | object | Subscription plan (if applicable) |
paid_at | string | Payment completion timestamp |
created_at | string | Transaction creation timestamp |
requested_amount | string | Originally requested amount |
Transaction Data Fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique transaction ID |
domain | string | Environment (live/test) |
status | string | Transaction status |
reference | string | Unique transaction reference |
amount | string | Transaction amount |
gateway_response | string | Gateway response message |
paid_at | string | Payment completion timestamp |
created_at | string | Transaction creation timestamp |
channel | string | Payment channel used |
currency | string | Transaction currency |
ip_address | string | Customer’s IP address |
Customer Object Fields
| Field | Type | Description |
|---|---|---|
id | integer | Unique customer ID |
customer_code | string | Unique customer code |
first_name | string | Customer’s first name |
last_name | string | Customer’s last name |
email | string | Customer’s email address |
phone | string | Customer’s phone number |
metadata | string | Additional customer metadata |
Log Object Fields
| Field | Type | Description |
|---|---|---|
time_spent | integer | Processing time in seconds |
attempts | integer | Number of processing attempts |
authentication | string | Authentication details |
errors | integer | Number of errors encountered |
success | boolean | Whether processing was successful |
channel | string | Payment channel used |
history | array | Processing history events |
Error Responses
Transaction Not Found
{
"status": false,
"message": "Transaction not found",
"data": null
}This error occurs when the specified transaction ID does not exist in your account.
Use this endpoint to retrieve detailed information about a specific transaction, including comprehensive customer data and processing logs.
Last updated on