# Connect Transfer Mobile SDKs
source: https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md

We provide the following SDKs to help you add Deposit Switch and Bill Pay Switch functionality to your mobile applications:

* **Connect Transfer iOS SDK**
  * [GitHub](https://github.com/Mastercard/connect-transfer-ios-sdk)
  * [Installation and use](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#ios-installation-and-use) (on this page)
* **Connect Transfer Android SDK**
  * [GitHub](https://github.com/Mastercard/connect-transfer-android-sdk)
  * [Installation and use](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#android-installation-and-use) (on this page)
* **Connect Transfer React Native SDK** (Deposit Switch only)
  * [GitHub](https://github.com/Mastercard/connect-transfer-react-native-sdk)
  * [Installation and use](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#react-native-installation-and-use) (on this page)

Warning: These SDKs are to help with the Connect Transfer functionality (for Deposit Switch and Bill Pay Switch) only. They do not support the regular Mastercard Data Connect flow, which requires the standard Data Connect SDK for [iOS](https://developer.mastercard.com/open-finance-us/documentation/connect/integrating/sdk/ios/ios-sdk/index.md), [Android](https://developer.mastercard.com/open-finance-us/documentation/connect/integrating/sdk/android/android-sdk/index.md) or [React Native](https://developer.mastercard.com/open-finance-us/documentation/connect/integrating/sdk/react-native-sdk/index.md).

The Connect Transfer SDKs require you to provide a generated Connect Transfer URL. These SDKs provide a new class which you will need to use, and generate events for which you need to provide listeners/delegate functions.

## iOS Installation and Use {#ios-installation-and-use}

Note: You will need to use the following:

* Xcode 16 or later
* iOS 15.6 or later
* Swift 5
* MacOS 14.5 or later

Install the Connect Transfer iOS SDK in one of the following ways:

* Xcode Package Manager

  In Xcode, go to **Project Settings \> Project \> Package Dependencies** and click the **+** to add a new package.

  Enter the Package URL: `https://github.com/Mastercard/connect-transfer-ios-sdk`
* CocoaPods

  Include the following in your Podfile:

  ```html
  use_frameworks!
  pod 'MastercardOpenBankingConnectTransfer'
  ```

* Manual Install

  Download the [Connect Transfer iOS SDK](https://github.com/Mastercard/connect-transfer-ios-sdk) from GitHub. Open your project in Xcode and drag the `ConnectTransfer.xcframework` folder into your project. In the build settings for the target folder, select the **General** tab. Scroll down to the **Frameworks, Libraries, and Embedded Content** section, and select `ConnectTransfer.xcframework`. Under the Embed column, select **Embed \& Sign** from the menu drop-down list if it is not already selected.

<br />

### Integrating Using UIKit {#integrating-using-uikit}

Add `import ConnectTransfer` to all your source files that make calls to the Connect Transfer iOS SDK:

```swift
import UIKit
import ConnectTransfer
```

You will then need to do the following:

* Generate a valid Connect Transfer URL.

* Create an instance of the `ConnectTransferViewController` class and assign `ConnectTransferEventDelegate` to `ConnectTransferViewController`. Use the Connect Transfer URL in the load function.

* Create callback/delegate functions for the `onInitializeConnectTransfer`, `onTermsAndConditionsAccepted`, `onLaunchTransferSwitch`, `onTransferEnd`, and `onUserEvent` events. These callback functions will have a `NSDictionary?` parameter that contains data about the event.

* In the `onLoad` callback delegate method, present the `ConnectTransferViewController` using a `UINavigationController` with the `ConnectTransferViewcontroller` as its `rootViewController`.

Tip: The `ConnectTransferViewController` automatically dismisses when the Connect Transfer flow is completed, cancelled early by the user, or when an error occurs.

The following is an example of the delegate functions and their usage:
* Swift

```swift
class ViewController: UIViewController {

  @IBOutlet weak var activityIndicator: UIActivityIndicatorView!
    var transferViewController: ConnectTransferViewController!
    var connectNavController: UINavigationController!

  func launchConnectTransferAction(_ sender: Any) {
    if let connectTransferUrl = pdsURLInput.text {
      self.transferViewController = ConnectTransferViewController(
        connectTransferURLString: connectTransferUrl)
      self.transferViewController.delegate = self
      self.connectNavController = UINavigationController(rootViewController: self.transferViewController)
      if(UIDevice.current.userInterfaceIdiom == .phone){
        self.connectNavController.modalPresentationStyle = .fullScreen
      } else {
        self.connectNavController.modalPresentationStyle = .automatic
      }
      self.present(self.connectNavController, animated: true)
    }
  }

}

extension ViewController: ConnectTransferEventDelegate {
  func onInitializeConnectTransfer(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onTermsAndConditionsAccepted(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onLaunchTransferSwitch(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onTransferEnd(_ data: NSDictionary?) {
    print(data as Any)
    self.transferViewController = nil
    self.connectNavController = nil
  }
  func onUserEvent(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onErrorEvent(_ data: NSDictionary?) {
    print(data as Any)
  }
}
```

### Integrating Using SwiftUI {#integrating-using-swiftui}

Add preview page link on main page mentioned in this confluence - Task status update / SDK Event names and parameter names finalizations with Audit service integrations

1. Add `import ConnectTransfer` to all your source files that make calls to the Data Connect iOS SDK:

```swift
import SwiftUI
import ConnectTransfer
```

2. Generate a valid Connect Transfer URL.

3. Create an instance of the `ConnectTransferView` with the Connect Transfer URL and assign `ConnectTransferViewEventDelegate` as `self` to get the events.

4. Create callback/delegate functions for the `onInitializeConnectTransfer`, `onTermsAndConditionsAccepted`, `onLaunchTransferSwitch`, `onTransferEnd`, and `onUserEvent` events. These callback functions will have an `NSDictionary?` parameter that contains data about the event.

The following is an example of the delegate functions and their usage.
* Swift

```swift
struct ContentView: View {
  @State var connectTransferUrl: String = ""
  @State var presentConnectTransfer: Bool = false

  var body: some View {
    VStack {
      //....
      Your View
      ....//
    }
    .fullScreenCover(isPresented: $presentConnectTransfer) {
      ConnectTransferView(connectTransferUrl: connectTransferUrl, delegate: self)
    }
  }
}

extension ContentView: ConnectTransferViewEventDelegate {
  func onInitializeConnectTransfer(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onLaunchTransferSwitch(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onErrorEvent(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onTermsAndConditionsAccepted(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onTransferEnd(_ data: NSDictionary?) {
    print(data as Any)
  }
  func onUserEvent(_ data: NSDictionary?) {
    print(data as Any)
  }
}
```

## Android Installation and Use {#android-installation-and-use}

Note: You will need to use the following:

* Android 7.0 (Nougat) or later
* Android SDK level 24 or later

Install the Data Connect Android SDK using Maven Central

Modify your root-level Gradle file (`build.gradle`) as follows:

```groovy
allprojects {
   repositories { {
       google()
       mavenCentral()
    }
}
```

Modify your app-level Gradle file (`build.gradle`) as follows:

```groovy
android {
 defaultConfig {
   minSdkVersion 24 // or greater
 }
}

dependencies {
 // ...
 implementation 'com.mastercard.openbanking.connect:connect-transfer-sdk:<latest version>'
}
```

The latest version of the Connect Transfer Android SDK can be found in [Maven Central](https://central.sonatype.com/artifact/com.mastercard.openbanking.connect/connect-transfer-sdk).

The Connect Transfer Android SDK requires internet access to connect to Mastercard's servers, so you need to add internet permissions to the `AndroidManifest.xml` file:

```xml
<uses-permission android:name="android.permission.INTERNET">
```

The Connect Transfer Android SDK's main component is the `ConnectTransfer` class. This class contains a static `start` method, which runs an activity that connects with the `ConnectTransferEventListener`.

To access the APIs in the SDK include the following imports:

```java
import com.mastercard.openbanking.connect.transfer.ui.activity.ConnectTransfer;
import com.mastercard.openbanking.connect.transfer.events.ConnectTransferEventListener;
```

The `ConnectTransfer.start()` method launches the activity, requiring:

* A valid `Context`.
* The Connect Transfer URL.
* An instance of `ConnectTransferEventListener` to handle SDK events.

* Java
* Kotlin

```java
ConnectTransfer.start(context, url, new ConnectTransferEventListener() {
    @Override
    public void onInitializeConnectTransfer(JSONObject data) {
      Log.d("ConnectTransfer", "onInitializeConnectTransfer: " + data.toString());
    }

    @Override
    public void onTermsAndConditionsAccepted(JSONObject data) {
      Log.d("ConnectTransfer", "onTermsAndConditionsAccepted: " + data.toString());
    }

    @Override
    public void onLaunchTransferSwitch(JSONObject data) {
      Log.d("ConnectTransfer", "onLaunchTransferSwitch: " + data.toString());
    }

    @Override
    public void onTransferEnd(JSONObject data) {
      Log.d("ConnectTransfer", "onTransferEnd: " + data.toString());
    }

    @Override
    public void onUserEvent(JSONObject data) {
      Log.d("ConnectTransfer", "onUserEvent: " + data.toString());
    }

    @Override
    public void onErrorEvent(JSONObject data) {
      Log.d("ConnectTransfer", "onErrorEvent: " + data.toString());
    }
});
```

```kotlin
ConnectTransfer.start(context, url, object : ConnectTransferEventListener {
    override fun onInitializeConnectTransfer(data: JSONObject) {
      Log.d("ConnectTransfer", "onInitializeConnectTransfer: ${data.toString()}")
    }

    override fun onTermsAndConditionsAccepted(data: JSONObject) {
      Log.d("ConnectTransfer", "onTermsAndConditionsAccepted: ${data.toString()}")
    }

    override fun onLaunchTransferSwitch(data: JSONObject) {
      Log.d("ConnectTransfer", "onLaunchTransferSwitch: ${data.toString()}")
    }

    override fun onTransferEnd(data: JSONObject) {
      Log.d("ConnectTransfer", "onTransferEnd: ${data.toString()}")
    }

    override fun onUserEvent(data: JSONObject) {
      Log.d("ConnectTransfer", "onUserEvent: ${data.toString()}")
    }

    override fun onErrorEvent(data: JSONObject) {
      Log.d("ConnectTransfer", "onErrorEvent: ${data.toString()}")
    }
})
```

Throughout Connect Transfer's flow, events about the state of the application are sent as `JSONObjects` to the `ConnectTransferEventListener` methods.

The `onInitializeConnectTransfer`, `onTermsAndConditionsAccepted`, `onLaunchTransferSwitch`, `onTransferEnd`, and `onUserEvent` callback functions will have a `JSONObject` parameter that contains data about the event.

### Parameters {#parameters}

|      Parameter       |             Type             |                                                                                     Description                                                                                     |
|----------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`            | Context                      | The context from which the function is called, typically an Activity or Fragment context.                                                                                           |
| `connectTransferUrl` | String                       | The Connect Transfer URL required to initiate the Connect Transfer flow.                                                                                                            |
| `listener`           | ConnectTransferEventListener | An instance of `ConnectTransferEventListener` to receive callbacks for various events, such as when the transfer is initialized, terms are accepted, and the transfer is completed. |

* Java
* Kotlin

```java
public static void start(Context context, String connectTransferUrl, ConnectTransferEventListener listener)
```

```kotlin
fun start(context: Context,connectTransferUrl: String, listener: ConnectTransferEventListener)
```

## React Native Installation and Use {#react-native-installation-and-use}

Note: You will need to use the following:

* Android:

  * Android 6.0 (Marshmallow) or later
  * Android SDK level 23 or later
* iOS 14 or later

Warning: The Connect Transfer React Native SDK currently supports Deposit Switch but not Bill Pay Switch.

### Dependencies {#dependencies}

The Connect Transfer React Native SDK has the
following `peerDependencies`:

* [react](https://www.npmjs.com/package/react) \>= 18.0.0
* [react-native](https://www.npmjs.com/package/react-native) \>= 0.71.0
* [@atomicfi/transact-react-native](https://www.npmjs.com/package/@atomicfi/transact-react-native) = 3.11.1
* [react-native-gesture-handler](https://www.npmjs.com/package/react-native-gesture-handler) = 2.25.0
* [react-native-inappbrowser-reborn](https://www.npmjs.com/package/react-native-inappbrowser-reborn) = 3.7.0
* [react-native-reanimated](https://www.npmjs.com/package/react-native-reanimated) = 3.17.4

If your application does not include the packages mentioned above as dependencies, you can install them from:

* [@atomicfi/transact-react-native](https://github.com/atomicfi/atomic-transact-react-native)
* [react-native-gesture-handler](https://github.com/software-mansion/react-native-gesture-handler)
* [react-native-inappbrowser-reborn](https://github.com/proyecto26/react-native-inappbrowser)
* [react-native-reanimated](https://github.com/software-mansion/react-native-reanimated)

The Connect Transfer React Native SDK has been tested with:

* `@atomicfi/transact-react-native` version 3.11.1
* `react-native-gesture-handler` version 2.25.0
* `react-native-inappbrowser-reborn` version 3.7.0
* `react-native-reanimated` version 3.17.4

### Install Connect Transfer React Native SDK {#install-connect-transfer-react-native-sdk}

The easiest way to install the SDK is to use npm or yarn:

* `npm install connect-transfer-react-native-sdk`
* `yarn add connect-transfer-react-native-sdk`

On iOS, CocoaPods needs this additional step:

`$ cd ios && pod install && cd ..`
Note: The Connect Transfer React Native SDK only supports React Native versions above 0.64. Linking the package manually is not required as it uses [autolinking](https://github.com/react-native-community/cli/blob/master/docs/autolinking.md).

### Update Android Application Settings {#update-android-application-settings}

The Connect Transfer React Native SDK requires internet access to
connect to Mastercard's servers, so you need to add internet permissions to
the `AndroidManifest.xml`file:

```xml
<uses-permission android:name="android.permission.INTERNET">
```

### Usage {#usage}

#### Parameters {#parameters-1}

|             Parameter             |                                                                                     Description                                                                                     |
|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `connectTransferUrl` *(required)* | The Connect Transfer URL required to initiate the Connect Transfer flow.                                                                                                            |
| `eventHandlers` *(required)*      | `ConnectTransferEventListener` interface to receive callbacks for various events, such as when the transfer is initialized, terms are accepted, and the transfer flow is completed. |

```tsx
import {
  ConnectTransfer,
  ConnectTransferEventHandler
} from 'connect-transfer-react-native-sdk';

const TestComponent = () => {
  const eventHandlers: ConnectEventHandlers = {
    onInitializeConnectTransfer: (event: any) => {},
    onTermsAndConditionsAccepted: (event: any) => {},
    onLaunchTransferSwitch: (event: any) => {},
    onUserEvent: (event: any) => {},
    onTransferEnd: (event: any) => {},
    onErrorEvent: (event: any) => {},
  };

  return (
    <ConnectTransfer
      connectTransferUrl={'#GENERATED_CONNECT_TRANSFER_URL#'}
      eventHandlers={eventHandlers}
    />
  );
};
```

Connect Transfer SDK Events

The event listeners you implement when using the Connect Transfer SDKs are listed here.

|             Event              |                                                                                    Description                                                                                    |
|--------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `onInitializeConnectTransfer`  | Sent when the Connect Transfer SDK is initialized.                                                                                                                                |
| `onTermsAndConditionsAccepted` | Sent when the user accepts the T\&Cs.                                                                                                                                             |
| `onLaunchTransferSwitch`       | Sent when the user begins the Connect Transfer flow.                                                                                                                              |
| `onUserEvent`                  | Sent when a user performs various actions during the Data onnect Transfer flow. User events provide insight into which screen or action in the flow the user is interacting with. |
| `onTransferEnd`                | Sent when the Connect Transfer flow ends.                                                                                                                                         |
| `onErrorEvent`                 | Sent if an error or exception occurs in the SDK.                                                                                                                                  |

### Initialise Connect Transfer {#initialise-connect-transfer}

The event message received by `onInitializeConnectTransfer()` will be in the following form in the case of Deposit Switch:

    {
      action = InitializeTransfer;
      customerId = CUSTOMER_ID;
      partnerId = PARTNER_ID;
      sessionId = SESSION_ID;
      timestamp = 1737092848275;
      ttl = 1737179248275;
      type = transferDepositSwitch;
    }

In the case of Bill Pay Switch the event message will be as follows:

    {
        action = InitializeTransfer;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1742453181603;
        ttl = 1742539581603;
        type = transferBillPaySwitch;
    }

### Terms and Conditions Accepted {#terms-and-conditions-accepted}

The event message received by `onTermsAndConditionsAccepted()` will be in the following form in the case of Deposit Switch:

    {
        action = TermsAccepted;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

In the case of Bill Pay Switch the event message will be as follows:

    {    
        action = TermsAccepted;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1742453810773;
        ttl = 1742540210773;
        type = transferBillPaySwitch;
    }

### Initialize Deposit Switch {#initialize-deposit-switch}

The event message received by `onLaunchTransferSwitch()` will be in the following form in the case of Deposit Switch:

    {
        action = InitializeDepositSwitch;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        product = deposit;
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

### Initialize Bill Pay Switch {#initialize-bill-pay-switch}

The event message received by `onLaunchTransferSwitch()` will be in the following form in the case of Bill Pay Switch:

    {
        action = InitializeBillPaySwitch;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        product = switch;
        sessionId = SESSION_ID;
        timestamp = 1742453181603;
        ttl = 1742539581603;
        type = transferBillPaySwitch;
    }

### End Connect Transfer {#end-connect-transfer}

The event message received by `onTransferEnd()` will be in the following form in the case of Deposit Switch:

    {
        action = End;
        code = 200;
        company =     {
            "_id" = COMPANY_ID;
            branding =         {
                color = "#F96302";
                logo =             {
                    url = "https://cdn-public.atomicfi.com/b2ad42c5-1348-4bfd-a19d-250583791e8c.png";
                };
            };
            name = "The Home Depot";
        };
        customerId = CUSTOMER_ID;
        distributionAmount = 222;
        distributionType = fixed;
        identifier = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        reason = complete;
        sessionId = SESSION_ID;
        taskId = 6789ef56fe459a9cc2fafc43;
        taskWorkflowId = 6789ef56fe459a9cc2fafc4a;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

In the case of Bill Pay Switch the event message will be as follows:

    {
        action = End;
        code = 200;
        company =     {
            "_id" = COMPANY_ID;
            branding =         {
                color = "#AF6408";
                logo =             {
                    backgroundColor = "#FF9900";
                    url = "https://cdn-public.atomicfi.com/8d97b6ca-595b-447c-8b86-8d690501c794_amazon.png";
                };
            };
            name = Amazon;
        };
        customerId = CUSTOMER_ID;
        distributionType = total;
        identifier = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        reason = complete;
        sessionId = SESSION_ID;
        taskId = 67dd1d819a29dd20f7fade82;
        taskWorkflowId = 67dd1d819a29dd20f7fade87;
        timestamp = 1742544226280;
        ttl = 1742630626280;
        type = transferBillPaySwitch;
    }

### ErrorEvent {#errorevent}

This event message is sent to `onErrorEvent()` if an error or exception occurs in the SDK:

    {
       action = Error;
       reason = error;
       code = 400;
    }

### Connect Transfer User Events {#connect-transfer-user-events}

The following user event messages can be received by your implementation of the `onUserEvent()` listener / callback.

**Deposit Switch**

* [SearchPayrollProvider](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#search-payroll-provider)
* [SelectPayrollProvider](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#select-payroll-provider)
* [ExternalLink](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#external-login-recovery)
* [SubmitCredentials](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#submit-credentials)
* [ChangeDefaultAllocation](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#change-default-allocation)
* [SubmitAllocation](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#submit-allocation)
* [TaskCompleted](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#task-completed)
* [Unauthorized](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#unauthorized)
* [SelectedCompanyThroughPayrollProvider](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#selected-company-through-payroll-provider)
* [SelectedCompanyThroughFranchisePage](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#selected-company-through-franchise-page)
* [ChangeDefaultAllocation](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#change-default-allocation)

<br />

**Bill Pay Switch**

* [ViewSearchPaylinkCompanies](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#view-search-paylink-companies)
* [SearchPaylinkCompanies](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#search-paylink-companies)
* [SelectPaylinkCompanies](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#select-paylink-companies)
* [ChangedPayment](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#changed-payment)
* [ViewedLoginPage](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#viewed-login-page)
* [UserAuthenticated](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#user-authenticated)
* [ReturnToCustomer](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#return-to-customer)
* [OnAuthStatusUpdate](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#on-auth-status-update)
* [OnTaskStatusUpdate](https://developer.mastercard.com/open-finance-us/documentation/products/pay/switch/connect-transfer/index.md#on-task-status-update)

#### Search Payroll Provider {#search-payroll-provider}

This event message is sent to `onUserEvent()` when the user searches by company. For example:

    {
        action = SearchPayrollProvider;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        searchTerm = "home depot";
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### Select Payroll Provider {#select-payroll-provider}

This event message is sent to `onUserEvent()` when the user selects a provider from the Search by Company page. For example:

    {
        action = SelectPayrollProvider;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        payrollProvider = Workday;
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### External Login Recovery {#external-login-recovery}

This event message is sent to `onUserEvent()` when the user clicks the external login recovery link from the login help page. For example:

    {
        action = ExternalLink;
        buttonName = "Login Help ";
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### Submit Credentials {#submit-credentials}

This event message is sent to `onUserEvent()` when the user clicks the button to start authentication. For example:

    {
        action = SubmitCredentials;
        customerId = CUSTOMER_ID;
        inputType = username;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### Change Default Allocation {#change-default-allocation}

This event message is sent to `onUserEvent()` when the user clicks Continue from the Percentage Deposit Amount page. For example:

    {
        action = ChangeDefaultAllocation;
        customerId = CUSTOMER_ID;
        depositAllocation = 222;
        depositOption = fixed;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### Submit Allocation {#submit-allocation}

This event message is sent to `onUserEvent()` when the user clicks Continue from the Fixed Deposit Amount page. For example:

    {
        action = SubmitAllocation;
        customerId = CUSTOMER_ID;
        depositAllocation = 222;
        depositOption = fixed;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### Task Completed {#task-completed}

This event message is sent to `onUserEvent()` when the user views the Task Completed page. For example:

    {
        action = TaskCompleted;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        status = completed;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### Unauthorized {#unauthorized}

This event message is sent to `onUserEvent()` when the user views the Unauthorized Access page. For example:

    {
        action = Unauthorized;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        code = 401;
        timestamp = 1737092848275;
        ttl = 1737179248275;
        type = transferDepositSwitch;
    }

#### Selected Company Through Payroll Provider {#selected-company-through-payroll-provider}

This event message is sent to `onUserEvent()` when the user selects a company from type-ahead search on the Configurable Connector Page. For example:

    {
        action = SelectedCompanyThroughPayrollProvider;
        company = "The Home Depot";
        customerId = 7003366104;
        partnerId = 2445582169622;
        sessionId = 1c8f7d0bb336f41088de868b144223b5552c699a0ca4901ca3444938c6713643;
        timestamp = 1751550933856;
        ttl = 1751637333856;
        type = transferDepositSwitch;
    }

#### Selected Company Through Franchise Page {#selected-company-through-franchise-page}

This event message is sent to `onUserEvent()` when the user selects a company from the Search By Franchise page. For example:

    {
        action = SelectedCompanyThroughFranchisePage;
        company = "DCC LEE Enterprises";
        customerId = 7003366104;
        partnerId = 2445582169622;
        sessionId = 1c8f7d0bb336f41088de868b144223b5552c699a0ca4901ca3444938c6713643;
        timestamp = 1751550933856;
        ttl = 1751637333856;
        type = transferDepositSwitch;
    }

#### Change Default Allocation {#change-default-allocation-1}

This event message is sent to `onUserEvent()` when the user selects total in Adjust Deposit Amount. For example:

    {
        action = ChangeDefaultAllocation;
        customerId = 7003366104;
        depositOption = total;
        partnerId = 2445582169622;
        sessionId = 1c8f7d0bb336f41088de868b144223b5552c699a0ca4901ca3444938c6713643;
        timestamp = 1751550933856;
        ttl = 1751637333856;
        type = transferDepositSwitch;
    }

#### View Search Paylink Companies {#view-search-paylink-companies}

This event message is sent to `onUserEvent()` when the user views the Search Paylink Companies page. For example:

    {
        action = ViewSearchPaylinkCompanies;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1742464469200;
        ttl = 1742550869200;
        type = transferBillPaySwitch;
    }

#### Search Paylink Companies {#search-paylink-companies}

This event message is sent to `onUserEvent()` when the user searches the Paylink Companies. For example:

    {
        action = SearchPaylinkCompanies;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        searchTerm = Amazon;
        sessionId = SESSION_ID;
        timestamp = 1742464469200;
        ttl = 1742550869200;
        type = transferBillPaySwitch;
    }

#### Select Paylink Companies {#select-paylink-companies}

This event message is sent to `onUserEvent()` when the user selects a Paylink Company. For example:

    {
        action = SelectPaylinkCompanies;
        billPayProvider = Amazon;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1742464469200;
        ttl = 1742550869200;
        type = transferBillPaySwitch;
    }

#### Changed Payment {#changed-payment}

This event message is sent to `onUserEvent()` when the user changes the Paylink Company payment method. For example:

    {
        action = ChangedPayment;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        paymentMethodType = Amazon;
        sessionId = SESSION_ID;
        timestamp = 1742464469200;
        ttl = 1742550869200;
        type = transferBillPaySwitch;
    }

#### Viewed Login Page {#viewed-login-page}

This event message is sent to `onUserEvent()` when the user continues after selecting a Paylink Company payment method to visit the login page of a Paylink Company. For example:

    {
        action = ViewedLoginPage;
        billPayProvider = Amazon;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1742464469200;
        ttl = 1742550869200;
        type = transferBillPaySwitch;
    }

#### User Authenticated {#user-authenticated}

This event message is sent to `onUserEvent()` when the user continues after entering credentials for a Paylink Company. For example:

    {
        action = UserAuthenticated;
        billPayUserAuthenticated = Amazon;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1742464469200;
        ttl = 1742550869200;
        type = transferBillPaySwitch;
    }

#### Return To Customer {#return-to-customer}

This event message is sent to `onUserEvent()` when the user presses the Return to Partner button after Paylink Company gets updated. For example:

    {
        action = ReturnToCustomer;
        billPayProvider = Amazon;
        customerId = CUSTOMER_ID;
        partnerId = PARTNER_ID;
        sessionId = SESSION_ID;
        timestamp = 1742544226280;
        ttl = 1742630626280;
        type = transferBillPaySwitch;
    }

#### On Auth Status Update {#on-auth-status-update}

    {
      action = onAuthStatusUpdate;
      customerId = 10000163269;
      oauthStatus = authenticated;
      partnerId = 2445582169622;
      sessionId = bdfae9c5f879e2df4b5a96ef5627a807183f58fa0d83bc5942d965747f3edaf8;
      timestamp = 1751295868445;
      transactAuthStatusUpdate = {
        company = {
          branding = {
            color = "#AF6408";
            logo = {
              backgroundColor = "#FF9900";
              url = "https://cdn-public.atomicfi.com/8d97b6ca-595b-447c-8b86-8d690501c794_amazon.png";
            };
          };
          id = 65272c415d8a530008e972df;
          name = Amazon;
        };
        status = authenticated;
      };
      ttl = 1751382268445;
      type = transferBillPaySwitch;
    }

#### On Task Status Update {#on-task-status-update}

*a. Completed with Bank info*

    {
      action = onTaskStatusUpdate;
      customerId = 10000163301;
      partnerId = 2445582169622;
      sessionId = 2be6fb7b39ff0a840d9cc3c80fc2364d0c357ef53641deefd81f28b1badb9c65;
      switchId = 6862a9ef1507a50adc80f784;
      switchStatus = completed;
      timestamp = 1751296204483;
      transactSwitchStatusUpdate = {
        company = {
          branding = {
            color = "#00A1DC";
            logo = {
              backgroundColor = "#00A1DC";
              url = "https://cdn-public.atomicfi.com/e9939fb6-f56c-4bfb-af25-c876dab8c554.png";
            };
          };
          id = 65298dfc2c00c70008a87746;
          name = "AT&T";
        };
        product = switch;
        status = completed;
        switchData = {
          paymentMethod = {
            accountNumberEndsWith = 1111;
            accountType = checking;
            bankIdentifier = 222222222;
            id = 6862a8cd7a34ea6407da644d;
            title = sam;
            type = bank;
          };
        };
        switchId = 6862a9ef1507a50adc80f784;
      };
      ttl = 1751382604483;
      type = transferBillPaySwitch;
    }

*b. Processing with Card info*

    {
      action = onTaskStatusUpdate;
      customerId = 10000163269;
      partnerId = 2445582169622;
      sessionId = bdfae9c5f879e2df4b5a96ef5627a807183f58fa0d83bc5942d965747f3edaf8;
      switchId = 6862a7d97a34ea6407da63fa;
      switchStatus = processing;
      timestamp = 1751295868445;
      transactSwitchStatusUpdate = {
        company = {
          branding = {
            color = "#AF6408";
            logo = {
              backgroundColor = "#FF9900";
              url = "https://cdn-public.atomicfi.com/8d97b6ca-595b-447c-8b86-8d690501c794_amazon.png";
            };
          };
          id = 65272c415d8a530008e972df;
          name = Amazon;
        };
        product = switch;
        status = processing;
        switchData = {
          paymentMethod = {
            brand = mastercard;
            endsWith = 4444;
            id = 6862a77d0d86f86215790d69;
            title = "Mastercard Elite Credit Card";
            type = card;
          };
        };
        switchId = 6862a7d97a34ea6407da63fa;
      };
      ttl = 1751382268445;
      type = transferBillPaySwitch;
    }

*c. Failed*

    {
      action = onTaskStatusUpdate;
      customerId = 10000163301;
      partnerId = 2445582169622;
      sessionId = 2be6fb7b39ff0a840d9cc3c80fc2364d0c357ef53641deefd81f28b1badb9c65;
      switchFailReason = "subscription-inactive";
      switchId = 6862ab887a34ea6407da6587;
      switchStatus = failed;
      timestamp = 1751296204483;
      transactSwitchStatusUpdate = {
        company = {
          branding = {
            color = "#AF6408";
            logo = {
              backgroundColor = "#FF9900";
              url = "https://cdn-public.atomicfi.com/8d97b6ca-595b-447c-8b86-8d690501c794_amazon.png";
            };
          };
          id = 65272c415d8a530008e972df;
          name = Amazon;
        };
        failReason = "subscription-inactive";
        product = switch;
        status = failed;
        switchData =  {
          paymentMethod = {
            brand = mastercard;
            endsWith = 4444;
            id = 6862a8cd7a34ea6407da644c;
            title = "Mastercard Elite Credit Card";
            type = card;
          };
        };
        switchId = 6862ab887a34ea6407da6587;
      };
      ttl = 1751382604483;
      type = transferBillPaySwitch;
    }

## Connect Transfer Error Codes {#connect-transfer-error-codes}

| Error Code |              Reason              |
|------------|----------------------------------|
| 10039      | Unauthorized Data Connect Access |
| 10010      | Field Validation Error           |
| 1440       | Timeout                          |
| 401        | Invalid Link                     |
| 500        | Atomic Error                     |
| 100        | User Initiated Exit              |
| 400        | Exception or Error               |

