Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: CreatePrepaidCard()

CreatePrepaidCard(primaryAccountId, params): Command<{ params: { cardProductId: number; prepaidLimitAmount: number; }; primaryAccountId: number; }, { data: { cardId: number; prepaidAccountId: number; }; id: string; resourceId: number; }>

Defined in: src/commands/rest/prepaidCard.ts:34

Create Prepaid Card

Creates a prepaid card for a specific savings account. This API enables the creation of a prepaid card, allowing users to generate either a virtual or physical card for a variety of transactions. The API supports specifying card product types and setting prepaid limits.

Note: Mbanq will have configured card products and they can use the cardProductId to create a prepaid card.

Parameters

primaryAccountId

number

The associated primary account id

params

Card creation parameters including card product ID and prepaid limit amount

cardProductId

number = ...

prepaidLimitAmount

number = ...

Returns

Command<{ params: { cardProductId: number; prepaidLimitAmount: number; }; primaryAccountId: number; }, { data: { cardId: number; prepaidAccountId: number; }; id: string; resourceId: number; }>

Command object that executes the API request and returns created prepaid card details

Example

typescript
const command = CreatePrepaidCard(234, {
  cardProductId: 22,
  prepaidLimitAmount: 10000
});
const result = await client.request(command);
console.log(result.data.cardId); // 1
console.log(result.data.prepaidAccountId); // 3

Released under the MIT License.