Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: CreateCreditAccountAutoPayInternal()

CreateCreditAccountAutoPayInternal(creditAccountId, data): Command<{ creditAccountId: number; data: { fromAccountId: number; fromAccountType: number; fromClientId: number; fromOfficeId: number; instructionType: InstructionType; locale: string; name: string; priority: Priority; status: Status; toAccountId: number; toAccountType: number; toClientId: number; toOfficeId: number; transferType: number; }; }, { clientId: number; id: number; resourceId: number; }>

Defined in: src/commands/rest/creditAccount.ts:457

Create an internal auto-pay instruction for a credit account

Sets up an automatic payment instruction that transfers funds from an internal account (within the same banking system) to pay off a credit account balance. The auto-pay can be configured to pay either the minimum due or the full statement balance.

Parameters

creditAccountId

number

The unique identifier of the credit account to receive auto-payments

data

fromAccountId

number = ...

fromAccountType

number = ...

fromClientId

number = ...

fromOfficeId

number = ...

instructionType

InstructionType = ...

locale

string = ...

name

string = ...

priority

Priority = ...

status

Status = ...

toAccountId

number = ...

toAccountType

number = ...

toClientId

number = ...

toOfficeId

number = ...

transferType

number = ...

Returns

Command<{ creditAccountId: number; data: { fromAccountId: number; fromAccountType: number; fromClientId: number; fromOfficeId: number; instructionType: InstructionType; locale: string; name: string; priority: Priority; status: Status; toAccountId: number; toAccountType: number; toClientId: number; toOfficeId: number; transferType: number; }; }, { clientId: number; id: number; resourceId: number; }>

Command object that executes the API request and returns auto-pay setup result

Example

typescript
const command = CreateCreditAccountAutoPayInternal(388, {
  name: 'Minimum Due Auto Pay',
  transferType: 5,
  priority: 2,
  status: 1,
  fromOfficeId: 1,
  fromClientId: 4132,
  fromAccountType: 2,
  fromAccountId: 125,
  toOfficeId: 1,
  toClientId: 4132,
  toAccountType: 3,
  toAccountId: 388,
  instructionType: 3,
  locale: 'en'
});
const result = await client.request(command);

Released under the MIT License.