HomeGuidesAPI Reference

Link

How to get the most out of Nexus.link

To get the most accurate and up-to-date loan portfolio for your Borrower, you should use Nexus.link to prompt your Borrower to connect all the Servicers they pay monthly. We'll do the heavy lifting of building their entire loan portfolio for you.

🚧

Nexus.linkServicers deprecated. Use Nexus.link instead.

Originally, Nexus launched with servicer account-linking offered through the linkServicers function. That function has now been renamed to Nexus.link. This isn't a breaking change at this point, as the linkServicers function call will still succeed. But we will remove linkServicers in a future update, so we encourage you to update your code to call Nexus.link at this time.

Calling Nexus.link

Nexus.link expects to receive a single options object as a parameter. This options object allows you to specify an optional onEvent callback to take actions based on your borrower's activity within Nexus:

// Assuming you have a button your Borrower can click to link Servicers
let linkButton = document.querySelector('#nexus-link-button')

// Attach click handler to invoke Nexus.link
linkButton.addEventListener('click', e => {
  Nexus.link({
    // the function to call when the the borrower is finished or closes Nexus early
    onEvent: handleLinkEvent,
  })
})
`Nexus.link` asking a borrower to connect their servicer account(s).

Nexus.link asking a borrower to connect their servicer account(s).

onEvent Callback

When Nexus transmits an event, your onEvent callback will be called with one an argument, a JavaScript object with a top-level property nexusEvent containing an object with the details of the event:

{
  nexusEvent: {
    name: "workflow_finished",
    workflow: "link",
    consumer: {
      uuid: "dceea28c-2245-41a8-a558-fef1643f99b2"
    },
    metadata: {}
  }
}

Nexus.link Events

nexusEvent.nameDescriptionnexusEvent.metadata
workflow_finishedThe borrower successfully linked student loans with at least one servicer. (Use the Get Portfolio API endpoint for details.)none
login_errorWhen a consumer fails login, we will send an event with one of the following reasons in the metadata: invalid_credentials, challenge_failed, servicer_error, or login_error.reason and servicer. Servicer will include the name and the servicer_uuid.
servicer_linkedWhen a consumer successfully links a servicer, a servicer_linked event will fire.servicer. Servicer will include the name and the servicer_uuid.
quitThe borrower closed Nexus without linking any student loans.none

📘

If you're relying on Nexus to create borrowers for you, you will want to save the consumer.uuid that is returned so you can make API calls on behalf of your borrowers.

📘

Knowing where your borrower left off

We know it can be helpful to know if your borrower quit a workflow you'd like them to complete to keep using your products and services. To that end, we recommend you catch the quit event. This can provide you a helpful trigger point for notifying your users to come back and otherwise prompt them to finish linking their servicer accounts.

Simulate authentication scenarios

While you're in development/testing against our sandbox environment, Nexus helps you simulate a few different user experience scenarios.

📘

Remember that requests made in our Sandbox environment do not go through to the actual servicers, they return some form of dummy data. Only requests in production will go to a servicer. To use curated dummy data, check out our guide to using data snapshots.

762

Nexus.link asking a user to login.

Login without challenge question (default experience)

It's possible to simulate authenticating (or re-authenticating) with a servicer and not being asked a challenge question. This is the default expectation for Nexus, so any username and password value, other than the special values detailed below, will result in this workflow.

Simulate a failed login

It's possible to simulate the experience of a user entering invalid credentials for their servicer(s). You can test the error state with one or both of the following special credentials:

  • username: bad
  • password: bad

You do not need to use both values—sending either bad as the username or password value will result in failing to connect to a servicer.

Simulate login with challenge question

It's possible to simulate the experience of authenticating with a servicer that asks the user to answer a challenge question. To do so, use the following special credentials:

  • username: challenge
  • password: any password value will be accepted
758

Nexus.link presenting a challenge question to authenticate an account.

Simulate a failed challenge

It's possible to simulate the experience of authenticating with a servicer that asks the user to answer a challenge question, and failing to answer the question correctly. To do so, use the following special credentials:

  • username: fail-challenge
  • password: any password value will be accepted

Nexus.link simulated authentication scenarios

UsernamePasswordExperience
badbadLogin will not succeed. Only 1 input needs to have the value bad for login to fail.
challengeany valueLogin and asked a challenge question.
fail-challengeany valueLogin, asked a challenge question, and fail the challenge answer.
any valueany valueLogin successfully without a challenge question.

What’s Next