Link Bank

Link Bank enables an account holder to add (link) or relink their external bank to their Netspend account to allow bank transfers. The account holder must be authenticated before accessing the micro app and linking bank accounts.

Web SDK

This part of the document provides information on using the Link Bank micro app with Web SDK.

Usage

You provide linkBank as the purpose to use this micro app as shown in the sample code below:

await NetspendSDK.microApp.open({
  purpose: 'linkBank',
  passcode: 'abcd1234',
  params: {
	bankLinkId: bankLinkIdToStartRelinkFor
  },
  onStateChange(event, data) {
	// When the micro app state is changed.
  },
  onEvent(event, data) {
	// An event happened that you may want to track.
	window.console.log('event emitted', event, data);
  }
});

Parameters

ParameterDescription
bankLinkIdThe Netspend-provided bank link Identifier that the account holder wants to link to.

Branding

The following optional branding can be provided at the initial NetspendSdk.shared.initialize call.

BrandingDescription
mfeLinkBank.warningImageThe image on a screen representing failure to link a card. Should be:
- an image data url
- 260x144 px

Example

await NetspendSDK.microApp.initialize({
	container: HTMLElement,
	sdkId: string,
	theme: NetspendSdkTheme,
	branding: {
		  'mfeLinkBank': {
			'warningImage': warningImageUrl
		}
	}
});

Events

EventDescription
startedThe UI has been loaded and can be used by the account holder (User).
failedToStartThe UI failed to load for the account holder.
linkBankAddedThe account holder has successfully linked a bank.
failedToLinkBankThe account holder has failed to link a bank.
externalAccountNotLinkedThe external bank was not found.
reauthSuccessfulThe account holder has successfully re-linked a bank.
failedToReauthThe account holder has failed to re-link a bank.
cardOwnerIdRequiredThe card holder ID is required for the request.

Errors

ErrorDescription
failedToStartThe SDK failed to initialize the UI.

Android SDK

This part of the document provides information on using the Link Bank micro app with Android SDK.

Usage

You provide linkBank as the purpose to use this micro app as shown in the sample code below:

val intent = Intent(thisActivity, MyNetspendActivity::class.java)

// Purpose must match a supported purpose or an exception will be thrown.
intent.putExtra(NetspendSdkActivity.PURPOSE_NAME, "linkBank")

// Each purpose documents its available params.
intent.putExtra(NetspendSdkActivity.PURPOSE_PARAMS, hashMapOf<String, Any>(
  "bankLinkId" to bankLinkIdToStartRelinkFor
))

// Passcode will be returned from our partner API integration.
// Passcode is exchanged for an authentication token inside the micro-app.
intent.putExtra(NetspendSdkActivity.PASSCODE, oneTimePasscodeFromNetspendApi)

// Start the activity
startActivity(intent)

Parameters

See Parameters above for the details.

Branding

See Branding above for the details. Example is given below.

Example

NetspendSdk.shared.initialize(
   NetspendSdk.InitializationBuilder()
     .androidContext(Context) // Usually `this` is initialized in your MainActivity
     .sdkID(String)
     .theme(NetspendSDKTheme)
     .branding(mapOf<String, Any>(
       "mfeLinkBank" to mapOf<String, Any>(
          "warningImage" to warningImageDataUrl
        ))
     )
)

Events

See Events above for the details.

Errors

See Errors above for the details.

iOS SDK

This part of the document provides information on using the Link Bank micro app with iOS SDK.

Usage

You provide linkBank as the purpose to use this micro app as shown in the sample code below:

let netspendViewController = NetspendSdk.shared.openWithPurpose(
    purpose: "linkBank",
    withPasscode: "abcd1234",
    usingParams: [
      "bankLinkId": bankLinkIdToStartRelinkFor
    ]
)

netspendViewController.delegate = self
present(netspendViewController, animated: true)
// OR
// navigationController?.pushViewController(netspendViewController, animated: true)
// OR any other standard UIViewController presentation mechanism
startActivity(intent)

Parameters

See Parameters above for the details.

Branding

See Branding above for the details.

Events

See Events above for the details.

Errors

See Errors above for the details.

Link Bank Micro App Sample Screen