Skip to content

Conversation

@dbracamonte
Copy link
Contributor

@dbracamonte dbracamonte commented Aug 29, 2025

This PR introduces new features to integrate the Google Pay yellow path flow, allowing users to resume adding cards to Google Wallet and managing existing tokens. This is essential to comply with Google Pay requirements.

Summary

  • Add resumeAddCardToGoogleWallet() method for resuming card provisioning using existing token reference ID
  • Add listTokens() method to retrieve all tokens stored in Google Wallet
  • Add new TypeScript types: AndroidResumeCardData and TokenInfo
  • Update README.md with comprehensive documentation for the new methods

Changes Made

Android Native (Kotlin)

  • WalletModule.kt: Added resumeAddCardToGoogleWallet and listTokens methods with proper error handling
  • NativeWalletSpec.java: Added method signatures for the new functionality

TypeScript/React Native

  • NativeWallet.ts: Added new types and method signatures to the TurboModule spec
  • index.tsx: Implemented JavaScript wrapper functions with proper platform checks and error handling

Documentation

  • README.md: Updated API reference table, data types section, and function count

Features

resumeAddCardToGoogleWallet(cardData: AndroidResumeCardData)

  • Resumes card provisioning flow using an existing tokenReferenceId
  • Simplified data structure compared to full card provisioning
  • Supports optional cardholder name and last digits for display purposes
  • Returns TokenizationStatus to track the operation result

listTokens()

  • Retrieves all tokens currently stored in Google Wallet
  • Returns array of TokenInfo objects containing:
    • tokenReferenceId: Unique token identifier
    • fpanLastFour: Last four digits of the tokenized card
    • tokenState: Current state of the token (numeric value)
  • Handles empty results gracefully

@github-actions
Copy link

github-actions bot commented Aug 29, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@dbracamonte
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

CLABotify added a commit to Expensify/CLA that referenced this pull request Aug 29, 2025
@dbracamonte dbracamonte changed the title feat: add Google Wallet token management methods feat: add Google Pay yellow path Aug 29, 2025
@Skalakid Skalakid requested review from Skalakid and zfurtak September 1, 2025 06:25
Copy link
Collaborator

@Skalakid Skalakid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, it looks good. I've left some comments. Additionally, could you please add a video to the PR description that demonstrates how your solution works in our example app?

@dbracamonte
Copy link
Contributor Author

Overall, it looks good. I've left some comments. Additionally, could you please add a video to the PR description that demonstrates how your solution works in our example app?

Thanks for the review!

Regarding the demo video, I need to clarify the testing constraints:

To demonstrate the Google Pay tokenization flow, I would need:

  • Production certificates from Google Pay (which I don't currently have access to)
  • Google-authorized test cards for the sandbox environment

The testing I performed was done using my work environment, but I cannot share that footage publicly as it contains
proprietary information from an unreleased application.

@dbracamonte
Copy link
Contributor Author

Greetings @Skalakid, I'm looking forward to continuing the approval process. If there's any way I can proceed, please let me know.

@Skalakid
Copy link
Collaborator

Skalakid commented Sep 5, 2025

Hello, had to finish some other tasks. We need to check if it actually works before merging. Since you've tested it in your unreleased app and can't attach a video here, I think we can try testing it in the Expensify app. I will try to add this flow there and will come back to you with more information

Copy link
Collaborator

@Skalakid Skalakid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dbracamonte Finally got some time to test this PR. Everything works fine. Left some last comments, and I think we can merge it ;)

yellow-path.mp4

@dbracamonte
Copy link
Contributor Author

Greetings @Skalakid, I look forward to your comments so we can continue with the integration.

zfurtak
zfurtak previously approved these changes Sep 22, 2025
Copy link
Collaborator

@zfurtak zfurtak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since @Skalakid is ooo right now, I'll take over this one. Code looks fine, all the comments have been addressed, so I think we can merge it 😊

@zfurtak
Copy link
Collaborator

zfurtak commented Sep 22, 2025

Apparently, due to requested changes I can't merge it without Michał's approval, so we have to wait until next Monday

@dbracamonte
Copy link
Contributor Author

Hello @zfurtak thanks for your feedback. I'm waiting on @Skalakid approval to proceed with the merge.

@ShpetimA
Copy link

ShpetimA commented Oct 1, 2025

@zfurtak @Skalakid Any info on when this pr will be merged or should i fork for the meantime for yellow path ?

Skalakid
Skalakid previously approved these changes Oct 3, 2025
Copy link
Collaborator

@Skalakid Skalakid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I've been OOO and couldn't approve this PR. LGTM, thank you!

@Skalakid
Copy link
Collaborator

Skalakid commented Oct 3, 2025

Hmm I still can't merge it :/ @dbracamonte can you sign your commit please? This should help

os-botify bot and others added 6 commits October 3, 2025 14:17
- add resumeAddCardToGoogleWallet() method for resuming card provisioning using existing token reference ID
- add listTokens() method to retrieve all tokens stored in Google Wallet
- add AndroidResumeCardData and TokenInfo types for new functionality
- update README.md with documentation for new methods

These methods provide better token lifecycle management and support for existing card tokens in Google Wallet integration.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dbracamonte dbracamonte force-pushed the feature/google-pay-yellow-path branch from 4a8c972 to ec9a64b Compare October 3, 2025 17:20
@dbracamonte dbracamonte dismissed stale reviews from Skalakid and zfurtak via af359f4 October 3, 2025 17:51
@dbracamonte
Copy link
Contributor Author

Done @Skalakid, I've already verified the commits.

@Skalakid Skalakid merged commit dd85fd6 into Expensify:main Oct 6, 2025
3 checks passed
@Skalakid
Copy link
Collaborator

Skalakid commented Oct 6, 2025

@dbracamonte Once again, thank you for the PR!

@os-botify
Copy link
Contributor

os-botify bot commented Oct 6, 2025

🚀 Published to npm in 0.1.13 🎉

@wcastand
Copy link

wcastand commented Oct 7, 2025

@dbracamonte @Skalakid
sorry for the question but i thought the yellow path was to verify a card added by the wallet app but from my tests, if i start adding the card from the wallet, i get to the verify identity and i use the resume add card which i expected it to validate the identity and finish adding the card like the normal green flow.

but i still get stuck on verify identity, not sure if it's me doing something wrong or the expected behavior :/

@Skalakid
Copy link
Collaborator

Skalakid commented Oct 8, 2025

@wcastand the new resume function won't get you through the identity verification. It's something that should be configured with your card issuer, and you, as a user, should do it. It's a part of native in-app provisioning flow, and the library doesn't do anything with it. You can verify your card by calling the bank, for example

@wcastand
Copy link

wcastand commented Oct 8, 2025

yeah we disabled SMS code because of fraud and calling us doesn't help (we have no way to verify the card) so i need to check with issuer how to config the app verification then thanks 🙏 just wanted to confirm before i keep asking them until they actually help x)

Thanks again for the help and the lib. guessing the same applies to apple pay then, the requireActivation on apple side of things doesn't require a resume?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants