Skip to main content

Sunbit Pre-qualification

Sunbit Pre-Qualification allows your customers to see what they qualify for before making a purchase.

Pre-Qualification URL#

The Pre-Qualification URL API can be used to retrieve and send a Pre-Qualification URL to a customer.

PUT https://api-sandbox.sunbit.com/purchase/api/v1/online-link#

This 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 Headers#

PropertyRequiredTypeDescription
sunbit-keyyestextProvided to you by Sunbit

Body#

AttributeRequiredTypeDescription
locationyestextStore ID, or Store Name, or any other identifier of the location.
representativeEmailnotextEmail address of the representative/associate.
representativeFirstNamenotextFirst Name of the representative/associate.
representativeLastNamenotextLast Name of the representative/associate.
referralnotextAn 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.
customerPhoneNumbernotextPhone number associated with the requested pre-qualification link.
customerDetailsnoCustomerDetailsSee CustomerDetails.
sendSMSnobooleanFalse if Sunbit should not send the link to the customer. Default to True
departmentIdnonumberThis 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.
sourcePlatformnotextThe originating platform on whose behalf the API request is being made, if different from the alliance.

Response#

The response is a JSON with a URL link:

AttributeTypeDescription
urltextURL for Pre-Qualification

Example#

{"url":"<sunbit-prequal-link>"}

Errors#

Error CodeMessageDescription
403Bad credentialsSunbit key or secret is not valid
404Not FoundRetailer mapped to a given alliance and location is not found
422Unprocessable entityMissing onlineApplication for retailer
422Unprocessable entityDisabled onlineApplication for retailer
500Internal Server ErrorSomething went wrong on Sunbit's side

Sunbit also provides webhooks to notify your application when an event happens.