Get Last Transaction Event
This endpoint retrieves the last transaction events associated with a specific payment card, filtered by date range. An optional amount filter and search string may be supplied to narrow the result set further. Note: this endpoint is marked deprecated; partners should migrate to newer transaction query endpoints as they become available.
Endpoint
POST /api/transactionEvents/last
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint to look up the most recent activity on a given payment card — for example, when building a transaction history view, auditing recent card spend, or troubleshooting a declined authorization. Provide dateFrom and dateTo to bound the search window, and optionally add an amountFilter or searchString to focus on specific transactions.
Request Body
The request body accepts one of two shapes. The base shape (paymentcardwithperiodandfilterrequest) is always valid. The extended shape (paymentcardwithperiodandamountfilterrequest) adds optional amount filtering and pagination.
Base fields (required by both shapes)
| Field | Type | Required | Description |
|---|---|---|---|
paymentCardId | string | Yes | ID of the payment card to query. Minimum length: 1. |
dateFrom | string (date-time) | Yes | Start of the date range (ISO 8601, e.g. 2024-01-01T00:00:00Z). |
dateTo | string (date-time) | Yes | End of the date range (ISO 8601, e.g. 2024-01-31T23:59:59Z). |
filter | object | No | Structured transaction type filter (all, deposit, withdraw, pos, transactionStatus). Each key is a filterItem with displayName (string), value (boolean), and optional nested items. |
jsonFilter | string | No | Raw JSON filter string for advanced filtering scenarios. |
Extended fields (use paymentcardwithperiodandamountfilterrequest shape to include these)
| Field | Type | Required | Description |
|---|---|---|---|
amountFilter | object | No | Amount range filter. Contains minValue (int64) and maxValue (int64) in cents. |
searchString | string | No | Free-text search string applied against transaction fields. |
paginationSettings | object | No | Pagination control. take (int32, 1–10000) sets the page size; skip (int32, 0–2147483647) sets the offset. |
{
"paymentCardId": "pcard_5f3a2b1c4e6d7890abcdef01",
"dateFrom": "2024-05-01T00:00:00Z",
"dateTo": "2024-05-31T23:59:59Z",
"filter": {
"all": { "displayName": "All", "value": true },
"pos": { "displayName": "Point of Sale", "value": true },
"transactionStatus": { "displayName": "Approved", "value": true }
},
"amountFilter": {
"minValue": 100,
"maxValue": 50000
},
"searchString": "coffee",
"paginationSettings": {
"take": 25,
"skip": 0
}
}Response
200 OK
| Field | Type | Description |
|---|---|---|
data | array | List of transaction event objects matching the filter criteria. |
data[].typename | string | Internal type identifier for the event. |
data[].responseCode | string | Authorization response code returned by the network. |
data[].responseDescription | string | Human-readable description of the response code. |
data[].createdAt | string (date-time) | Timestamp when the transaction event was created. |
data[].approvedAmount | object | Amount approved by the issuer. Contains value (int64, in cents) and currencyCode (string). |
data[].requestedAmount | object | Amount originally requested. Contains value (int64, in cents) and currencyCode (string). |
data[].merchantDetails | object | Merchant information. Contains category, categoryCode, countryCodeAlpha3, description, name, merchantId. |
data[].paymentCard | object | Payment card associated with the event. Contains id, bin, last4, status, formFactor, expirationDate, network. |
data[].transaction | object | Source transaction reference. Contains typename, id, and transactionEvents array. |
data[].fees | array | Fees associated with the transaction. Each item has type, approvedFeeAmount, and requestedFeeAmount. |
filter | object | Echo of the filter state applied to the query (all, deposit, withdraw, pos, transactionStatus). |
{
"data": [
{
"typename": "AuthorizationRequest",
"responseCode": "00",
"responseDescription": "Approved",
"createdAt": "2024-05-15T14:23:07Z",
"approvedAmount": {
"value": 4250,
"currencyCode": "USD"
},
"requestedAmount": {
"value": 4250,
"currencyCode": "USD"
},
"merchantDetails": {
"category": "EATING_PLACES_RESTAURANTS",
"categoryCode": "5812",
"countryCodeAlpha3": "USA",
"description": "Food & Beverage",
"name": "The Corner Cafe",
"merchantId": "mid_abc123456789"
},
"paymentCard": {
"id": "pcard_5f3a2b1c4e6d7890abcdef01",
"bin": "411111",
"last4": "4242",
"status": "ACTIVE",
"formFactor": "VIRTUAL",
"expirationDate": "12/2027",
"network": "VISA"
},
"transaction": {
"typename": "Transaction",
"id": "txn_9e8d7c6b5a4f3210fedcba09",
"transactionEvents": []
},
"fees": []
}
],
"filter": {
"all": { "displayName": "All", "value": true },
"deposit": { "displayName": "Deposit", "value": false },
"withdraw": { "displayName": "Withdraw", "value": false },
"pos": { "displayName": "Point of Sale", "value": true },
"transactionStatus": { "displayName": "Approved", "value": true }
}
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Missing required fields (paymentCardId, dateFrom, or dateTo) or validation error (e.g. take outside 1–10000) |
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions to access the specified payment card |
| 404 | Payment card not found |
| 500 | Internal server error |
Common Mistakes
- Omitting
paymentCardId,dateFrom, ordateTo— all three are required; the request will return 400 without them. - Providing
dateFromlater thandateTo— the date range must be chronologically ordered. - Setting
paginationSettings.taketo 0 or above 10000 — the valid range is 1 to 10000 inclusive. - Treating
approvedAmount.valueandrequestedAmount.valueas dollars — these are integer values in cents (e.g.4250= $42.50). - Ignoring the
deprecated: trueflag on this endpoint — plan migration to the current transaction query endpoints to avoid future breakage.
Related Endpoints
POST /api/transactionEvents— Retrieve a paginated list of transaction events with broader filtering options.GET /api/paymentCards/{paymentCardId}— Retrieve details for a specific payment card.POST /api/auth/v2— Obtain a Bearer token for authentication.
Example
curl -X POST https://api.banking.netevia.dev/api/transactionEvents/last \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"paymentCardId": "pcard_5f3a2b1c4e6d7890abcdef01",
"dateFrom": "2024-05-01T00:00:00Z",
"dateTo": "2024-05-31T23:59:59Z",
"amountFilter": {
"minValue": 100,
"maxValue": 50000
},
"paginationSettings": {
"take": 25,
"skip": 0
}
}'