Skip to content

Add Billing With Purchase analytics tags#1529

Merged
saperi22 merged 20 commits intobraintree:mainfrom
anibalb2500:add_billing_with_purchase_tag
Feb 20, 2026
Merged

Add Billing With Purchase analytics tags#1529
saperi22 merged 20 commits intobraintree:mainfrom
anibalb2500:add_billing_with_purchase_tag

Conversation

@anibalb2500
Copy link
Contributor

@anibalb2500 anibalb2500 commented Feb 9, 2026

Summary of changes

  • Adding is_billing_agreement, and billing_plan_type to AnalyticsParamRepository so that it is sent with analytic events.
    • This is for observability over the Billing With Purchase feature, so we can properly distinguish these flows.
  • Renamed existing isBillingAgreement to isVaultRequest in PayPalPaymentAuthRequestParams to be repurposed for these changes.

Checklist

  • Added a changelog entry
  • Relevant test coverage
  • Tested and confirmed payment flows affected by this change are functioning as expected

Screenshots

image

075999814R484453G - had shouldRequestBillingAgreement as false, and did not set recurringBillingPlanType.
93A012420S1215734 - had shouldRequestBillingAgreement as true, and set recurringBillingPlanType to RECURRING

Authors

@anibalb2500

@anibalb2500 anibalb2500 marked this pull request as ready for review February 9, 2026 20:43
@anibalb2500 anibalb2500 requested a review from a team as a code owner February 9, 2026 20:43
@saralvasquez
Copy link
Contributor

Could I get some context on why this is being added? Why is it needed?

@anibalb2500
Copy link
Contributor Author

Could I get some context on why this is being added? Why is it needed?

For the Billing With Purchase feature we need to tell analytics when the merchant requested a billing agreement (shouldRequestBillingAgreement == true) so our observability dashboards can separate those flows from regular checkout. Right now there isn’t a tag on analytics events that indicates whether the request was Billing With Purchase, so we can’t see that clearly on the merchant or PayPal app side. Adding billing_with_purchase to the analytics payload fixes that.

@anibalb2500 anibalb2500 marked this pull request as draft February 10, 2026 18:33
@anibalb2500 anibalb2500 changed the title Add billing_with_purchase analytics tag Add Billing With Purchase analytics tags Feb 10, 2026
@anibalb2500 anibalb2500 reopened this Feb 10, 2026
@anibalb2500 anibalb2500 marked this pull request as ready for review February 10, 2026 21:06
@anibalb2500 anibalb2500 marked this pull request as draft February 10, 2026 21:19
@anibalb2500 anibalb2500 requested a review from saperi22 February 10, 2026 23:38
@anibalb2500 anibalb2500 marked this pull request as ready for review February 10, 2026 23:39
Copy link
Contributor

@saralvasquez saralvasquez left a comment

Choose a reason for hiding this comment

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

🎉

@saralvasquez
Copy link
Contributor

Looks like the one instrumentation test that is failing is the local payments test relating to the issue we are tracking. We'll go ahead a merge this when that issue is resolved

Copy link
Contributor

@jaxdesmarais jaxdesmarais left a comment

Choose a reason for hiding this comment

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

I left some comments on the iOS PR - lets align on naming across both platforms

@anibalb2500
Copy link
Contributor Author

@jaxdesmarais I responded to your comments and updated PR description with latest evidence. Are we still waiting on failing instrumentation tests to be fixed?

private const val FPTI_KEY_FUNDING_SOURCE = "funding_source"

private const val FPTI_KEY_IS_BILLING_AGREEMENT = "is_billing_agreement"
private const val FPTI_KEY_BILLING_PLAN_TYPE = "billing_plan_type"
Copy link
Contributor

Choose a reason for hiding this comment

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

Small nit to add a space between FPTI_KEYs and FPTI_BATCH_KEYs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@saperi22 saperi22 merged commit 5e9be62 into braintree:main Feb 20, 2026
4 of 11 checks passed
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.

4 participants