feat(analytics): modified authentication queries and added generate report for authentications#7483
Merged
likhinbopanna merged 6 commits intomainfrom Mar 12, 2025
Merged
Conversation
…ation_type instead of transaction_status
added 2 commits
March 11, 2025 23:04
…rofile, org and merchant level
sai-harsha-vardhan
approved these changes
Mar 12, 2025
su-shivanshmathur
approved these changes
Mar 12, 2025
tsdk02
added a commit
that referenced
this pull request
Mar 12, 2025
…eport for authentications (#7483) Co-authored-by: Sandeep Kumar <sandeep.kumar@Sandeep-Kumar-LVF93XQXPC.local>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This PR modifies authentication queries to improve the way we distinguish between authentication flows. Previously,
trans_statuswas used for this purpose, but it has now been replaced withauthentication_type, which more explicitly differentiates between frictionless flow and challenge flow.Additionally, this PR introduces support for authentication report generation, similar to the existing reports for payments, refunds, and disputes.
Key Changes
1. Updated Authentication Queries
trans_statuswithauthentication_typein authentication queries.2. Added Authentication Report Generation
payments, 'refundsanddisputes`.Routes for the reporting service:
/analytics/v1/org/report/authentications/analytics/v1/merchant/report/authentications/analytics/v1/profile/report/authenticationsThis PR resolves the data correctness issue raised here: https://github.com/juspay/hyperswitch-cloud/issues/8727
Additional Changes
Motivation and Context
authentication_typeinstead oftrans_statusimproves accuracy in flow differentiation.How did you test it?
Can check the test cases from the
How did you test it?section from these 2 PRs:Note: The Response body should be validated from this PR for all the metrics: #7451
Curl for Authentication Report:
Queries:
Authentication Attempt Count:
Authentication Count:
Authentication Success Count:
Challenge Attempt Count:
Challenge Flow Count:
Challenge Success Count:
Frictionless Flow Count:
Frictionless Success Count:
Authentication Funnel: (2nd step):
Authentication Funnel: (3rd step):
Authentication Error Message:
Sample Output:
You should be able to receive an email with the authentication report to the email specified in the request.
Similarly, just replace
orgwithmerchantandprofilein the URL for the corresponding authentication report at the merchant and profile level.Checklist
cargo +nightly fmt --allcargo clippy