Transaction code does not change.
Native modules apply to iOS and Android only. On Web there is nothing to install. The SDK loads the scripts of the antifraud providers enabled for your account at runtime and collects the fingerprints during the transaction. To collect them before the transaction, call
sdkPayments.antifraud().Installing a module does not make the SDK use it. A module runs only when the provider is enabled for your Yuno account and the backend requests it for the current transaction.
How it works
- You add the module to your app next to the SDK, as a package product, a pod or a Gradle dependency.
- When the app starts, the module registers itself with the SDK. On iOS with CocoaPods you call its
register()once; everywhere else there is no code to write. - During a transaction, the SDK asks Yuno which providers apply and uses the matching module: it collects a device fingerprint and attaches it to the payment, runs the 3DS challenge natively instead of in a WebView, or opens the Revolut Pay checkout.
Available modules
Minimum platform: iOS 14.0 (15.0 for Revolut Pay), Android 6.0 (API 23). Every module requires the same SDK version you install from Get Started.
Install
- iOS
- Android
Swift Package Manager. Every module lives in the same package as the SDK, so there is one URL to add. In Xcode go to File > Add Package Dependencies…, add Then run
https://github.com/yuno-payments/yuno-sdk-ios, pin the same version as the SDK, and in the product list tick SdkPayments plus the modules you need: SdkAntifraudClearsale, SdkAntifraudMagnes, SdkAntifraudKoin, SdkPaymentsNetcetera. Revolut Pay is not on Swift Package Manager: Revolut ships its SDK as a CocoaPods pod only.CocoaPods. Add the pods you need next to SdkPayments. Each module pod depends on the SDK, so the versions stay compatible:pod install.Activate
- iOS
- Android
Modules installed through Swift Package Manager are dynamic frameworks and register themselves when the app launches. Nothing to add beyond the product in your target.CocoaPods ships each module as a static framework, which cannot register itself. Call the module’s Register only the modules you installed; the example registers all five for reference.
register() once, before the first transaction, for example in application(_:didFinishLaunchingWithOptions:):What each module needs from your app
Antifraud modules
- The fingerprint travels as the payment’s
customer.device_fingerprint. Nothing changes in the data you send. - Collection runs when the shopper confirms the payment, and the shopper waits for it. On iOS the SDK waits up to 6 seconds for the fingerprint and sends the payment without it when it does not arrive. On Android collection is bounded by the
timeoutconfigured for the provider in your Yuno account (5 seconds by default). Keep it short. - None of them requests location. On Android, do not add
play-services-locationversion 21 or higher next to the ClearSale module: those versions are incompatible with the bundled ClearSale SDK.
Netcetera 3DS
- Runs the 3D Secure challenge inside your app, for payments and enrollment, instead of the WebView challenge. If you customize the SDK styles, they propagate to the challenge screen.
- The challenge is still presented full-screen by the SDK: it does not come through
showView. - Sandbox only: the Netcetera SDK needs a Visa test root certificate (
acq-root-certeq-prev-environment.crt) in your app bundle. Ask your Yuno TAM for it, it is not distributed publicly. On iOS, add it to your app target and check it appears under Build Phases > Copy Bundle Resources. Production builds do not use it.
Revolut Pay
- iOS only, through CocoaPods, on iOS 15.0 or higher. The pod brings
RevolutPayments/RevolutPayandlottie-ioswith it. If your Podfile already pins either, align the versions with the module. - Start the payment as usual, with
paymentMethodType: "REVOLUT_PAY". The SDK creates the payment, then opens the Revolut Pay flow directly: no form, no action view.showViewis not called for it;showLoadingis. - Revolut returns to your app through a deeplink. Declare the return URL in your
Info.plistunder the keyYunoRevolutPayReturnURL, as a full URL such asmyapp://revolut-pay. Without the key, the SDK uses the first URL scheme ofCFBundleURLTypeswith the hostrevolut-pay. Forward incoming URLs toSdkPayments.handleDeeplink, as described in Handle deeplinks. The SDK passes the URL to Revolut only while a Revolut Pay payment is in flight. - To let Revolut detect its app for the app-to-app flow, add
revoluttoLSApplicationQueriesSchemesin yourInfo.plist. - Every Revolut callback is confirmed against the payment status before
onStatusruns. A payment still pending after that check is reported asPENDING. An abandoned flow is reported asUSER_CANCEL. A Revolut-side failure, a device below iOS 15 or a missing module is reported asINTERNAL_ERRORwithmessage.codeREVOLUT_PAY_FAILED.
Troubleshooting
The module is installed but nothing changes
The module is installed but nothing changes
Check, in this order: the provider is enabled for your Yuno account (ask your TAM); the module registered at startup (iOS with CocoaPods:
register() runs before the first transaction; Android: the module’s line shows in Logcat); and, on Android, that your app is not removing the App Startup provider from the manifest.pod install: required a higher minimum deployment target
pod install: required a higher minimum deployment target
The
platform line in your Podfile is below the module’s minimum. Use platform :ios, '14.0', or '15.0' if you add SdkPaymentsRevolutPay.Revolut Pay never completes after coming back to the app
Revolut Pay never completes after coming back to the app
The return deeplink is not reaching the SDK. Check that your app declares a URL scheme, that incoming URLs reach
SdkPayments.handleDeeplink, and that no guard on the scheme drops the Revolut Pay return URL.pod install: could not find compatible versions for pod SdkPayments
pod install: could not find compatible versions for pod SdkPayments
A module pod depends on the same SDK line you install. If your Podfile pins an older
SdkPayments, align it with the version from Get Started.Swift Package Manager: no such module when importing an antifraud product
Swift Package Manager: no such module when importing an antifraud product
Modules register themselves, so you do not need to import them from Swift. Remove the import line and the project builds.
Android: NoClassDefFoundError mentioning LocationServices on every collection
Android: NoClassDefFoundError mentioning LocationServices on every collection
Expected with the ClearSale module: the location library is absent on purpose. The error is caught inside the SDK and the collection still completes.
Related
- Get Started. Install and initialize the SDK.
- Handle deeplinks. Return to your app after an external step.
- Netcetera 3DS on Android. Maven repository and permissions.