feat(core): add support for upi_intent and upi_qr#9716
Merged
bernard-eugine merged 9 commits intomainfrom Oct 13, 2025
Merged
Conversation
196474c to
6eb7c8e
Compare
1f06dfe to
e9771f3
Compare
e941107 to
4d3469f
Compare
crates/hyperswitch_connectors/src/connectors/dummyconnector/transformers.rs
Show resolved
Hide resolved
crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs
Outdated
Show resolved
Hide resolved
| } | ||
| hyperswitch_domain_models::payment_method_data::UpiData::UpiQr(_) => { | ||
| let upi_details = payments_grpc::UpiIntent { app_name: None }; | ||
| PaymentMethod::UpiIntent(upi_details) |
Contributor
There was a problem hiding this comment.
It should be mapped to UpiQr right? UpiQr type is already there in PaymentMethod
File - target/debug/build/grpc-api-types-b30de937a51ad817/out/ucs.v2.rs
Suggested change
| PaymentMethod::UpiIntent(upi_details) | |
| PaymentMethod::UpiQr(upi_details) |
swangi-kumari
previously approved these changes
Oct 9, 2025
Aishwariyaa-Anand
previously approved these changes
Oct 9, 2025
d81d3b6
swangi-kumari
approved these changes
Oct 9, 2025
jarnura
approved these changes
Oct 9, 2025
ShankarSinghC
approved these changes
Oct 9, 2025
swangi-kumari
approved these changes
Oct 9, 2025
chaitak-gorai
pushed a commit
that referenced
this pull request
Oct 16, 2025
Co-authored-by: Kanika Chaudhary <kanika.c@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
drdholu
pushed a commit
to drdholu/hyperswitch
that referenced
this pull request
Oct 30, 2025
Co-authored-by: Kanika Chaudhary <kanika.c@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
aadityaguptaa
pushed a commit
that referenced
this pull request
Nov 10, 2025
Co-authored-by: Kanika Chaudhary <kanika.c@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
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
Add support for UPI Intent uri information in payment responses by introducing a new next action type that properly handles UPI intent URIs from the Unified Connector Service (UCS).
Add UpiQr payment method type with exhaustive pattern matching across all connectors.
Description
Additional Changes
Motivation and Context
How did you test it?
Enable UCS Config
Request
Enable UCS Config - Authorize
Request
Payments - create+confirm
Request
{ "amount_details": { "order_amount": 100, "currency": "INR" }, "merchant_connector_details": { "connector_name": "razorpay", "merchant_connector_creds": { "auth_type": "-", "api_key": "-", "key1": "-" } }, "capture_method": "automatic", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "upi": { "upi_intent": { //"vpa_id": "success@razorpay" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IN", "first_name": "Swangi", "last_name": "Kumari" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "merchant_reference_id": "{{$timestamp}}", "payment_method_subtype": "upi_intent", "payment_method_type": "upi", "return_raw_connector_response": true }Payment Response
Response
{ "id": "12345_pay_0199bf084f0679e3adfe80128df0e8a1", "status": "requires_customer_action", "amount": { "order_amount": 100, "currency": "INR", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 100, "amount_captured": 100 }, "customer_id": null, "connector": "razorpay", "created": "2025-10-07T14:16:56.841Z", "modified_at": "2025-10-07T14:17:00.767Z", "payment_method_data": { "billing": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "Swangi", "last_name": "Kumari", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "payment_method_type": "upi", "payment_method_subtype": "upi_intent", "connector_transaction_id": "pay_RQc3oRG2vz1RlV", "connector_reference_id": "order_RQc3oHOo2AieDT", "merchant_connector_id": null, "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": null, "next_action": { "type": "sdk_upi_intent_information", "sdk_uri": "upi://pay?pa=upi@razopay&pn=MWSolutions&tr=bLsnV4bsu3xDjOS&tn=razorpay&am=1&cu=INR&mc=5411" }, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds", "is_iframe_redirection_enabled": null, "merchant_reference_id": "1759846617", "raw_connector_response": "{\"razorpay_payment_id\":\"pay_RQc3oRG2vz1RlV\",\"link\":\"upi://pay?pa=upi@razopay&pn=MWSolutions&tr=bLsnV4bsu3xDjOS&tn=razorpay&am=1&cu=INR&mc=5411\"}", "feature_metadata": null, "metadata": null }Checklist
cargo +nightly fmt --allcargo clippy