@mbanq/core-sdk-js / commands / PayAccountCharge
Function: PayAccountCharge()
PayAccountCharge(
params,data):Command<{data: {amount:number;dateFormat?:string;dueDate?:string;locale:string; };params: {accountId:number;chargeId:number; }; }, {clientId:number;id:number;officeId:number;resourceId:number;savingsId:number; }>
Defined in: src/commands/rest/charge.ts:345
Pay a charge on a savings account
This endpoint allows you to pay a charge that has been added to a specified account. It is used to settle outstanding charges, such as fees, penalties.
Parameters
params
The path parameters
accountId
number = ...
The account unique identifier that you want to make the charge payment
chargeId
number = ...
The Id of the charge that you are making the payment
data
The charge payment parameters
amount
number = ...
The payment amount
dateFormat?
string = ...
The date format (optional)
dueDate?
string = ...
The due date (optional)
locale
string = ...
The locale
Returns
Command<{ data: { amount: number; dateFormat?: string; dueDate?: string; locale: string; }; params: { accountId: number; chargeId: number; }; }, { clientId: number; id: number; officeId: number; resourceId: number; savingsId: number; }>
Command object for paying a charge
Example
import { PayAccountCharge } from '@mbanq/core-sdk';
const command = PayAccountCharge(
{ accountId: 123, chargeId: 1004 },
{
amount: 100,
dueDate: '20-09-2023',
dateFormat: 'dd MMMM yyyy',
locale: 'en'
}
);
const result = await client.request(command);