Pre qualification flow

πŸ“˜

Pre-qualification flow is optional

You don't need to explicitly build a separate pre-qualification flow for your customers. The standard checkout widget will automatically prompt the customer to pre-qualify if they have not been approved with limits yet.

Customer Intent token

To generate a customer intent token make a POST request to /v3/customers/{{CUSTOMER_ID}}/intent. See API reference guide at Generate customer intent

curl --request POST 
--url 'https://api.sandbox.slope.so/v3/customers/{{CUSTOMER_ID}}/intent' \
--header 'Authorization: Basic {{BASE_64_ENCODED_USER_AND_PASS}}'

Frontend initialization

In the slope.js file set the flow param to pre_qualify like:

window.initializeSlope({
  flow: 'pre_qualify',
  intentSecret: '{{CUSTOMER_INTENT_SECRET}}',
  // other params below
})

Sandbox testing

In the sandbox environment, you can enter any information in the form fields. To pass underwriting and receive limits, connect any bank account using the username custom_high_bal and any password when prompted during the Plaid Link flow. To receive a rejection, simply use the default username user_good and pass_good in the Plaid Link flow.

Callback events

Upon a completion of pre-qualification, you'll receive an onSuccess() with the updated customer object. You can also make a backend GET API request to the customers endpoint for the same object. See API reference doc on GET customers