@mbanq/core-sdk-js / commands / ReplaceCard
Function: ReplaceCard()
ReplaceCard(
cardId,reason):Command<{cardId:number;reason:"LOST"|"STOLEN"|"DAMAGED"|"CARD_NOT_RECEIVED"|"CAPTURED_BY_ATM"|"CREDENTIAL_STUFFING"; }, {cardToken:string;clientId:number;id:number;resourceId:number; }>
Defined in: src/commands/rest/card.ts:1229
Replace a card
Requests a replacement for an existing card due to loss, theft, damage, or non-receipt. This action terminates the current card and issues a new card with a new number and details. The replacement card will inherit the same configuration and features as the original card.
Parameters
cardId
number
The unique identifier of the card to replace
reason
"LOST" | "STOLEN" | "DAMAGED" | "CARD_NOT_RECEIVED" | "CAPTURED_BY_ATM" | "CREDENTIAL_STUFFING"
The reason for replacement (LOST, STOLEN, DAMAGED, or CARD_NOT_RECEIVED)
Returns
Command<{ cardId: number; reason: "LOST" | "STOLEN" | "DAMAGED" | "CARD_NOT_RECEIVED" | "CAPTURED_BY_ATM" | "CREDENTIAL_STUFFING"; }, { cardToken: string; clientId: number; id: number; resourceId: number; }>
Command object that executes the API request and returns replacement card details
Example
// Replace a lost card
const command = ReplaceCard(67890, 'LOST');
const result = await client.request(command);