Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: GetChargesByAccountId()

GetChargesByAccountId(accountIdForAccountCharges): Command<{ accountIdForAccountCharges: number; }, { accountNo: string; allowOverdraft: boolean; allowPrepaidCard: boolean; bankDetails?: { address: string; city: string; name: string; postcode: string; routingNumber: string; swiftCode: string; }; cardRestricted: boolean; charges: object[]; clientId: number; clientName: string; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; isBaseCurrency?: boolean; name: string; nameCode: string; }; depositType: { code: string; id: number; value: string; }; enforceMinRequiredBalance: boolean; fieldOfficerId: number; fieldOfficerName?: string; firstDepositDate?: number[]; floatingRateId: number; id: number; interestCalculationDaysInYearType: { code: string; id: number; value: string; }; interestCalculationType: { code: string; id: number; value: string; }; interestCompoundingPeriodType: { code: string; id: number; value: string; }; interestPostingPeriodType: { code: string; id: number; value: string; }; interestRateDifferential: number; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isFloatingInterestRateCalculationAllowed: boolean; isLinkedToFloatingInterestRates: boolean; lastActiveTransactionDate: number[]; minBalanceForInterestCalculation: number; minOverdraftForInterestCalculation: number; minRequiredBalance: number; nominalAnnualInterestRate: number; onHoldFunds: number; overdraftInterestRateDifferential: number; overdraftLimit: number; overdraftMinimumDue: number; parentAccount?: { allowOverdraft: boolean; allowPrepaidCard: boolean; cardRestricted: boolean; enforceMinRequiredBalance: boolean; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isLinkedToFloatingInterestRates: boolean; prepaidAccount: boolean; skipCollectTransferCharge: boolean; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }; prepaidAccount: boolean; prepaidLimitAmount: number; remainingExemptions?: object[]; savingsAmountOnHold: number; savingsProductId: number; savingsProductName: string; skipCollectTransferCharge: boolean; status: { active: boolean; approved: boolean; closed: boolean; code: string; id: number; matured: boolean; prematureClosed: boolean; rejected: boolean; submittedAndPendingApproval: boolean; transferInProgress: boolean; transferOnHold: boolean; value: string; withdrawnByApplicant: boolean; }; subStatus: { block: boolean; blockCredit: boolean; blockDebit: boolean; code: string; dormant: boolean; escheat: boolean; id: number; inactive: boolean; none: boolean; value: string; }; summary: { accountBalance: number; availableBalance: number; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; isBaseCurrency?: boolean; name: string; nameCode: string; }; interestNotPosted: number; lastInterestCalculationDate?: number[]; totalAnnualFees?: number; totalDeposits: number; totalFeeCharge?: number; totalInterestEarned: number; totalInterestPosted: number; totalOverdraftInterestDerived: number; totalPenaltyCharge?: number; totalWithdrawalFees?: number; totalWithdrawals?: number; totalWithholdTax?: number; }; timeline: { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; approvedByFirstname?: string; approvedByLastname?: string; approvedByUsername?: string; approvedOnDate?: number[]; closedByFirstname?: string; closedByLastname?: string; closedByUsername?: string; closedOnDate?: number[]; submittedByFirstname: string; submittedByLastname: string; submittedByUsername: string; submittedOnDate: number[]; }; withdrawalFee?: { accountId: number; amount: number; amountOrPercentage: number; amountOutstanding: number; amountPaid: number; amountPercentageAppliedTo: number; amountWaived: number; amountWrittenOff: number; chargeCalculationType: { code: string; id: number; value: string; }; chargeDueDateOnAccountActivation?: boolean; chargeId: number; chargeTimeType: { code: string; id: number; value: string; }; collectOnlyTotalDeferCharge: boolean; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; isBaseCurrency?: boolean; name: string; nameCode: string; }; dueDate: number[] | null; id: number; isActive: boolean; isCardCharge?: boolean; maxCap: number; minCap: number; name: string; numberOfExemptedFee: number; penalty: boolean; percentage: number; reverseOnTransferFail: boolean; totalDeferredChargeAmount: number; }; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }>

Defined in: src/commands/rest/charge.ts:80

Get charges for a savings account

This endpoint retrieves all charges associated with a specific savings account. The response includes the full account details along with an array of all charges.

Parameters

accountIdForAccountCharges

number

The ID of the savings account

Returns

Command<{ accountIdForAccountCharges: number; }, { accountNo: string; allowOverdraft: boolean; allowPrepaidCard: boolean; bankDetails?: { address: string; city: string; name: string; postcode: string; routingNumber: string; swiftCode: string; }; cardRestricted: boolean; charges: object[]; clientId: number; clientName: string; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; isBaseCurrency?: boolean; name: string; nameCode: string; }; depositType: { code: string; id: number; value: string; }; enforceMinRequiredBalance: boolean; fieldOfficerId: number; fieldOfficerName?: string; firstDepositDate?: number[]; floatingRateId: number; id: number; interestCalculationDaysInYearType: { code: string; id: number; value: string; }; interestCalculationType: { code: string; id: number; value: string; }; interestCompoundingPeriodType: { code: string; id: number; value: string; }; interestPostingPeriodType: { code: string; id: number; value: string; }; interestRateDifferential: number; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isFloatingInterestRateCalculationAllowed: boolean; isLinkedToFloatingInterestRates: boolean; lastActiveTransactionDate: number[]; minBalanceForInterestCalculation: number; minOverdraftForInterestCalculation: number; minRequiredBalance: number; nominalAnnualInterestRate: number; onHoldFunds: number; overdraftInterestRateDifferential: number; overdraftLimit: number; overdraftMinimumDue: number; parentAccount?: { allowOverdraft: boolean; allowPrepaidCard: boolean; cardRestricted: boolean; enforceMinRequiredBalance: boolean; isBaseLendingRate: boolean; isDormancyTrackingActive: boolean; isLinkedToFloatingInterestRates: boolean; prepaidAccount: boolean; skipCollectTransferCharge: boolean; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }; prepaidAccount: boolean; prepaidLimitAmount: number; remainingExemptions?: object[]; savingsAmountOnHold: number; savingsProductId: number; savingsProductName: string; skipCollectTransferCharge: boolean; status: { active: boolean; approved: boolean; closed: boolean; code: string; id: number; matured: boolean; prematureClosed: boolean; rejected: boolean; submittedAndPendingApproval: boolean; transferInProgress: boolean; transferOnHold: boolean; value: string; withdrawnByApplicant: boolean; }; subStatus: { block: boolean; blockCredit: boolean; blockDebit: boolean; code: string; dormant: boolean; escheat: boolean; id: number; inactive: boolean; none: boolean; value: string; }; summary: { accountBalance: number; availableBalance: number; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; isBaseCurrency?: boolean; name: string; nameCode: string; }; interestNotPosted: number; lastInterestCalculationDate?: number[]; totalAnnualFees?: number; totalDeposits: number; totalFeeCharge?: number; totalInterestEarned: number; totalInterestPosted: number; totalOverdraftInterestDerived: number; totalPenaltyCharge?: number; totalWithdrawalFees?: number; totalWithdrawals?: number; totalWithholdTax?: number; }; timeline: { activatedByFirstname?: string; activatedByLastname?: string; activatedByUsername?: string; activatedOnDate?: number[]; approvedByFirstname?: string; approvedByLastname?: string; approvedByUsername?: string; approvedOnDate?: number[]; closedByFirstname?: string; closedByLastname?: string; closedByUsername?: string; closedOnDate?: number[]; submittedByFirstname: string; submittedByLastname: string; submittedByUsername: string; submittedOnDate: number[]; }; withdrawalFee?: { accountId: number; amount: number; amountOrPercentage: number; amountOutstanding: number; amountPaid: number; amountPercentageAppliedTo: number; amountWaived: number; amountWrittenOff: number; chargeCalculationType: { code: string; id: number; value: string; }; chargeDueDateOnAccountActivation?: boolean; chargeId: number; chargeTimeType: { code: string; id: number; value: string; }; collectOnlyTotalDeferCharge: boolean; currency: { code: string; currencyCodeInDigit?: number; decimalPlaces: number; displayLabel: string; displaySymbol: string; isBaseCurrency?: boolean; name: string; nameCode: string; }; dueDate: number[] | null; id: number; isActive: boolean; isCardCharge?: boolean; maxCap: number; minCap: number; name: string; numberOfExemptedFee: number; penalty: boolean; percentage: number; reverseOnTransferFail: boolean; totalDeferredChargeAmount: number; }; withdrawalFeeForTransfers: boolean; withHoldTax: boolean; }>

Command object for getting charges by account ID

Example

typescript
import { GetChargesByAccountId } from '@mbanq/core-sdk';

const command = GetChargesByAccountId(10422);
const result = await client.request(command);

console.log(result.charges); // Array of charge objects
console.log(result.charges[0].name); // 'JM_Withdrawal'
console.log(result.charges[0].amount); // 2

Released under the MIT License.