Atomic logo

Connect Accounts

Bill Management typically begins by establishing a connection to a user's account using the Transact SDK.

This guide outlines how to initiate that connection, covering multiple methods of directing users into the Transact SDK, along with the tradeoffs of each approach. It also explains the account lifecycle and key considerations for managing linked accounts.

We assume you have previously viewed the Integration Guide and installed the Transact SDK.

Accounts can be connected in multiple ways.

  • User-driven selection: Users choose from a list of supported companies within the Transact SDK.
  • Deep linking: Link users directly from your app or site into a specific company.
  • Pre-populated options: Provide a list of biller transactions, allowing Atomic to pre-populate account options for the user to link.

The Transact SDK is the action layer for all Bill Management functionality.

The user will be guided through the Transact SDK experience, including any multi-factor authentication (MFA) steps required by their account provider. Once all necessary inputs have been collected, the user can exit the SDK. From there, any remaining actions—such as fetching account details or verifying credentials—can proceed in the background on the user’s device, without requiring further interaction.

While we can complete tasks in the background, we will fail if the user force-closes your application before we complete the task.

The Transact SDK includes views for a user to self-service account selection. If you do not have prior insights into which accounts a user has, or you don't wish to link user transactions to Atomic companies, this is the most straightforward way to launch the experience.

A product of present must be provided in order to launch the SDK within the Manage context.

Optionally, you can also include a deeplink parameter of "search-company" to skip the Welcome screen and take the user directly to the selection view. See the Transact SDK Parameters documentation for more information.

React Native Example
import { Atomic, Operation } from "@atomicfi/transact-react-native"

Atomic.transact({
  config: {
    scope: "pay-link",
    publicToken: "PUBLIC_TOKEN",
    tasks: [{ product: Product.PRESENT }],
    theme: {
      brandColor: "#9460FE",
      dark: false
    },
    language: "en",
    deeplink: {
      step: "login-company",
      companyId: "64ecca15ec669e000851d5d2"
    },
    search: {
      ruleId: "67571ed7b278a518d7d8abdf"
    },
    metadata: {
      version: "1.2.1",
      test: "New User Experience",
      testVariant: "B"
    }
  },
  onDataRequest: request => {
    // Handle data request for additional information
    console.log('Data request:', request.fields)
  },
  onAuthStatusUpdate: status => {
    console.log('Auth status:', status.status)
  },
  onTaskStatusUpdate: task => {
    console.log('Task', task.taskId, 'status:', task.status)
  },
  onError: error => {
    console.log('Error:', error)
  },
  onInteraction: interaction => {
    console.log('Interaction event:', interaction.name, interaction.value)
  },
  onClose: data => {
    console.log('Close event:', data.reason)
  }
})

At this point, users will complete the flow within the Transact SDK. You can pick up after we are done using the tools described in the Monitoring Progress section below.

If you know which merchants a user pays or subscribes to, you can deeplink them directly to the account connection experience.

We recommend maintaining a mapping from a merchant (identified by name or by your id) to an Atomic _id. Atomic Company _ids can be acquired in two ways:

  • By contacting your Customer Success Manager at Atomic.
  • By consuming the Company Search API.

Company _ids are stable and do not change.

In Progress
This functionality is currently in limited rollout, and will be released for general availability soon.

To streamline the process of onboarding multiple companies for a user, send Atomic a list of transactions or a list of merchants to pre-populate the experience for your users.

An Account is Atomic’s record of a user’s relationship with one company. Its connectionStatus tells you what Atomic can do with it right now.

PayLink account lifecycle: initial, connected, disconnected, and how a user moves between them

The account exists in Atomic but the user has not signed in to the company. This is the state of an account created from transactions or company ids before the user connects. No bills, plans, or actions are available yet.

The user signed in to the company inside Transact, either through the connect flow or because they launched an action on a company they had not connected. Signing in is part of the first task: Atomic authenticates, keeps the session, and reads the account. From this point:

  • Everything you read from Get Accounts, suggestions, and the actions list is a snapshot taken at lastSyncedAt.
  • A refresh action, when listed on the account, re-reads the account against the stored session.
  • Plan actions such as cancel, pause, and change plan run against the same session.
  • Changes reach your backend through the pay-link-accounts-updated and task-status-updated webhooks. See the Ingest Data guide.

The session expired or the company revoked it. Atomic can no longer read or act on the account, and a refresh will not recover it. Atomic sends pay-link-accounts-updated with an updateType of disconnected. Show the user a reconnect prompt and launch Transact for the same company; a successful sign-in returns the account to connected.

UserLink deposit switching follows the same shape, with the user’s payroll provider in place of the merchant.

As Atomic connects a user’s account and processes actions, we provide several mechanisms for monitoring progress within the experience. To support this, you’ll need to implement one of the integration patterns outlined below.

The Transact SDK emits multiple kinds of events which can be handled with callbacks in your client-side application. Comprehensive documentation of these events can be found in the Transact SDK documentation, but a few are particularly important for rendering updates in your UI.

onTaskStatusUpdate is triggered multiple times during a task’s lifecycle. Use it to show a pending UI when the task enters a processing state, and to update or clear the UI when it completes or fails. It also provides task and company details—useful for retrieving data later and displaying more specific progress indicators, especially when users connect multiple companies.

Please keep in mind that a task is only generated for Present tasks (account connection) and automated actions.

Atomic also emits onFinish and onClose for Actions. When an Action is involved, both events include an action object with the Action's type, status, and the accountId it was executed against. Because these events only fire when Transact closes, we recommend using onTaskStatusUpdate to track progress for consistency across all Manage products, and using onFinish and onClose to react when the user leaves Transact. See the Execute Actions guide for details.

Webhooks provide a real time update to your backend when we retrieve data, complete tasks, or complete other important milestones. As they are a core part of Atomic's product, detailed documentation can be found both in the Ingest Data guide or the Webhooks reference.

In brief, webhooks return events on similar milestones as the above onTaskStatusUpdate hook. The task-status-updated webhook will be called on transitions between processing, failed, or completed states. Typically, you will retrieve data from Atomic either directly from a webhook, or from the API when you receive a webhook indicating a task is complete.

Depending on your stack, you may use a combination of webhooks and client-side events to manage UI state and data fetching, but it is possible to use one or the other in some cases.

If you are unable to consume webhooks, it is also possible to keep track of task status by polling the Get Task Status endpoint. This endpoint is designed to be lightweight to be called repeatedly. To call this endpoint, you will need to collect the task _id from the client-side events.

We are able to support a number of polling strategies, but please be considerate when polling this endpoint. We recommend a 5 second interval, and backing off the polling interval after 2 minutes. Tasks should complete after five minutes, so we recommend terminating your poll if it has not completed in that time frame.