Skip to content

[BDCC] Allow email / phone / name collection on Link native #10984

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

carlosmuvi-stripe
Copy link
Collaborator

@carlosmuvi-stripe carlosmuvi-stripe commented Jun 23, 2025

Summary

  • Adds support for contact information collection in CardDetailsEdit, that now accepts the full BDCC object
  • Pass down full BD to required calls:
    • name + email are passed when saving the PM details.
    • phoneNumber is used when calling share.
full_bdcc.mp4

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

val cardMap = params["card"] as? Map<*, *>?
val billingDetailsMap = params["billing_details"] as? Map<*, *>?
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Add new card: we extract the billing phone from the create params (that's how the UI component bundles it) and pass it to the confirmation flow so that it's passed down in the share endpoint.

@@ -117,6 +117,7 @@ internal class UpdateCardScreenViewModel @Inject constructor(
selectedPaymentDetails = updatedPaymentDetails,
linkAccount = account,
cvc = null, // CVC is already included in the updated payment details
billingPhoneNumber = cardParams.billingDetails?.phone,
Copy link
Collaborator Author

@carlosmuvi-stripe carlosmuvi-stripe Jun 23, 2025

Choose a reason for hiding this comment

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

Update card: we extract the billing phone from the update params (that's how the UI component bundles it) and pass it to the confirmation flow so that it's passed down in the share endpoint.

Copy link
Contributor

github-actions bot commented Jun 23, 2025

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │          compressed          │         uncompressed         
          ├───────────┬───────────┬──────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff │ old       │ new       │ diff 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
      dex │   2.1 MiB │   2.1 MiB │  0 B │   4.3 MiB │   4.3 MiB │  0 B 
     arsc │     1 MiB │     1 MiB │  0 B │     1 MiB │     1 MiB │  0 B 
 manifest │   2.3 KiB │   2.3 KiB │  0 B │     8 KiB │     8 KiB │  0 B 
      res │ 302.9 KiB │ 302.9 KiB │  0 B │   457 KiB │   457 KiB │  0 B 
   native │   6.2 MiB │   6.2 MiB │  0 B │  15.8 MiB │  15.8 MiB │  0 B 
    asset │   7.7 KiB │   7.7 KiB │  0 B │   7.4 KiB │   7.4 KiB │  0 B 
    other │  95.8 KiB │  95.8 KiB │ -2 B │ 183.5 KiB │ 183.5 KiB │  0 B 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
    total │   9.8 MiB │   9.8 MiB │ -2 B │  21.8 MiB │  21.8 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 20682 │ 20682 │ 0 (+0 -0) 
   types │  6503 │  6503 │ 0 (+0 -0) 
 classes │  5266 │  5266 │ 0 (+0 -0) 
 methods │ 31511 │ 31511 │ 0 (+0 -0) 
  fields │ 18239 │ 18239 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  164 │  164 │  0   
 entries │ 3646 │ 3646 │  0
APK
   compressed    │   uncompressed   │                        
──────────┬──────┼───────────┬──────┤                        
 size     │ diff │ size      │ diff │ path                   
──────────┼──────┼───────────┼──────┼────────────────────────
 29.2 KiB │ -4 B │  64.6 KiB │  0 B │ ∆ META-INF/CERT.SF     
 25.9 KiB │ +2 B │  64.5 KiB │  0 B │ ∆ META-INF/MANIFEST.MF 
──────────┼──────┼───────────┼──────┼────────────────────────
 55.1 KiB │ -2 B │ 129.1 KiB │  0 B │ (total)

@@ -262,6 +260,7 @@ internal class WalletViewModel @Inject constructor(
selectedPaymentDetails = selectedPaymentDetails,
linkAccount = linkAccount,
cvc = cvc,
billingPhoneNumber = linkAccount.unredactedPhoneNumber,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

On the wallet, our only phone source without re-collecting is the link account. If there's no link account phone, the confirm details screen would pop up before reaching this.

@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/bdcc-collect-email-name-phone branch from 7c7b2f1 to 5a5cee1 Compare June 24, 2025 08:16
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/bdcc branch 3 times, most recently from ff06269 to 5234ade Compare June 24, 2025 16:57
@carlosmuvi-stripe carlosmuvi-stripe changed the title [Link] Allow email / phone / name collection based on BDCC on Link native [BDCC] Allow email / phone / name collection on Link native Jun 25, 2025
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/bdcc-collect-email-name-phone branch 3 times, most recently from b8ce6b8 to c228e5f Compare June 26, 2025 10:14
@@ -118,7 +118,8 @@ internal class UpdateCardScreenViewModel @Inject constructor(
val confirmationResult = completeLinkFlow(
Copy link
Collaborator Author

@carlosmuvi-stripe carlosmuvi-stripe Jun 26, 2025

Choose a reason for hiding this comment

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

One limitation - if the user updates the billing phone here, since it does not get persisted in the consumer details object and it's used just when completing the flow, we might lose it.

PR follow-up will ensure we keep phone number changes from the update screen when returning to the wallet so that confirmation uses it.

@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review June 29, 2025 11:18
@carlosmuvi-stripe carlosmuvi-stripe requested review from a team as code owners June 29, 2025 11:18
@carlosmuvi-stripe carlosmuvi-stripe requested review from tianzhao-stripe, tillh-stripe and toluo-stripe and removed request for a team and tianzhao-stripe June 29, 2025 11:18
Comment on lines +185 to +187
billingDetailsCollectionConfiguration = BillingDetailsCollectionConfiguration(
address = addressCollectionMode
),
Copy link
Collaborator Author

@carlosmuvi-stripe carlosmuvi-stripe Jun 29, 2025

Choose a reason for hiding this comment

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

@toluo-stripe Updated the CardEdit Form to accept contact info (email, name, phone) if you can take a look!

Also could you confirm what BillingDetailsCollectionConfiguration we want to pass outside of Link? With the current config it won't show any of these fields for collection, but it could if we pass the entire BDCC as we do on Link.

Base automatically changed from carlosmuvi/bdcc to master June 30, 2025 14:05
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/bdcc-collect-email-name-phone branch from e19e296 to a491628 Compare June 30, 2025 14:32
@carlosmuvi-stripe carlosmuvi-stripe requested a review from a team as a code owner June 30, 2025 14:32
@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as draft June 30, 2025 14:41
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/bdcc-collect-email-name-phone branch from a491628 to e19e296 Compare June 30, 2025 14:43
- Add ContactInformationFormUI to CardDetailsEditUI to collect name, email, phone
- Update CardDetailsEntry to handle contact information in toUpdateParams
- Modify EditCardDetailsInteractor to support ContactInformationChanged action
- Update related tests to cover new contact information functionality
- Update LinkApiRepository to pass billing phone in share endpoint
- Modify LinkConfirmationHandler to handle billing phone parameter
- Update LinkAccountManager and related services to support phone collection
- Add support for billing details configuration in Link flows
- Update CompleteLinkFlow to collect and pass billing information
- Add comprehensive tests for billing details integration
@carlosmuvi-stripe carlosmuvi-stripe force-pushed the carlosmuvi/bdcc-collect-email-name-phone branch from e19e296 to 1d5d0c4 Compare June 30, 2025 14:47
@carlosmuvi-stripe carlosmuvi-stripe marked this pull request as ready for review June 30, 2025 14:47
Comment on lines +243 to +245
val billingPhone: Map<String, String> = paymentMethodCreateParams.billingDetails?.phone?.let {
mapOf("billing_phone" to it)
} ?: emptyMap()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the share endpoint was missing the billingPhone.

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.

1 participant