View as Markdown

Transactions Service API

Transactions Service provides raw and Open Banking-mapped account transaction history.

Authenticated history operations accept a verified neosession cookie, an X-HSBC-Cust-Id header when no cookie is present, or a B2B bearer token.

Operations:

  • GET /v1/transactions/history - raw HSBCnet transaction-history response.
  • GET /v2/transactions/history - paginated Open Banking-mapped transaction history.
  • /v1/test-transactions - development and test-only in-memory transaction-store operations.
Base URL: https://interact-uat.hsbc.com/yi-transactions-service/
GET /v1/transactions/history

Get raw HSBCnet-compatible transaction history

Returns transaction history in the raw HSBCnet-compatible responseBody and stmtTranList structure. Use header test: 1 to return seeded in-memory data instead of calling a downstream service. Configured synthetic customer IDs are served from test-data-viewer automatically, bypassing DSP and HSBCnet, and are adapted to the same raw response structure.

Requires authentication: neoSessionCookie (cookie) or xHSBCCustIdHeader (header) or b2bBearerToken (header)

Parameters

NameInDescription
X-HSBC-Account-Id required
string
header HSBC account identifier for the requested transaction history.
X-HSBC-Account-Currency
string
header Optional account currency used to label returned amounts.
X-HSBC-Request-Correlation-Id
string
header Optional caller-provided correlation identifier.
X-HSBC-CUSTID
string
header Customer identifier used for the customer-id header authentication journey.
test
string
header Set to 1 to serve seeded in-memory data instead of calling the upstream transaction-history service.
lookbackDays
integer
query Number of days of transaction history to request.

Responses

  • 200 Raw transaction history retrieved successfully
  • 400 Invalid request parameters or missing required headers.
  • 401 Missing or invalid authentication.
  • 403 Caller is authenticated but not entitled for the requested account.
  • 500 Unexpected service failure.
  • 502 Downstream transaction-history service returned an invalid or failing response.
GET /v2/transactions/history

Get v2 transaction history

Returns paginated Open Banking-mapped transactions for a single account in the standard data/meta envelope. Set includeRawHSBCnetData=true to include raw source fields in each transaction. Use header test: 1 to return seeded in-memory data instead of calling the upstream service. Customer IDs mapped in the internal test-data hashmap are served from test-data-viewer automatically and mapped back to the same response shape.

Requires authentication: neoSessionCookie (cookie) or xHSBCCustIdHeader (header) or b2bBearerToken (header)

Parameters

NameInDescription
X-HSBC-Account-Id required
string
header HSBC account identifier for the requested transaction history.
X-HSBC-Account-Currency
string
header Optional account currency used to label returned amounts.
X-HSBC-Request-Correlation-Id
string
header Optional caller-provided correlation identifier.
X-HSBC-CUSTID
string
header Customer identifier used for the customer-id header authentication journey.
test
string
header Set to 1 to serve seeded in-memory data instead of calling the upstream transaction-history service.
offset
integer
query Zero-based starting index for pagination.
limit
integer
query Maximum number of records to return.
includeRawHSBCnetData
boolean
query When true, includes a normalized raw HSBCnet data object in each mapped transaction.
lookbackDays
integer
query Number of days of transaction history to request.

Responses

  • 200 Transactions retrieved successfully
  • 400 Invalid request parameters or missing required headers.
  • 401 Missing or invalid authentication.
  • 403 Caller is authenticated but not entitled for the requested account.
  • 500 Unexpected service failure.
  • 502 Downstream transaction-history service returned an invalid or failing response.
GET /v1/test-transactions

Get seeded transactions

Returns the transactions in the in-memory test store for a customer and account. This endpoint is intended for development and testing only and does not require authentication.

Parameters

NameInDescription
customerId required
string
query Customer identifier used to scope the in-memory test store.
accountId required
string
query Account identifier used to scope the in-memory test store.

Responses

  • 200 Seeded transactions retrieved successfully
  • 400 Invalid test-store request.
  • 401 Unauthorized — authentication credentials missing or invalid
  • 403 Forbidden — insufficient permissions for this resource
  • 500 Internal server error
POST /v1/test-transactions

Add or replace a seeded transaction

Adds a transaction to the in-memory test store. Supplying an existing index for the same customer and account replaces that entry in place. This endpoint is intended for development and testing only and does not require authentication.

Request Body application/json

FieldDescription
customerId required
string
Customer identifier used to scope the seed store.
accountId required
string
Account identifier used to scope the seed store.
currency
string
Currency used to label mapped Amount.Currency values.
index
integer
Optional positive index. Reusing an index replaces that entry in place.
transaction required
object
Raw HSBCnet stmtTranList entry. It must contain crDbInd, amt, and either postDate or bosPostDt.

Responses

  • 200 Transaction added or replaced successfully
  • 400 Invalid test-store request.
  • 401 Unauthorized — authentication credentials missing or invalid
  • 403 Forbidden — insufficient permissions for this resource
  • 500 Internal server error
DELETE /v1/test-transactions

Delete seeded transactions

Removes all in-memory transactions for a customer and account. This endpoint is intended for development and testing only and does not require authentication.

Parameters

NameInDescription
customerId required
string
query Customer identifier used to scope the in-memory test store.
accountId required
string
query Account identifier used to scope the in-memory test store.

Responses

  • 200 Seeded transactions deleted successfully
  • 400 Invalid test-store request.
  • 401 Unauthorized — authentication credentials missing or invalid
  • 403 Forbidden — insufficient permissions for this resource
  • 500 Internal server error