
PayLink Transact SDK Reference
The Atomic Transact SDK is a UI designed to securely handle interactions with our products while performing the heavy-lifting of integration.
iOS
We recommend installing the Transact iOS SDK with Swift Package Manager by using the Package URL: https://github.com/atomicfi/atomic-transact-ios.
Requirements
- Xcode 16.4 or greater
- iOS 15.0 or greater
Swift Package Manager
Inside Xcode, go to Project Settings -> Project -> Package Dependencies and click the + to add a new Package.

https://github.com/atomicfi/atomic-transact-iosGitHub Release Artifacts
If you are unable to use Swift Package Manager, we also provide framework artifacts on GitHub releases. You will need to link MuppetIOS, QuantumIOS, and AtomicTransact into your project. Dynamic versions are available instead if needed.
CocoaPods (Deprecated)
CocoaPods support is deprecated. We will continue publishing to the CocoaPods Trunk while we are able to, which ideally is through November, but our deployments to Trunk have become very unreliable and we can't make guarantees we will continue to ship new versions there.
We strongly recommend migrating to Swift Package Manager if you have not already.
If you must continue to use CocoaPods, we recommend pointing to our git repository directly rather than pulling updates from the CocoaPods Trunk. See the CocoaPods documentation for more information.
pod 'AtomicSDK', :git => "https://github.com/atomicfi/atomic-transact-ios.git"AtomicConfig struct to customize the Transact experience with any of the Transact SDK Parameters. import SwiftUI
import AtomicTransact
struct ContentView: View {
@State var showingTransact = false
var body: some View {
Button("Launch Transact") {
showingTransact = true
}.atomicTransact(
isPresented: $showingTransact,
config: {
AtomicConfig(
publicToken: "PUBLIC_TOKEN",
scope: .payLink,
tasks: [.init(operation: .switch)],
theme: Theme(
brandColor: "#9460FE",
dark: false
),
language: "en",
deeplink: Deeplink(
step: "login-company",
companyId: "64ecca15ec669e000851d5d2"
),
search: Search(
ruleId: "67571ed7b278a518d7d8abdf"
),
metadata: [
"version": "1.2.1",
"test": "New User Experience",
"testVariant": "B"
]
)},
onDataRequest: { request in
// Handle data request for additional information
print("Data request: \(request.fields)")
},
onAuthStatusUpdate: { status in
print("Auth status: \(status.status)")
},
onTaskStatusUpdate: { task in
print("Task \(task.taskId) status: \(task.status)")
},
onError: { error in
print("Error: \(error)")
},
onCompletion: { result in
switch result {
case .closed(let response):
print("Close event: \(response.reason)")
case .error(let error):
print("Transact returned with error: \(error)")
default:
print("Default case")
}
})
.onReceive(Atomic.interactions) { interaction in
print("Interaction event: \(interaction.name) \(interaction.value)")
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
import AtomicTransact
let config = AtomicConfig(
publicToken: "PUBLIC_TOKEN",
scope: .payLink,
tasks: [.init(operation: .switch)],
theme: Theme(
brandColor: "#9460FE",
dark: false
),
language: "en",
deferredPaymentMethodStrategy: .sdk, // optional
deeplink: Deeplink(
step: "login-company",
companyId: "64ecca15ec669e000851d5d2"
),
search: Search(
ruleId: "67571ed7b278a518d7d8abdf"
),
metadata: [
"version": "1.2.1",
"test": "New User Experience",
"testVariant": "B"
]
)
Atomic.presentTransact(
from: self,
config: config,
onDataRequest: { request in
// Handle data request for additional information
print("Data request: \(request.fields)")
// Example of sending card data
// Use a Basis Theory sandbox test card when testing Switch in sandbox.
// Replace this with your actual data collection logic in production.
let card = TransactDataResponse.CardData(
number: "5100000000000008",
expiry: "03/29",
cvv: "111"
)
let identity = TransactDataResponse.Identity(
firstName: "John ",
lastName: "Doe",
postalCode: "12345",
address: "123 Main St",
city: "New York",
state: "NY",
phone: "5551234567",
email: "john.doe@example.com"
)
let errors = identity.validate()
if !errors.isEmpty {
for error in errors {
print("Validation error: (error)")
}
}
if !identity.isValid() {
// Handle invalid identity
}
return TransactDataResponse(card: card, identity: identity)
},
onAuthStatusUpdate: { status in
print("Auth status: \(status.status)")
},
onTaskStatusUpdate: { task in
print("Task \(task.taskId) status: \(task.status)")
},
onError: { error in
print("Error: \(error)")
},
onInteraction: { interaction in
print("Interaction event: \(interaction.name) \(interaction.value)")
},
onCompletion: { result in
switch result {
case .closed(let response):
print("Close event: \(response.reason)")
case .error(let error):
print("Transact returned with error: \(error)")
}
})
Android
The Atomic Android SDK is available via Maven Central.
Update your project plugins
In your root-level (project-level) Gradle file (build.gradle), add rules to include the Android Gradle plugin. Check that you have Google's Maven repository as well.
buildscript {
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
mavenCentral() // Include to import Transact Android SDK
}
dependencies {
// ...
}
}Add the Transact SDK to your app
In your module (app-level) Gradle file (usually app/build.gradle), add a line to the bottom of the file. The latest version of the SDK is .
android {
defaultConfig {
minSdkVersion 23 // or greater
}
// Enable Java 8 support for Transact to work
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
// ...
implementation 'financial.atomic:transact:<insert latest version>'
} If you're using the Transact SDK in a Java environment, add the following configuration to your module (app-level) Gradle file (usually app/build.gradle). These constraints resolve compatibility issues with Android lifecycle versions above 2.6.
implementation("financial.atomic:transact:<insert latest version>")
constraints {
implementation("androidx.lifecycle:lifecycle-common") {
version {
strictly("2.6.1")
}
}
implementation("androidx.lifecycle:lifecycle-process") {
version {
strictly("2.6.1")
}
}
}
Config class to customize the Transact experience with any of the Transact SDK Parameters. Change the Transact theme
You have the ability to modify your theme by adding an activity tag. Add the following snippet to your manifest:
<activity
android:name="financial.atomic.transact.activity.TransactActivity"
android:theme="@style/Theme.You.Want"
/>
If you get a Manifest merger failed error, you can resolve it by adding xmlns:tools="http://schemas.android.com/tools" to your manifest tag, then updating your TransactActivity to the following:
<activity
android:name="financial.atomic.transact.activity.TransactActivity"
android:theme="@style/Theme.You.Want"
tools:replace="theme"
/>
import org.json.JSONObject
import financial.atomic.transact.*
import financial.atomic.transact.receiver.TransactBroadcastReceiver
val config = Config(
publicToken = "PUBLIC_TOKEN",
scope = Config.Scope.PAY_LINK,
tasks = listOf(Config.Task(operation = Config.Operation.SWITCH)),
theme = Config.Theme(
brandColor = "#9460FE",
dark = false
),
language = "en",
deferredPaymentMethodStrategy: .sdk, // optional
deeplink = Config.Deeplink(
step = "login-company",
companyId = "64ecca15ec669e000851d5d2"
),
search = Config.Search(
ruleId = "67571ed7b278a518d7d8abdf"
),
metadata = mapOf(
"version" to "1.2.1",
"test" to "New User Experience",
"testVariant" to "B"
)
)
Transact.registerReceiver(context, object: TransactBroadcastReceiver() {
override fun onDataRequest(data: JSONObject) {
// Handle data request for additional information
Log.d("APP", "Data request: ${data.getJSONArray("fields")}")
// Example of sending card data through the SDK.
// Use a Basis Theory sandbox test card when testing Switch in sandbox.
// If you are passing this info through the API, disregard this line.
val card = Config.TransactDataResponse.CardData("5100000000000008", "03/29", "111")
val identity =
Config.TransactDataResponse.Identity(
"John",
"Doe",
"12345",
"123 Main St",
"Apt 4B",
"New York",
"NY",
"5551234567",
"john.doe@example.com",
)
val dataResponse = Config.TransactDataResponse(card, identity)
Transact.sendData(this@MainActivity, dataResponse)
}
override fun onAuthStatusUpdate(data: JSONObject) {
Log.d("APP", "Auth status: ${data.getString("status")}")
}
override fun onTaskStatusUpdate(data: JSONObject) {
Log.d("APP", "Task ${data.getString("taskId")} status: ${data.getString("status")}")
}
override fun onError(data: JSONObject) {
Log.d("APP", "Error: ${data.getString("error")}")
}
override fun onInteraction(data: JSONObject) {
Log.d("APP", "Interaction event: ${data.getString("name")} ${data.getJSONObject("value")}")
}
override fun onClose(data: JSONObject) {
Log.d("APP", "Close event: ${data.getString("reason")}")
}
})
Transact.present(context, config)import android.content.Context;
import android.util.Log;
import org.json.JSONObject;
import java.util.Arrays;
import java.util.List;
import java.util.HashMap;
import java.util.Map;
import financial.atomic.transact.*;
import financial.atomic.transact.receiver.TransactBroadcastReceiver;
public class TransactJavaImplementation {
public static void initializeTransact(Context context) {
Map<String, String> metadata = new HashMap<>();
metadata.put("version", "1.2.1");
metadata.put("test", "New User Experience");
metadata.put("testVariant", "B");
Config config = new Config(
"PUBLIC_TOKEN",
Config.Scope.PAY_LINK,
Arrays.asList(new Config.Task(Config.Operation.SWITCH)),
new Config.Theme("#9460FE", false),
"en",
new Config.Deeplink("login-company", "64ecca15ec669e000851d5d2"),
new Config.Search("67571ed7b278a518d7d8abdf"),
metadata
);
Transact.Companion.registerReceiver(context, new TransactBroadcastReceiver() {
@Override
public void onDataRequest(JSONObject data) {
// Handle data request for additional information
Log.d("APP", "Data request: " + data.optJSONArray("fields"));
}
@Override
public void onAuthStatusUpdate(JSONObject data) {
Log.d("APP", "Auth status: " + data.optString("status"));
}
@Override
public void onTaskStatusUpdate(JSONObject data) {
Log.d("APP", "Task " + data.optString("taskId") + " status: " + data.optString("status"));
}
@Override
public void onError(JSONObject data) {
Log.d("APP", "Error: " + data.optString("error"));
}
@Override
public void onInteraction(JSONObject data) {
Log.d("APP", "Interaction event: " + data.optString("name") + " " + data.optJSONObject("value"));
}
@Override
public void onClose(JSONObject data) {
Log.d("APP", "Close event: " + data.optString("reason"));
}
});
Transact.Companion.present(context, config);
}
}
React Native
The Atomic React Native SDK is availble via npm.
Transact can be initialized by including our React Native SDK in your app and then calling the Atomic.transact method and passing it a configuration object.
yarn add @atomicfi/transact-react-nativeiOS Setup
- Xcode 16.4 or greater
- iOS 15.0 or greater
(cd ios && pod install)For applications using the Expo managed workflow, see the Expo documentation about using Native Modules.
Android Setup
Autolinking should set up everything when building.
config object. Refer to the Transact SDK Parameters section for more details. import { Atomic, Operation } from "@atomicfi/transact-react-native"
Atomic.transact({
config: {
scope: "pay-link",
publicToken: "PUBLIC_TOKEN",
tasks: [{ operation: "switch" }],
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)
}
})Flutter
A Flutter plugin that wraps the native Atomic Transact SDKs. The deployed package is available on pub.dev. Plus, you can view the plugin with a code example on Github
Add atomic_transact_flutter as a dependency in your pubspec.yaml file
dependencies:
...
atomic_transact_flutter: <version>iOS Requirements
- Xcode 16.4 or greater
- iOS 15.0 or greater
- For a how-to on updating the minimum iOS deployment version, see the Flutter Deployment documentation.
Android Requirements
Set the minSdkVersion in android/app/build.gradle
android {
defaultConfig {
minSdkVersion 23 // or greater
}
}AtomicConfig class to customize the Transact experience with any of the Transact SDK Parameters. import 'package:atomic_transact_flutter/atomic_transact_flutter.dart';
Atomic.transact(
config: AtomicConfig(
publicToken: "PUBLIC_TOKEN",
scope: "pay-link",
tasks: [AtomicTask(operation: AtomicOperationType.switchPayment)],
theme: AtomicTheme(
brandColor: "#9460FE",
dark: false,
),
language: "en",
deeplink: AtomicDeeplink.step(
DeeplinkStep.loginCompany(companyId: "64ecca15ec669e000851d5d2"),
),
search: AtomicSearch(ruleId: "67571ed7b278a518d7d8abdf"),
deferredPaymentMethodStrategy: AtomicDeferredPaymentMethodStrategy.sdk, // optional
metadata: {
"version": "1.2.1",
"test": "New User Experience",
"testVariant": "B",
},
),
onDataRequest: (request) {
// Handle data request for additional information
print("Data request: ${request.fields}");
// Example of sending card data through the SDK.
// Use a Basis Theory sandbox test card when testing Switch in sandbox.
// If you are passing this info through the API, disregard this return.
return AtomicTransactDataResponse(
card: AtomicTransactCardData(
number: "5100000000000008",
expiry: "03/29",
cvv: "111",
),
identity: AtomicTransactIdentity(
firstName: "John",
lastName: "Doe",
postalCode: "12345",
address: "123 Main St",
address2: "Apt 4B",
city: "New York",
state: "NY",
phone: "5551234567",
email: "john.doe@example.com",
),
);
},
onAuthStatusUpdate: (status) {
print("Auth status: ${status.status}");
},
onTaskStatusUpdate: (task) {
print("Task ${task.taskId} status: ${task.status}");
},
onInteraction: (interaction) {
print("Interaction event: ${interaction.name} ${interaction.value}");
},
onCompletion: (type, response, error) {
print("Completion event: $type");
},
);Capacitor
The Atomic Capacitor plugin is available via npm and wraps the native iOS and Android SDKs for Ionic apps. A full example app is available on GitHub.
Transact can be launched by importing TransactPlugin and calling presentTransact with a configuration object.
npm install @atomicfi/transact-capacitor && npx cap synciOS Setup
- Xcode 16.4 or greater
- iOS 15.0 or greater
CocoaPods dependencies are installed automatically by npx cap sync.
Android Setup
Set the minSdkVersion to 23 or greater in android/variables.gradle. Capacitor handles autolinking when building.
config object. Refer to the Transact SDK Parameters section for more details. import { TransactPlugin } from '@atomicfi/transact-capacitor'
await TransactPlugin.addListener('onInteraction', (event) => {
console.log('Interaction event:', event.name, event.value)
})
await TransactPlugin.addListener('onAuthStatusUpdate', (event) => {
console.log('Auth status:', event.status)
})
await TransactPlugin.addListener('onTaskStatusUpdate', (event) => {
console.log('Task', event.taskId, 'status:', event.status)
})
await TransactPlugin.addListener('onClose', (event) => {
console.log('Close event:', event.reason)
})
await TransactPlugin.addListener('onDataRequest', async (event) => {
// Handle data request for additional information
console.log('Data request:', event.fields)
await TransactPlugin.resolveDataRequest({ /* provide required data */ })
})
await TransactPlugin.presentTransact({
config: {
scope: 'pay-link',
publicToken: 'PUBLIC_TOKEN',
tasks: [{ operation: 'switch' }],
theme: {
brandColor: '#9460FE',
dark: false
},
language: 'en',
deeplink: {
step: 'login-company',
companyId: '64ecca15ec669e000851d5d2'
},
metadata: {
version: '1.2.1',
test: 'New User Experience',
testVariant: 'B'
}
},
environment: { environment: 'production' }
})Parameters
When using the Transact SDK, the configuration object can be customized to change the look and user experience. Below are all of the available options for customization.
You can listen to client-side events using callback functions like onFinish, onClose, and onInteraction. Light branding customizations can be applied through the theme object, allowing you to set brand colors and toggle dark mode. For Spanish-speaking users, you can set language: 'es' to display all content in Spanish. You can also customize how users enter the experience through deeplinks, Single Switch, and custom search experiences.
Required Properties
publicTokenstring- The public token returned during AccessToken creation.
scopeenum- Specifies the product suite to be launched within Transact, determining the features available to the user. For PayLink operations, such as
switch, this value will bepay-link.
Optional Properties
themeobject
Child Properties
Optional Properties
brandColorstring
color CSS property. For example: #FF0000 or rgb(255, 0, 0). This property will be applied to buttons on the consent page and exit confirmation prompt.darkboolean
overlayColorstring
background-color CSS property. For example: #FF0000 or rgb(255, 0, 0). This property will change the overlay background color. This overlay is mainly only seen when Transact is used on a Desktop.deeplinkobject
GET /company/:companyId/details.Child Properties
Required Properties
stepstring- Acceptable values are
search-companyandlogin-company. Usesearch-companyto deeplink into the standard company search flow. Uselogin-companyto deeplink directly into a specific company login flow, or pair it withsingleSwitch: trueto initialize Single Switch.
Optional Properties
companyIdstring
singleSwitchboolean
true alongside deeplink.step = "login-company" and the target companyId.languagestring
en for English, es for Spanish, and fr for French.Default value: en
metadataobject
searchobject
deferredPaymentMethodStrategyenum
Acceptable values:
sdk, api{
"publicToken": "PUBLIC_TOKEN",
"scope": "pay-link",
"tasks": [
{
"operation": "switch"
}
],
"theme": {
"brandColor": "#1b1464",
"overlayColor": "#CCCCCC"
},
"deeplink": {
"step": "login-company",
"companyId": "64ecca15ec669e000851d5d2",
"singleSwitch": true
},
"search": {
"ruleId": "67571ed7b278a518d7d8abdf"
},
"language": "en",
"metadata": {
"version": "1.2.1",
"test": "New User Experience",
"testVariant": "B"
}
}Transact Lifecycle
The host app controls how the Transact SDK is shown and dismissed over time. Calling Present Transact opens the SDK and keeps it visible until the user completes the flow, or manually exits, or the app programmatically hides or pauses the SDK.
The controls below define how your app can transition Transact between visible, backgrounded, and paused states.
Present Transact
Use Present Transact to start an interactive Transact session in your app. See the specific platform section for code examples and required parameters.
Hide
Hide removes the Transact UI from view while allowing any started tasks to continue processing in the background.
Atomic.hideTransact()Pause
Calling .pauseTransact returns a reference object to the hidden Transact view. Call .resume on that object to resume the flow.
do {
let pausedRef = try await Atomic.pauseTransact(animated: true)
// ... show your app UI while Transact is paused ...
pausedRef.resume(source: self, animated: true)
} catch Atomic.PauseTransactError.transactNotPresented {
print("No Transact view is currently presented")
}Event listeners
When using the SDK, events will be emitted and passed to the native application. Such events allow native applications to react and perform functions as needed. Some events will be passed with a data object with additional information.
onLaunch
Triggered when the Transact SDK presents an Action to the user via presentAction. Use this event to set in-progress UI state in your application, such as disabling the originating CTA or displaying a loading indicator while the Action runs. The data passed with the event includes the id of the Action being presented (the same value you passed to presentAction) and the user's identifier.
onClose
Triggered in several different instances:
- If a user does not find their employer, payroll provider, or service provider, the data passed with the event will be
{ reason: 'zero-search-results' }.- If the Manual Fallback Call To Action in Console is enabled, the data passed with this event will be
{ reason: 'manual-fallback' }.
- If the Manual Fallback Call To Action in Console is enabled, the data passed with this event will be
- During the Transact process if a user is prompted to keep waiting or exit and they choose to exit, the data passed with the event will be
{ reason: 'task-pending' }. - At any point if the user clicks on the x the data passed with the event will be
{ reason: 'unknown' }.
The event payload includes the following properties:
reasonenum- The reason the user exited Transact. Common values are
zero-search-results,manual-fallback,task-pending,expired-token,unauthorized, orunknown.. This list is not exhaustive; handle unrecognized values gracefully. actionObjectOptional- Information about the Action that was being executed when the user exited.
Child Properties
Optional Properties
accountIdstringThe unique identifier for the Account the Action was executed against. Use this to correlate the event with a specific Account in the Atomic system.typeenumThe type of Action that was executed. Possible values includerefresh,connect-account,disconnect-account,switch,change-plan,cancel-plan, orpause-plan..
onFinish
Triggered when the user reaches the success screen and closes Transact. The event payload will include the following properties:
identifierstring- The unique identifier for the user.
actionObjectOptional- Information about the Action that was executed.
Child Properties
Optional Properties
accountIdstringThe unique identifier for the Account the Action was executed against. Use this to correlate the event with a specific Account in the Atomic system.typeenumThe type of Action that was executed. Possible values includerefresh,connect-account,disconnect-account,switch,change-plan,cancel-plan, orpause-plan.. taskIdstring- The unique identifier for the Task.
taskWorkflowIdstring- The unique identifier for the Task workflow.
onDataRequest
Triggered when additional data is needed to complete a Task. For example, if your implementation is delaying the transit of bank or card data until the user is authenticated. The data passed with the event will be similar to the following:
{
"fields": [
"identity",
"card"
],
"userId": "ATOMIC_USER_ID",
"taskId": "TASK_ID",
"identifier": "YOUR_IDENTIFIER",
"taskWorkflowId": "TASK_WORKFLOW_ID",
"company": {
"_id": "COMPANY_ID",
"name": "COMPANY_NAME"
},
"properties": {
"lastFour": "1234",
"title": "Personal Visa",
"externalId": "CARD_123"
}
} The array of fields will contain a list of missing entities, with possible values of account, card, and identity.
The properties object describes the payment method the user selected, so you can match it to your own records before responding. For a card it may contain lastFour, title, and externalId; for a bank account it may contain accountNumberLastFour, title, and externalId. Each key is present only when you supplied that value during access token creation. When no payment method was selected, properties is an empty object.
When fields includes card or account, send one Update User request for the selected requested method. Use properties.externalId to map the selected card or bank account in your system. If you did not set an externalId, match on the remaining properties instead — but note that lastFour alone is not guaranteed to be unique across a user's payment methods.
Choose one of the following strategies to provide the requested data. This strategy must be specified using the deferredPaymentMethodStrategy SDK parameter.
api- send the the data to the Update User endpoint.sdk- send a response message via the SDK. See the UIKit, Kotlin, and Flutter examples for how to return data for the sdk flow.
onAuthStatusUpdate
Triggered when the user's authentication status in the service provider's system changes. The event payload will include the following properties:
companyObject- The company into whose system the user has authenticated.
statusenum- The user's authentication status in the service provider's system. Currently the only value is
authenticated.
onTaskStatusUpdate
Triggered when the status of a task changes. The event payload will include the following properties:
taskIdstring- The unique identifier for the Task.
productenum- The product relevant to the executed Task. Possible values are
switchandaction. companyObject- The company into whose system the user has authenticated.
statusenum- The current state of the Task. Options are
processing,failedandcompleted. Failed and completed are final states indicating either a successful or unsuccessful Task. actionTypeenumOptional- The type of Action being executed. Present when
productisaction. Possible values arerefresh,connect-account,disconnect-account,switch, orcancel-plan.. switchDataObjectOptional- Data associated with a
switchTask. Present whenproductisswitch.Child Properties
Optional Properties
paymentMethodObjectThe payment method used to update the user's account.Child Properties
Optional Properties
_idstringThe unique identifier for the payment method.titlestringThe title of the payment method. May be an empty string for bank accounts without a title.typeenumThe type of payment method. Options arecardandbank.brandstringThe brand of the payment method.expirystringThe expiry date of the payment method.lastFourstringThe last 4 digits of the payment method.accountTypeenumThe type of account. Options arecheckingandsavings.routingNumberstringThe routing number of the payment method.lastFourAccountNumberstringThe last 4 digits of the account number. failReasonenumOptional- For Tasks that failed, this is the reason why the Task failed. These are enumerated in the Task Failures section of the PayLink webhooks reference.
managedBy.companyObjectOptional- When
failReasonissubscription-managed-by-partner-provider, this object contains information about the system that manages the user's account.
onInteraction
Triggered on interactions within Transact. For example, when a user transitions to a new screen or presses the back button. The data passed with the event will be similar to the following:
{
"name": "NAME OF THE EVENT",
"value": "OBJECT CONTAINING EVENT VALUES"
}Details can be found below in the interaction events list.
Interaction events
These are some of the event names which can appear in an onInteraction event.
Viewed Search By Company Page- User viewed the company search page
Selected Company From Search By Company Page- User selected a company from the company search page
Viewed Zero Search Results From Search By Company Page- User searched for a company and saw no results
Viewed PayLink Interstitial Page- User viewed the PayLink interstitial page
Clicked Change Payment Method Dropdown- User clicked the change payment method dropdown
Changed Payment Method- User changed the payment method
Viewed Login Page- User viewed the login page
Viewed Authentication Success Page- User viewed the authentication success page
Viewed Add Card Interstitial Page- User viewed the add card interstitial page
Clicked Add Card From Add Card Interstitial Page- User clicked the add card button on the add card interstitial page
Viewed Add Card Page- User viewed the add card page
Viewed Task Completed Page- User viewed the task completed page
Viewed Task Failed Page- User viewed the task failed page
Clicked Try Again From Task Failed Page- User clicked try again on the task failed page
{
"name": "Changed Payment Method",
"value": {
"customer": "Atomic",
"language": "en",
"product": "switch"
}
}Metadata
When initializing the Transact SDK you can pass in a metadata parameter. This parameter is used to attach key-value data that will be returned in webhook events. Metadata is not included in client-side SDK events.
Metadata is useful for storing additional, structured information on a Task. As an example, you could store an order ID from your system to track your user's process with a direct deposit or an identifier for a marketing campaign to track users coming from that content. Metadata is not used by Atomic and won't be seen by your users.
{
"order_id": "1234567890",
"campaign_id": "email-marketing-campaign"
}Testing
To aid in testing various user experiences, you may use any of these pre-determined "test" credentials for authentication. Any password will work as long as the username is found in these lists. If the authentication requires an email, simply append @example.com to the end of the chosen username.
Upon submission of your credentials, a test Task is created in Atomic’s system to process the end user’s data. These credentials can be toggled off for production use in the Atomic Console.
These flows operate identically to the way the Atomic system functions in production. Running a test Task will generate the same events and webhooks as a Task run by an end user.
Successful operation
Test where the user's credentials are correct and the task completes. When answering MFA questions, any answer will be accepted.
| Username | Description |
|---|---|
test-good | Test a successful operation. |
test-custom-success-message | Test a user whose payment method was successfully updated, and a custom success message was delivered. |
Error establishing connection
Test where the user encounters an issue connecting to the third-party system.
| Username | Description |
|---|---|
test-unknown-failure | Test the user experience when there is an unexpected error. |
User issue
Test where there is an error that occurs due to an action of the user.
| Username | Description |
|---|---|
test-subscription-inactive | Test a user who doesn't have an active subscription with the service provider. |
test-bundle-wrong-provider | Test a user whose subscription bundle is managed by another service. |
test-payment-method-locked | Test a user whose service provider has temporarily disallowed updates to the user's payment method. |
test-payment-method-declined | During the pre-authorization or prenote transaction, the payment method was declined by the service provider. |
test-payment-method-limit-reached | The maximum number of payment methods has been reached for the merchant. The user will need to remove an existing payment method before adding a new one. |
test-payment-method-insufficient-funds | The selected payment method lacks sufficient funds when the merchant attempts a pre-authorization or prenote transaction. |
test-payment-method-device-disconnected | The device used to start the task is no longer connected. |
Service provider issue
Test where the user encounters an issue originating from the service provider.
| Username | Description |
|---|---|
test-payment-method-not-supported | Test a user whose chosen payment method isn't supported by the service provider. |
test-payment-switch-unsuccessful | Test a user whose payment method could not be updated. We use this generic fail reason when none of the other fail reasons apply. |
Cards
These sample PANs come from Basis Theory's test card docs . Refer there for the full sandbox card list and scenario details. The CVV values shown below are example values only.
| Card Number | CVV | Card Brand |
|---|---|---|
5100000000000008 | 234 (or any 3 digits) | Mastercard |
370000000000002 | 3456 (or any 4 digits) | American Express |
4000000000000002 | 123 (or any 3 digits) | Visa |