Skip to content

[v5] UPI Smart Intent - UPI Apps detection#2483

Merged
nauaros merged 25 commits intofeature/COSDK-1089_UPI_Smart_Intentfrom
chore/upi_app_detection_logic
Apr 16, 2026
Merged

[v5] UPI Smart Intent - UPI Apps detection#2483
nauaros merged 25 commits intofeature/COSDK-1089_UPI_Smart_Intentfrom
chore/upi_app_detection_logic

Conversation

@nauaros
Copy link
Copy Markdown
Contributor

@nauaros nauaros commented Apr 3, 2026

Summary

Introduces UPI app detection logic to UPIComponent. The component now detects locally installed UPI apps and prioritizes them in the UI, falling back to all apps from the paymentMethods response if none are installed.

Behavior

  • Installed apps found: Display only the installed apps (filtered against backend response)
  • No installed apps: Display all apps from the paymentMethods response

Known Limitations

  • Backend response for UPI apps is hardcoded (new API response not ready yet).
    • Reason: We want the India team to start testing the app detection with the new apps.
    • It will be removed once the paymentMethods response changes are ready.
  • Some app logos are missing (not yet uploaded to CDN)

Other Changes

  • Updated Demo App Info.plist with supported UPI app URL schemes

Future work

Demo

Scenario 1: No UPI Apps detected on device

upi-smart-intent-no-apps.mov

Scenario 2: UPI Apps detected on device

upi-smart-intent-apps.mp4

Ticket

COSDK-1089

Checklist

  • Tested changes locally
  • Added/updated unit tests
  • Verified against acceptance criteria

@nauaros nauaros added the chore a pull request that has chore changes that shouldn't be in the release notes label Apr 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

ℹ️ No baseline data found for 'feature/COSDK-1089_UPI_Smart_Intent'.

Framework Size
AdyenComponents.framework 2761 KB
AdyenActions.framework 2939 KB
AdyenDropIn.framework 1281 KB
AdyenDelegatedAuthentication.framework 82 KB
AdyenAuthentication.framework 347 KB
AdyenWeChatPay.framework 257 KB
AdyenCardScanner.framework 710 KB
AdyenEncryption.framework 517 KB
AdyenSession.framework 855 KB
AdyenTwint.framework 271 KB
AdyenWeChatPayInternal.framework 4135 KB
AdyenCashAppPay.framework 1773 KB
AdyenCard.framework 1693 KB
TwintSDK.framework 97 KB
Adyen3DS2.framework 919 KB
Adyen.framework 7597 KB
total 26234 KB

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for detecting installed UPI apps on the device to improve the user experience in the UPI component. Key changes include the introduction of a URL scheme checking protocol, a new UPI app model, and updates to the UPI component to filter and display available apps based on their installation status. I have identified several areas for improvement: the breaking change to the public API in UPIPaymentMethod, the presence of commented-out code in CodingKeys, the need for proper localization of UI strings, a potential layout issue with FormSpacerItem, and an incorrect method call for dismissing the keyboard.

Comment thread AdyenComponents/UPI/UPIComponent.swift
Comment thread AdyenComponents/UPI/UPIComponent.swift
Comment thread AdyenComponents/UPI/UPIComponent.swift Outdated
@nauaros nauaros closed this Apr 3, 2026
@nauaros nauaros reopened this Apr 3, 2026
@Adyen Adyen deleted a comment from gemini-code-assist Bot Apr 3, 2026
@Adyen Adyen deleted a comment from gemini-code-assist Bot Apr 3, 2026
Comment thread AdyenComponents/UPI/UPIAppResponseMock.swift Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 7, 2026

⚠️ 6 public changes detected ⚠️

Comparing chore/upi_app_detection_logic to feature/COSDK-1089_UPI_Smart_Intent

❇️3 Additions
🔀2 Modifications
1 Removal

Adyen

Issuer

❇️ Added

public let appIdentifier: Adyen.Issuer.AppIdentifier? { get }
public struct AppIdentifier: Swift.Codable, Swift.Equatable {
  public enum CodingKeys: Swift.CodingKey, Swift.Equatable, Swift.Hashable, Swift.RawRepresentable, Swift.String {
    case scheme
    public init?(intValue: Swift.Int)
    public init?(rawValue: Swift.String)
    public init?(stringValue: Swift.String)
    public typealias RawValue = Swift.String
    public var intValue: Swift.Int? { get }
    public var rawValue: Swift.String { get }
    public var stringValue: Swift.String { get }
  }
  public func encode(to encoder: any Swift.Encoder) throws -> Swift.Void
  public init(from decoder: any Swift.Decoder) throws
  public let scheme: Swift.String { get }
  public static func ==(
    a: Adyen.Issuer.AppIdentifier,
    b: Adyen.Issuer.AppIdentifier
  ) -> Swift.Bool
}

AdyenComponents

❇️ Added

public enum UPIFlowType: Swift.Equatable, Swift.Hashable, Swift.Int, Swift.RawRepresentable {
  @available(*, deprecated, renamed: "upiCollect", message: "The `.qrCode` is deprecated and not available any more. Use, `.upiIntent` instead.")
  case qrCode
  @available(*, deprecated, renamed: "upiIntent", message: "Use `.upiIntent` instead.")
  case upiApps
  case upiCollect
  case upiIntent
  public init?(rawValue: Swift.Int)
  public typealias RawValue = Swift.Int
  public var rawValue: Swift.Int { get }
}

UPIComponent

🔀 Modified

// From
@Adyen.AdyenObservable
@_projectedValueProperty($selectedUPIFlow)
final public var selectedUPIFlow: AdyenComponents.UPIComponent.UPIFlowType { get }

// To
@Adyen.AdyenObservable
@_projectedValueProperty($selectedUPIFlow)
final public var selectedUPIFlow: AdyenComponents.UPIFlowType { get }

/**
Changes:
- Modified type from `AdyenComponents.UPIComponent.UPIFlowType` to `AdyenComponents.UPIFlowType`
*/
// From
final public var $selectedUPIFlow: Adyen.AdyenObservable<AdyenComponents.UPIComponent.UPIFlowType> { get }

// To
final public var $selectedUPIFlow: Adyen.AdyenObservable<AdyenComponents.UPIFlowType> { get }

/**
Changes:
- Modified type from `Adyen.AdyenObservable<AdyenComponents.UPIComponent.UPIFlowType>` to `Adyen.AdyenObservable<AdyenComponents.UPIFlowType>`
*/

❌ Removed

public enum UPIFlowType: Swift.Equatable, Swift.Hashable, Swift.Int, Swift.RawRepresentable

Analyzed targets: Adyen, AdyenActions, AdyenCard, AdyenCardScanner, AdyenCashAppPay, AdyenComponents, AdyenDelegatedAuthentication, AdyenDropIn, AdyenEncryption, AdyenSession, AdyenSwiftUI, AdyenTwint, AdyenWeChatPay

@nauaros nauaros self-assigned this Apr 7, 2026
@nauaros nauaros marked this pull request as ready for review April 7, 2026 11:50
Comment thread AdyenComponents/UPI/UPIComponent.swift
Comment thread Demo/Common/Networking/PaymentsRequest.swift
@nauaros nauaros merged commit 7988d2b into feature/COSDK-1089_UPI_Smart_Intent Apr 16, 2026
12 of 14 checks passed
@nauaros nauaros deleted the chore/upi_app_detection_logic branch April 16, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore a pull request that has chore changes that shouldn't be in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants