You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ♻️ Universal solution (Apple Wallet and Google Wallet)
6
6
- 💳 Easy and secure addition of payment cards from your app directly
7
7
@@ -111,8 +111,8 @@ Here you can find data elements used in the library, essential to work with Goog
111
111
112
112
### Android
113
113
-**Opaque Payment Card** (OPC) - a binary blob of information Google Pay receives from the issuer app that could be presented to TSP to receive a token.
114
-
-**Token Service Provider** (TSP) - a service that enhances payment security by replacing a credit card number during transactions with a unique digital identifier - token. The TSP specifies the tokenization service used to create a given token e.g. Visa, MasterCard, American Express.
115
-
-**Token Reference ID** - a unique identifying number to refer to a DPAN (Dynamic Personal Account Number). Token Providers will assign each DPAN an issuer token ID at the time of tokenization.
114
+
-**Token Service Provider** (TSP) - a service that enhances payment security by replacing a credit card number during transactions with a unique digital identifier - token. The TSP specifies the tokenization service used to create a given token e.g. Visa, MasterCard, American Express.
115
+
-**Token Reference ID** - a unique identifying number to refer to a DPAN (Dynamic Personal Account Number). Token Providers will assign each DPAN an issuer token ID at the time of tokenization.
116
116
117
117
### iOS
118
118
-**Nonce** - a one-time nonce value generated by Apple’s servers. This nonce must be included in the add payment request’s encrypted data.
@@ -126,27 +126,27 @@ The library offers five functions for seamless integration and use of the Apple
126
126
127
127
## Functions
128
128
129
-
| Function | Description | Parameters | Returns / Type | iOS |Andorid|
129
+
| Function | Description | Parameters | Returns / Type | iOS |Android|
|**getSecureWalletInfo**| Returns necessary platform-specific wallet information for secure transactions. | None |`WalletData`| ✅ | ❌ |
132
132
|**checkWalletAvailability**| Checks if the wallet is ready and initializes it if possible. | None |`boolean`| ✅ | ✅ |
133
133
|**getCardStatusBySuffix**| Retrieves the current status of a card in the wallet. |`lastDigits: string`<br>(The last few digits of the card number) |`CardStatus`| ✅ | ✅ |
134
-
|**getCardStatusByIdentifier**| Returns the state of a card based on a platform-specific identifier. On Android, it's `Token Reference ID` and on iOS, it's `Primary Account Identifier`. |`identifier: string`<br>`tsp: string`|`CardStatus`| ✅ | ✅ |
135
-
|**addCardToGoogleWallet**| Initiates native Push Provisioning flow for adding a card to the Google Wallet. |`data`: `AndroidCardData`|`TokenizationStatus`| ❌ | ✅ |
136
-
|**addCardToAppleWallet**| Initiates native Push Provisioning flow for adding a card to the Apple Wallet. |`data`: `IOSCardData`<br>`issuerEncryptPayloadCallback: IOSIssuerCallback`|`void`| ✅ | ❌ |
134
+
|**getCardStatusByIdentifier**| Returns the state of a card based on a platform-specific identifier. On Android, it's `Token Reference ID` and on iOS, it's `Primary Account Identifier`. |`identifier: string`,<br>`tsp: string`|`CardStatus`| ✅ | ✅ |
135
+
|**addCardToGoogleWallet**| Initiates native Push Provisioning flow for adding a card to the Google Wallet. |`data`: `AndroidCardData`|`TokenizationStatus`| ❌ | ✅ |
136
+
|**addCardToAppleWallet**| Initiates native Push Provisioning flow for adding a card to the Apple Wallet. |`data`: `IOSCardData`,<br>`issuerEncrypt-`<br>`PayloadCallback: IOSIssuerCallback`|`void`| ✅ | ❌ |
137
137
138
138
139
139
## Data Types
140
140
141
141
| Type | Description | Fields |
142
142
|------|-------------|--------|
143
-
|**AndroidWalletData**| Specific information for Android devices required for wallet transactions. |`deviceID: string`<br>`walletAccountID: string`|
144
-
|**AndroidCardData**| Data related to a card that is to be added on Android platform wallets. |`network: string`<br>`opaquePaymentCard: string`<br>`cardHolderName: string`<br>`lastDigits: string`<br>`userAddress: UserAddress`|
145
-
|**UserAddress**| Structured address used for cardholder verification. |`name: string`<br>`addressOne: string`<br>`addressTwo: string`<br>`city: string`<br>`administrativeArea: string`<br>`countryCode: string`<br>`postalCode: string`<br>`phoneNumber: string`|
146
-
|**IOSCardData**| Data related to a card that is to be added on iOS platform. |`network: string`<br>`activationData: string`<br>`encryptedPassData: string`<br>`ephemeralPublicKey: string`<br>`cardHolderTitle: string`<br>`cardHolderName: string`<br>`lastDigits: string`<br>`cardDescription: string`<br>`cardDescriptionComment: string`|
147
-
|**onCardActivatedPayload**| Data used by listener to notice when a card’s status changes. |`tokenId: string`<br> `actionStatus: 'activated' \| 'canceled'`<br> |
148
-
|**IOSIssuerCallback**| This callback is invoked with a nonce, its signature, and a certificate array obtained from Apple. It is expected that you will forward these details to your server or the card issuer's API to securely encrypt the payload required for adding cards to the Apple Wallet. |`(nonce: string, nonceSignature: string, certificate: string[]) => IOSEncryptPayload`|
149
-
|**IOSEncryptPayload**| An object containing the necessary elements to complete the addition of a card to Apple Wallet. |`encryptedPassData: string`<br>`activationData: string`<br>`ephemeralPublicKey: string`|
143
+
|**AndroidWalletData**| Specific information for Android devices required for wallet transactions. |`deviceID: string`,<br>`walletAccountID: string`|
144
+
|**AndroidCardData**| Data related to a card that is to be added on Android platform wallets. |`network: string`,<br>`opaquePaymentCard: string`,<br>`cardHolderName: string`,<br>`lastDigits: string`,<br>`userAddress: UserAddress`|
145
+
|**UserAddress**| Structured address used for cardholder verification. |`name: string`,<br>`addressOne: string`,<br>`addressTwo: string`,<br>`city: string`,<br>`administrativeArea: string`,<br>`countryCode: string`,<br>`postalCode: string`,<br>`phoneNumber: string`|
146
+
|**IOSCardData**| Data related to a card that is to be added on iOS platform. |`network: string`,<br>`activationData: string`,<br>`encryptedPassData: string`,<br>`ephemeralPublicKey: string`,<br>`cardHolderTitle: string`,<br>`cardHolderName: string`,<br>`lastDigits: string`,<br>`cardDescription: string`,<br>`cardDescriptionComment: string`|
147
+
|**onCardActivatedPayload**| Data used by listener to notice when a card’s status changes. |`tokenId: string`,<br> `actionStatus: 'activated' \| 'canceled'`<br> |
148
+
|**IOSIssuerCallback**| This callback is invoked with a nonce, its signature, and a certificate array obtained from Apple. It is expected that you will forward these details to your server or the card issuer's API to securely encrypt the payload required for adding cards to the Apple Wallet. |`(nonce: string, nonceSignature: string, certificate: string[]) => IOSEncryptPayload`|
149
+
|**IOSEncryptPayload**| An object containing the necessary elements to complete the addition of a card to Apple Wallet. |`encryptedPassData: string`,<br>`activationData: string`,<br>`ephemeralPublicKey: string`|
150
150
151
151
## Card Status
152
152
@@ -158,17 +158,19 @@ The library offers five functions for seamless integration and use of the Apple
158
158
159
159
| Listener | Event Description | Register Function | Unregister Function |
|**_cardActivation_**| Notifies when a card's status changes to activated. |`addListener(event: string, callback: (data: onCardActivatedPayload) => void): EmitterSubscription`|`removeListener(subscription: EmitterSubscription): void`|
161
+
|**_cardActivation_**| Notifies when a card's status changes to activated. |`addListener(event: string, callback: (data: onCardActivatedPayload) => void): EmitterSubscription`|`removeListener(subscription: EmitterSubscription): void`|
162
162
163
163
## Components
164
164
165
165
### `AddToWalletButton`
166
166
167
167
A ready-to-use component that simplifies the addition of payment cards to Google Wallet and Apple Wallet. The button automatically adapts its appearance according to the platform and language specified.
168
+
It uses official assets provided by [Google](https://developers.google.com/wallet/generic/resources/brand-guidelines) and [Apple](https://developer.apple.com/wallet/add-to-apple-wallet-guidelines/) in their Wallet-related branding guidelines.
168
169
169
-
> [!NOTE]
170
-
> Please bear in mind the brand rules provided by [Google](https://developers.google.com/wallet/generic/resources/brand-guidelines) and [Apple](https://developer.apple.com/wallet/add-to-apple-wallet-guidelines/) when adding this component to your application.
170
+
> [!IMPORTANT]
171
+
> Please bear in mind the brand rules provided by [Google](https://developers.google.com/wallet/generic/resources/brand-guidelines) and [Apple](https://developer.apple.com/wallet/add-to-apple-wallet-guidelines/) when adding this component to your application.
171
172
173
+
Adhering to these guidelines is crucial not only to comply with legal requirements but also to reassure users of the authenticity and security of your application.
172
174
173
175
| Property | Type | Required | Description |
174
176
|----------|------|----------|-------------|
@@ -188,6 +190,9 @@ A ready-to-use component that simplifies the addition of payment cards to Google
@@ -227,27 +232,27 @@ Additionally, when submitting your app to the App Store, you must include:
227
232
- A demo account for testing.
228
233
- A demo video showcasing the In-App Provisioning experience.
229
234
235
+
# Compatibility
236
+
237
+
`@expensify/react-native-wallet` supports the three latest minor releases of react-native (0.76.0+)
238
+
230
239
231
240
# Contributing
232
241
233
-
Right now, contributions to this library are done under [https://github.com/Expensify/App](https://github.com/Expensify/App). Please refer to that repo and all it's guidelines for contributing.
242
+
Contributions to this library are done under [https://github.com/Expensify/App](https://github.com/Expensify/App). Please refer to that repo and all its guidelines for contributing.
234
243
235
244
## License
236
245
237
246
MIT
238
247
239
248
----------
240
249
241
-
<palign="center">
242
-
243
-
<picture>
250
+
This library is co-developed by [**Software Mansion**](https://swmansion.com/), React Native core contributors and experts in buildind high-performing mobile solutions, in collaboration with [**Expensify**](https://www.expensify.com/), a leader in streamlining business expenses, travel, and invoice management for clearer financial oversight.
0 commit comments