Skip to content

@mbanq/core-sdk-js v0.50.0


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

Function: AddCardToMobileWallet()

AddCardToMobileWallet(cardId, data): Command<{ cardId: number; data: { certificate1?: string; certificate2?: string; deviceID?: string; nonce?: string; nonceSignature?: string; walletAccountID?: string; walletProvider: "APPLE_PAY" | "GOOGLE_PAY"; }; }, { clientId?: number; data: { activationData: string; encryptedCardData: string; ephemeralPublicKey: string; }; id: number; resourceId: number; }>

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

Add card to mobile wallet

Provisions a card for use in mobile payment wallets such as Apple Pay or Google Pay. Supports both tokenized and non-tokenized card additions to mobile wallets.

Parameters

cardId

number

The unique identifier of the card to add to mobile wallet

data

certificate1?

string = ...

certificate2?

string = ...

deviceID?

string = ...

nonce?

string = ...

nonceSignature?

string = ...

walletAccountID?

string = ...

walletProvider

"APPLE_PAY" | "GOOGLE_PAY" = ...

Returns

Command<{ cardId: number; data: { certificate1?: string; certificate2?: string; deviceID?: string; nonce?: string; nonceSignature?: string; walletAccountID?: string; walletProvider: "APPLE_PAY" | "GOOGLE_PAY"; }; }, { clientId?: number; data: { activationData: string; encryptedCardData: string; ephemeralPublicKey: string; }; id: number; resourceId: number; }>

Command object that executes the API request and returns provisioning status

Example

typescript
// Apple Pay provisioning
const applePayCommand = AddCardToMobileWallet(67890, {
  walletProvider: 'APPLE_PAY',
  certificate1: 'cert1-data',
  certificate2: 'cert2-data',
  nonce: 'nonce-value'
});

// Google Pay provisioning
const googlePayCommand = AddCardToMobileWallet(67890, {
  walletProvider: 'GOOGLE_PAY',
  deviceID: 'device-123',
  walletAccountID: 'wallet-456'
});

const result = await client.request(applePayCommand);

Released under the MIT License.