Skip to content

@mbanq/core-sdk-js v0.50.0


@mbanq/core-sdk-js / commands / GetTransactionById

Function: GetTransactionById()

GetTransactionById(params): Command<{ params: { params?: { associations?: string; }; savingsAccountId: number; transactionId: number; }; }, { accountId?: number; accountNo?: string; accrualRunningBalance?: number; amount: number; bookingDate?: string | number[]; createdBySystem?: boolean; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; inMultiplesOf: number; isBaseCurrency?: boolean; name: string; nameCode: string; }; date: string | number[]; dateTime?: string; enrichedData?: { categories: any[]; hasMatchingTransaction: boolean; isPotentialDuplicate: boolean; isRecurring: boolean; }; enrichedTransactionData?: { id?: string; isRecurring?: boolean; location?: { address?: string; city?: string; country?: string; lat?: number; lon?: number; postal_code?: string; region?: string; store_number?: string; }; merchantLogoUrl?: string; merchantName?: string; merchantPhoneNumber?: string; merchantWebsite?: string; paymentChannel?: string; personalFinanceCategory?: string; personalFinanceCategoryIconUrl?: string; personalFinanceSubCategory?: string; }; id: number; initiatedAt?: string; interestedPostedAsOn: boolean; interestPayableDerived?: number; isAlreadyChargeBack?: boolean; isReversal?: boolean; lienTransaction?: boolean; media?: Record<string, any>; originalTransactionId?: number; paymentDetailData?: { accountNumber?: string; bankNumber?: string; checkNumber?: string; id: number; paymentType?: { id: number; name: string; }; receiptNumber?: string; reference?: string; routingCode?: string; }; reasonForBlock?: string; refNo?: string; releaseTransactionId?: number; reversed: boolean; runningBalance: number; status?: string; submittedByUsername?: string; submittedOnDate: string | number[]; subTransactionType?: string; transactionReferenceId?: string; transactionType: { amountHold?: boolean; amountRelease?: boolean; approveTransfer?: boolean; chargeBack?: boolean; code: string; deposit?: boolean; dividendPayout?: boolean; escheat?: boolean; feeDeduction?: boolean; id: number; initiateTransfer?: boolean; interestpayableAccrued?: boolean; interestPosting?: boolean; isDebit?: boolean; isFeeReversal?: boolean; overdraftFee?: boolean; overdraftInterest?: boolean; overdraftInterestReceivableAccrued?: boolean; rejectTransfer?: boolean; value: string; withdrawal?: boolean; withdrawTransfer?: boolean; withholdTax?: boolean; writtenoff?: boolean; }; transfer?: { amount: number; correlationId: string; createdAt: string; createdBySystem: boolean; creditor: { accountType?: string; address?: string[]; agent?: { address?: string[]; country: string; identifier?: string; name?: string; }; city?: string; country: string; identifier: string; name: string; postalCode?: string; stateOrProvince?: string; }; creditorAccountNumber: string; debtor: { accountType?: string; address?: string[]; agent?: { address?: string[]; country: string; identifier?: string; name?: string; }; city?: string; country: string; identifier: string; name: string; postalCode?: string; stateOrProvince?: string; }; debtorAccountId: number; debtorAccountNumber: string; executedAt: string; externalId: string; id: number; paymentRailMetaData?: { beneficiary?: { personal?: { identificationCode: string; }; }; beneficiaryFI?: { financialInstitution?: { identificationCode?: ... | ...; }; }; beneficiaryIntermediaryFI?: { financialInstitution?: { identificationCode?: ... | ...; }; }; businessFunctionCode?: { businessFunctionCode: string; transactionTypeCode: string; }; fiPaymentMethodToBeneficiary?: Record<string, any>; originator?: { personal?: { identificationCode: string; }; }; receiverDepositoryInstitution?: { receiverABANumber: string; receiverShortName: string; }; typeSubType?: { subTypeCode: string; typeCode: string; }; }; paymentType: string; reference: string[]; statementDescription: string; status: string; stopFutureDebit: boolean; traceNumbers?: Record<string, any>; transactionId: string; type: string; valueDate: string; }; transferData?: { amount: number; clientId: number; correlationId: string; createdAt: string; creditor: { accountType: string; country: string; name: string; }; currency: string; currencyData: { code: string; decimalPlaces: number; displaySymbol: string; name: string; nameCode: string; }; debtor: { accountType: string; address?: string[]; city?: string; country: string; identifier?: string; name: string; postalCode?: string; stateOrProvince?: string; }; debtorAccountId: number; debtorAccountNumber: string; executedAt: string; externalId: string; id: number; inOrOut?: string; isManualAllocation?: boolean; paymentType: string; reference: string[]; statementDescription: string; status: string; stopFutureDebit: boolean; transactionId: string; type: string; valueDate: string; }; }>

Defined in: src/commands/rest/transaction.ts:384

Retrieves the details of a specific account transaction.

Use this API to retrieve the details of a specific account transaction. Provide the transaction Id as a parameter to access the transaction details.

Parameters

params

The parameters object

params?

{ associations?: string; } = ...

Optional query parameters (e.g., associations)

params.associations?

string = ...

savingsAccountId

number = ...

The ID of the savings account

transactionId

number = ...

The ID of the transaction

Returns

Command<{ params: { params?: { associations?: string; }; savingsAccountId: number; transactionId: number; }; }, { accountId?: number; accountNo?: string; accrualRunningBalance?: number; amount: number; bookingDate?: string | number[]; createdBySystem?: boolean; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; inMultiplesOf: number; isBaseCurrency?: boolean; name: string; nameCode: string; }; date: string | number[]; dateTime?: string; enrichedData?: { categories: any[]; hasMatchingTransaction: boolean; isPotentialDuplicate: boolean; isRecurring: boolean; }; enrichedTransactionData?: { id?: string; isRecurring?: boolean; location?: { address?: string; city?: string; country?: string; lat?: number; lon?: number; postal_code?: string; region?: string; store_number?: string; }; merchantLogoUrl?: string; merchantName?: string; merchantPhoneNumber?: string; merchantWebsite?: string; paymentChannel?: string; personalFinanceCategory?: string; personalFinanceCategoryIconUrl?: string; personalFinanceSubCategory?: string; }; id: number; initiatedAt?: string; interestedPostedAsOn: boolean; interestPayableDerived?: number; isAlreadyChargeBack?: boolean; isReversal?: boolean; lienTransaction?: boolean; media?: Record<string, any>; originalTransactionId?: number; paymentDetailData?: { accountNumber?: string; bankNumber?: string; checkNumber?: string; id: number; paymentType?: { id: number; name: string; }; receiptNumber?: string; reference?: string; routingCode?: string; }; reasonForBlock?: string; refNo?: string; releaseTransactionId?: number; reversed: boolean; runningBalance: number; status?: string; submittedByUsername?: string; submittedOnDate: string | number[]; subTransactionType?: string; transactionReferenceId?: string; transactionType: { amountHold?: boolean; amountRelease?: boolean; approveTransfer?: boolean; chargeBack?: boolean; code: string; deposit?: boolean; dividendPayout?: boolean; escheat?: boolean; feeDeduction?: boolean; id: number; initiateTransfer?: boolean; interestpayableAccrued?: boolean; interestPosting?: boolean; isDebit?: boolean; isFeeReversal?: boolean; overdraftFee?: boolean; overdraftInterest?: boolean; overdraftInterestReceivableAccrued?: boolean; rejectTransfer?: boolean; value: string; withdrawal?: boolean; withdrawTransfer?: boolean; withholdTax?: boolean; writtenoff?: boolean; }; transfer?: { amount: number; correlationId: string; createdAt: string; createdBySystem: boolean; creditor: { accountType?: string; address?: string[]; agent?: { address?: string[]; country: string; identifier?: string; name?: string; }; city?: string; country: string; identifier: string; name: string; postalCode?: string; stateOrProvince?: string; }; creditorAccountNumber: string; debtor: { accountType?: string; address?: string[]; agent?: { address?: string[]; country: string; identifier?: string; name?: string; }; city?: string; country: string; identifier: string; name: string; postalCode?: string; stateOrProvince?: string; }; debtorAccountId: number; debtorAccountNumber: string; executedAt: string; externalId: string; id: number; paymentRailMetaData?: { beneficiary?: { personal?: { identificationCode: string; }; }; beneficiaryFI?: { financialInstitution?: { identificationCode?: ... | ...; }; }; beneficiaryIntermediaryFI?: { financialInstitution?: { identificationCode?: ... | ...; }; }; businessFunctionCode?: { businessFunctionCode: string; transactionTypeCode: string; }; fiPaymentMethodToBeneficiary?: Record<string, any>; originator?: { personal?: { identificationCode: string; }; }; receiverDepositoryInstitution?: { receiverABANumber: string; receiverShortName: string; }; typeSubType?: { subTypeCode: string; typeCode: string; }; }; paymentType: string; reference: string[]; statementDescription: string; status: string; stopFutureDebit: boolean; traceNumbers?: Record<string, any>; transactionId: string; type: string; valueDate: string; }; transferData?: { amount: number; clientId: number; correlationId: string; createdAt: string; creditor: { accountType: string; country: string; name: string; }; currency: string; currencyData: { code: string; decimalPlaces: number; displaySymbol: string; name: string; nameCode: string; }; debtor: { accountType: string; address?: string[]; city?: string; country: string; identifier?: string; name: string; postalCode?: string; stateOrProvince?: string; }; debtorAccountId: number; debtorAccountNumber: string; executedAt: string; externalId: string; id: number; inOrOut?: string; isManualAllocation?: boolean; paymentType: string; reference: string[]; statementDescription: string; status: string; stopFutureDebit: boolean; transactionId: string; type: string; valueDate: string; }; }>

Command object that executes the API request and returns transaction details

Examples

typescript
const command = GetTransactionById({
  savingsAccountId: 1,
  transactionId: 1
});
const transaction = await client.request(command);
console.log(transaction.amount); // 5000
typescript
// With associations
const command = GetTransactionById({
  savingsAccountId: 1,
  transactionId: 1,
  params: { associations: 'all' }
});
const transaction = await client.request(command);

Released under the MIT License.