Sunbit Pre-qualification
Sunbit Pre-Qualification allows your customers to see what they qualify for before making a purchase.
#
Pre-Qualification URLThe Pre-Qualification URL API can be used to retrieve and send a Pre-Qualification URL to a customer.
https://api-sandbox.sunbit.com/purchase/api/v1/online-link#
PUTThis endpoint can be used to obtain a pre-qualification link. Once you have the link you can display it on your platform or send it to your customers using your preferred communication method (usually email or text message).
Please include representative details such as id, name and email which will enable Sunbit to improve the experience for associates and help them close more transactions.
Important
If customer details are provided in the request, the pre-qualification application will be pre-filled for the customer's ease of use.
Important
This is a new version of the Sunbit Prequalification API and the following update is available: "advisorEmail" attribute in the request body has been replaced with "representativeEmail" in order to be consistent across all APIs and SDKs. Please upgrade to the latest version by 12/31/2022.
You can choose to send the URL from your platform or ask Sunbit to send an SMS to the customer by specifying this in the request.
curl "https://api-sandbox.sunbit.com/purchase/api/v1/online-link" -H 'Content-Type: application/json' -H 'Accept: application/json;charset=UTF-8' -X PUT -H "sunbit-key: YOUR_KEY" --data-binary $'[{ "location": "myLocation", "representativeEmail": "john@example.com", "referral": "myReferral"}]'
#
Request HeadersProperty | Required | Type | Description |
---|---|---|---|
sunbit-key | yes | text | Provided to you by Sunbit |
#
BodyAttribute | Required | Type | Description |
---|---|---|---|
location | yes | text | Store ID, or Store Name, or any other identifier of the location. |
representativeEmail | no | text | Email address of the representative/associate. |
representativeFirstName | no | text | First Name of the representative/associate. |
representativeLastName | no | text | Last Name of the representative/associate. |
referral | no | text | An external transaction identifier sent by the integrator for Pre-Qualification or Text to Pay-Over-Time and used to match the webhook to the request. |
customerPhoneNumber | no | text | Phone number associated with the requested pre-qualification link. |
customerDetails | no | CustomerDetails | See CustomerDetails. |
sendSMS | no | boolean | False if Sunbit should not send the link to the customer. Default to True |
departmentId | no | number | This parameter create a differentiation of offers within a certain merchant. The DepartmentID should be provided to you by Sunbit. Please refrain from sending data in this field which was not provided for you. |
sourcePlatform | no | text | The originating platform on whose behalf the API request is being made, if different from the alliance. |
#
ResponseThe response is a JSON with a URL link:
Attribute | Type | Description |
---|---|---|
url | text | URL for Pre-Qualification |
#
Example{"url":"<sunbit-prequal-link>"}
#
ErrorsError Code | Message | Description |
---|---|---|
403 | Bad credentials | Sunbit key or secret is not valid |
404 | Not Found | Retailer mapped to a given alliance and location is not found |
422 | Unprocessable entity | Missing onlineApplication for retailer |
422 | Unprocessable entity | Disabled onlineApplication for retailer |
500 | Internal Server Error | Something went wrong on Sunbit's side |
Sunbit also provides webhooks to notify your application when an event happens.