Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: RenewCard()

RenewCard(cardId, data): Command<{ cardId: number; data: { productId: number; }; }, { cardToken: string; clientId: number; id: number; resourceId: number; }>

Defined in: src/commands/rest/card.ts:1301

Renew a card

Renews an expiring card by issuing a new card with the same product type. This is typically used when a card is approaching its expiration date and needs to be renewed with a new expiration date. The new card will maintain the same product configuration and features as the original card.

Parameters

cardId

number

The unique identifier of the card to renew

data

The renewal request data

productId

number = ...

The product ID for the renewed card (can be the same or different from original)

Returns

Command<{ cardId: number; data: { productId: number; }; }, { cardToken: string; clientId: number; id: number; resourceId: number; }>

Command object that executes the API request and returns renewed card details

Example

typescript
// Renew a card with the same product
const command = RenewCard(67890, { productId: 12345 });
const result = await client.request(command);

Released under the MIT License.