HomeGuidesAPI Reference
Guides

Enroll via Nexus

Already know the consumer, their loans, and desired repayment plan in Payitoff? The Nexus.studentLoanEnroll workflow jumps right to enrolling them in their selected plan.

📘

Please Note

This workflow is only available after creating consumers via the v3 REST API

After creating a consumer and their debts, you can embed Nexus.studentLoanEnroll into your website! Below is the Enroll flow your Consumer will go through:

After embedding our widget the consumer can go through the enrollment flow.

Coming Soon:

Here to Help: Checking Enrollment-Readiness for a Consumer

Checking if all the consumer fields required to launch Nexus.studentLoanEnroll are present before you start the workflow is coming soon. If the consumer is ready to launch Nexus.studentLoanEnroll, you'll see "enrollment_missing_fields": []. If not, it will communicate what fields are missing that you will need to update via the REST v3 API.

Until this is complete, see what fields are required to enroll.

Launch Nexus.studentLoanEnroll:

Nexus.studentLoanEnroll expects to receive a single options object as a parameter.

As a reminder, a plan where the consumer is eligible must be included in the options before an Enrollment can be launched.

We recommend adding an onEvent callback to receive any errors and be notified of your consumers activity within Nexus. If your consumer is missing any required fields for enrollment, you will find out from an init_failed event sent to the onEvent callback.

The code below will launch the Nexus widget:

Nexus.studentLoanEnroll({
  // e.g. 'save', 'paye', 'ibr', 'icr', etc.
  plan: 'save',
  // a callback to be notified of errors or other important events within the Nexus widget
  onEvent: handleEvent,
})

Nexus Events

See our guide for using onEvent callbacks. Here is an example of the workflow_finished event.

When your consumer completes an enrollment the below is an example of the event sent to your onEvent callback:

{
  nexusEvent: {
    name: "workflow_finished",
    workflow: "student_loan_enroll",
    consumer: { uuid: "dceea28c-2245-41a8-a558-fef1643f99b2" },
    metadata: {
      enrollment: {
        created_at: "2021-05-07T16:36:12.051603Z",
        estimated_approval_date: "2023-12-15",
        id: 23,
        repayment_plan: {
          description: "Saving on a Valuable Education (SAVE)",
          type: "save",
        },
        status: {
          updated_at: "2021-05-07T16:36:12.055132Z",
          description: "Submission in Progress",
          type: "pending",
        },
        uuid: "c399298f-47ef-4fab-85b3-6244fca22448",
      },
    },
  },
}