Some issuers may need the active wallet ID before creating an opaque payment card for push provisioning. If the wallet ID does not need to be included in the opaque payment card, simply let the tokenize and pushTokenize manage wallet creation automatically.
Note: This operation requires the user interaction, consider using ActivityManager.runUserInteraction to ensure that consequent UI-related operations are suspended until this one is completed.
Get the stable hardware ID of the device.
Each physical Android device has a stable hardware ID which is consistent between wallets for a given device. This ID will change as a result of a factory reset.
The stable hardware ID may only be used for the following purposes:
The stable hardware ID received through the client API must not be used for the following purposes:
The stable hardware ID may not be accessed by the issuer outside the Push Provisioning flow.
Returns the token status for a token in the active wallet, or null
if there's no active wallet or no such token.
The Push Provisioning API caches status values retrieved from the networks and makes a best effort to keep these
cached values up-to-date. However, in some cases the values returned here may be different from the network values.
For example, if a user has cleared data so that the token is no longer on the device, then null
is returned.
Searches the wallet for a token and returns true
if found, or false
otherwise.
true
if it finds a token with same last four FPAN digits as the identifier, as well as matches on the
other fields. False positives may be returned since the last four FPAN digits are not necessarily unique among
tokens.
Get all tokens available in the wallet. An empty list if there's no active wallet.
The API only returns token details for tokens with metadata matching your app package name. You can check if your tokens have this linking by tapping on the card in the Google Wallet app to see the card details view.
Starts the push tokenization flow in which the issuer provides most or all card details needed for Google Pay to get a valid token. Tokens added using this method are added to the active wallet.
Note: This operation requires the user interaction, consider using ActivityManager.runUserInteraction to ensure that consequent UI-related operations are suspended until this one is completed.
The token ID, or null
if tokenization wasn't completed.
Brings up a dialog asking the user to confirm the deletion of the indicated token.
Deleting the token does not affect the card-on-file on the user's Google account if one exists. To delete a card-on-file, the user would need to go to the Google Payments Center or use the Google Wallet app.
Note: This operation requires the user interaction, consider using ActivityManager.runUserInteraction to ensure that consequent UI-related operations are suspended until this one is completed.
Brings up a dialog asking the user to confirm the intention to set the identified card as their selected (default) card.
Note: This operation requires the user interaction, consider using ActivityManager.runUserInteraction to ensure that consequent UI-related operations are suspended until this one is completed.
The Push Provisioning API will immediately call a listener whenever the following events occur:
Registering for these broadcasts allows an app to re-query information about their digitized cards whenever the user makes a change.
Starts the manual tokenization flow in which the user needs to scan the card or enter all card details manually in a form. Tokens added using this method are added to the active wallet.
Important: This method is primarily used for activating tokens pending yellow path activation. It can also be used as a fallback in error handling (e.g. if the app cannot retrieve an OPC because your server is down). However, it should not be used as a substitute for a proper push provisioning integration.
Note: This operation requires the user interaction, consider using ActivityManager.runUserInteraction to ensure that consequent UI-related operations are suspended until this one is completed.
The token ID, or null
if tokenization wasn't completed.
Open Google Pay app and reveal the card.
Note: This operation requires the user interaction, consider using ActivityManager.runUserInteraction to ensure that consequent UI-related operations are suspended until this one is completed.
true
if Google Pay app was opened, or false
otherwise.
Error codes of the
ApiException
: