This plugin allows you to add passes and credit cards to Apple Wallet
npm install https://github.com/thib-lambert/TLAppleWalletCapacitorPlugin
npx cap sync
initialize()
getActionsAvailableForCardSuffix(...)
openCard(...)
startAddPaymentPass(...)
completeAddPaymentPass(...)
- Interfaces
Interface representing the Apple Wallet plugin.
initialize() => Promise<void>
Initializes the plugin.
getActionsAvailableForCardSuffix(options: { cardSuffix: string; }) => Promise<{ actions: number[]; }>
Gets the available actions for a given card suffix.
Param | Type | Description |
---|---|---|
options |
{ cardSuffix: string; } |
- The options to get available actions. |
Returns: Promise<{ actions: number[]; }>
openCard(options: { cardSuffix: string; }) => Promise<void>
Opens the card with the specified suffix.
Param | Type | Description |
---|---|---|
options |
{ cardSuffix: string; } |
- The options to open the card. |
startAddPaymentPass(options: ProvisioningDataRequest) => Promise<ProvisioningDataResponse>
Starts the process of adding a payment pass.
Param | Type | Description |
---|---|---|
options |
ProvisioningDataRequest |
- The provisioning data required to add a card. |
Returns: Promise<ProvisioningDataResponse>
completeAddPaymentPass(options: ProvisioningFinalDataRequest) => Promise<void>
Completes the process of adding a payment pass.
Param | Type | Description |
---|---|---|
options |
ProvisioningFinalDataRequest |
- The final provisioning data required to complete the process. |
Interface representing the provisioning data response.
Prop | Type | Description |
---|---|---|
nonce |
string |
Nonce used to secure communications. |
nonceSignature |
string |
Signature of the nonce for verification. |
certificates |
string[] |
List of certificates used for authentication. |
Interface representing the provisioning data request.
Prop | Type | Description |
---|---|---|
cardholderName |
string |
Name of the cardholder. |
localizedDescription |
string |
Localized description of the card. |
paymentNetwork |
string |
Payment network (Visa, MasterCard, etc.). |
primaryAccountSuffix |
string |
Suffix of the primary account (optional). |
Interface representing the final provisioning data request.
Prop | Type | Description |
---|---|---|
encryptedPassData |
string |
Encrypted card data. |
ephemeralPublicKey |
string |
Ephemeral public key for encryption. |
activationData |
string |
Activation data for the card. |