Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: CreateUnsecuredCreditAccount() ​

CreateUnsecuredCreditAccount(clientId, data): Command<{ clientId: number; data: { cashLimit: number; creditLimit: number; creditProductId: number; dateFormat: string; locale: string; submittedOnDate: string; }; }, { clientId: number; id: number; officeId: number; productId: number; resourceId: number; }>

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

Create a new unsecured credit account

Creates a new unsecured credit account for a client with specified credit product, limits, and submission details. This operation initializes a credit account that can be used for card transactions, cash advances, and other credit-related operations.

Parameters ​

clientId ​

number

The ID of the client who will own the credit account

data ​

cashLimit ​

number = ...

creditLimit ​

number = ...

creditProductId ​

number = ...

dateFormat ​

string = ...

locale ​

string = ...

submittedOnDate ​

string = ...

Returns ​

Command<{ clientId: number; data: { cashLimit: number; creditLimit: number; creditProductId: number; dateFormat: string; locale: string; submittedOnDate: string; }; }, { clientId: number; id: number; officeId: number; productId: number; resourceId: number; }>

Command object that executes the API request and returns the created credit account ID

Example ​

typescript
const command = CreateCreditAccount(12, {
  creditProductId: 1,
  creditLimit: 50000,
  cashLimit: 10000,
  submittedOnDate: '01 January 2024',
  locale: 'en',
  dateFormat: 'dd MMMM yyyy'
});
const result = await client.request(command);

Released under the MIT License.