Get last transaction event

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)

FieldTypeRequiredDescription
paymentCardIdstringYesID of the payment card to query. Minimum length: 1.
dateFromstring (date-time)YesStart of the date range (ISO 8601, e.g. 2024-01-01T00:00:00Z).
dateTostring (date-time)YesEnd of the date range (ISO 8601, e.g. 2024-01-31T23:59:59Z).
filterobjectNoStructured transaction type filter (all, deposit, withdraw, pos, transactionStatus). Each key is a filterItem with displayName (string), value (boolean), and optional nested items.
jsonFilterstringNoRaw JSON filter string for advanced filtering scenarios.

Extended fields (use paymentcardwithperiodandamountfilterrequest shape to include these)

FieldTypeRequiredDescription
amountFilterobjectNoAmount range filter. Contains minValue (int64) and maxValue (int64) in cents.
searchStringstringNoFree-text search string applied against transaction fields.
paginationSettingsobjectNoPagination 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

FieldTypeDescription
dataarrayList of transaction event objects matching the filter criteria.
data[].typenamestringInternal type identifier for the event.
data[].responseCodestringAuthorization response code returned by the network.
data[].responseDescriptionstringHuman-readable description of the response code.
data[].createdAtstring (date-time)Timestamp when the transaction event was created.
data[].approvedAmountobjectAmount approved by the issuer. Contains value (int64, in cents) and currencyCode (string).
data[].requestedAmountobjectAmount originally requested. Contains value (int64, in cents) and currencyCode (string).
data[].merchantDetailsobjectMerchant information. Contains category, categoryCode, countryCodeAlpha3, description, name, merchantId.
data[].paymentCardobjectPayment card associated with the event. Contains id, bin, last4, status, formFactor, expirationDate, network.
data[].transactionobjectSource transaction reference. Contains typename, id, and transactionEvents array.
data[].feesarrayFees associated with the transaction. Each item has type, approvedFeeAmount, and requestedFeeAmount.
filterobjectEcho 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

CodeWhen it happens
400Missing required fields (paymentCardId, dateFrom, or dateTo) or validation error (e.g. take outside 1–10000)
401Token missing, expired, or invalid
403Insufficient permissions to access the specified payment card
404Payment card not found
500Internal server error

Common Mistakes

  • Omitting paymentCardId, dateFrom, or dateTo — all three are required; the request will return 400 without them.
  • Providing dateFrom later than dateTo — the date range must be chronologically ordered.
  • Setting paginationSettings.take to 0 or above 10000 — the valid range is 1 to 10000 inclusive.
  • Treating approvedAmount.value and requestedAmount.value as dollars — these are integer values in cents (e.g. 4250 = $42.50).
  • Ignoring the deprecated: true flag 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
    }
  }'
Body Params
string
required
length ≥ 1
date-time
required
date-time
required
filter
object
string | null
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json