Purchase of applications
Loan applications are distributed in the system in two queues - as a “new client” and as an “existing client”
as a “new client” - the borrower whose application we offer is new to the buyer
as an “existing client” - the borrower whose application we offer is already in the buyers customer base.
That is, at first the system pings buyers, offering them to buy an application at the price of “new client”. And if the application didn’t suit anyone, the system re-pings the customers and offers them to buy the application at the price of the “existing client”.
To purchase applications in the system, you need:
Set request purchase parameters in the partner’s personal account: specify the minimum and maximum term, application amount; choose participation in the distribution queues of new and repeated clients and specify the price for them; choose a template to which the application should correspond;
Create two webhooks: first - for the requests with proposals to purchase applications as a "new client"; second - for the requests with proposals to purchase applications as a "existing client";
Working with webhooks occurs according to the following scenario:
1.Receiving an application
The application is sent in the following JSON format
Key
Type
Description
id
int
internal application identifier
amount
numeric
application amount
term
numeric
term of application indicated in seconds
refuse_reason
json.{}
refuse reson
refuse_reason.id
int
id of refuse reason
refuse_reason.label
string
name of refuse reason
purpose
json.{}
loan purpose
purpose.id
int
id of loan purpose
purpose.label
string
name of loan purpose
requisites
json.{}
application requisites
Details of the requisites of applications can be found in the partner’s personal account or by receiving details according to the template selected in the purchase conditions.
2. As a response to ping, the Ninja Lender system accepts JSON with a status of 200. JSON should consist of the following properties:
Name
Type
Description
Required
status
int
response to the offer to buy an application: 1 - decline offer 2 - accept offer
+
url
string
the link where you need to redirect the borrower after purchasing the application
-
offer
JSON.object
Object with amount and term that you offer to a borrower
-
Offer
amount
int
Offered amount
+
term
int
Offered term (in seconds)
+
Below is an example of a positive response with a price. In case of such a response, the application is considered to be sold, and the borrower will be forwarded on the url.
Below is an example of a negative response. In case of such a response system will consider that you have declined the purchase of this application
If the request is “not delivered”, the system will repeat the request 3 more times with interruptions of 20 seconds. If the request is still “not delivered”, the system will perceive this as a decline answer.
Last updated