Skip to Content
HomeLink Hub
Transactions & Payments

Get a transaction by ID

GET
/api/v1/transaction/{id}

Access: Bearer token required.

Returns one Transaction record with propertyId populated (title, location, media, pricing), but only when the caller is parties.from or parties.to; someone else's transaction is reported as not found rather than forbidden. The id is not validated, so a malformed id surfaces as a 500 with Mongoose's cast error message instead of a 400. See the caveat on GET /transaction/history: nothing in the current service source writes Transaction documents, so in practice this is likely to return 404.

Authorization

bearerAuth
headerAuthorizationBearer <JWT>

Access token returned by sign-in. Send it as Authorization: Bearer <token>.

Path Parameters

id*string

ObjectId of the transaction.

Response Body

Transaction found and the caller is one of its parties.

application/json
  1. response
status*integer
success*boolean
message*string
data*
Example Request
curl -X GET 'http://localhost:4000/api/v1/transaction/string'
Example Response
{  "status": 200,  "success": true,  "message": "Transaction fetched",  "data": {    "_id": "6661b3e58d4f6c0012ef9a42",    "escrowId": "6662c4f69e507d0012fa0b53",    "propertyId": {      "_id": "664a0b7e3f2c1d0012ef5a01",      "title": "3 Bedroom Apartment in Lekki Phase 1",      "location": {        "state": "Lagos",        "lga": "Eti-Osa",        "community": "Lekki Phase 1",        "street": "14 Admiralty Way",        "nearestLandmark": "Lekki Phase 1 Gate",        "coordinates": {          "type": "Point",          "coordinates": [            3.4723,            6.4474          ]        }      },      "pricing": {        "rentPrice": 4500000,        "salePrice": null,        "currency": "NGN",        "rentDurationYears": 1      },      "media": {        "images": [          {            "_id": "664a0b7e3f2c1d0012ef5a02",            "url": "https://res.cloudinary.com/homelinkhub/image/upload/v1716100000/properties/lekki-3bed-living.jpg",            "metadata": {              "tag": "Living room"            }          }        ],        "videos": []      }    },    "type": "rent_payment",    "status": "completed",    "amount": 4500000,    "currency": "NGN",    "parties": {      "from": "663d9a1c5e4b2a0012cd7f10",      "to": "6629e4f08a7b3c0012aa9e42"    },    "paymentMethod": "bank_transfer",    "paymentGateway": "pandascrow",    "paymentReference": "HLH-ESC-20261125-0042",    "auditTrail": [      {        "_id": "6661b3e58d4f6c0012ef9a43",        "action": "payment_received",        "actor": "663d9a1c5e4b2a0012cd7f10",        "timestamp": "2026-11-25T09:22:41.000Z"      }    ],    "createdAt": "2026-11-25T09:20:05.112Z",    "updatedAt": "2026-11-25T09:22:41.310Z",    "__v": 0  }}