Purchase of applications
Loan applications are distributed in the system in two queues - as a “new client” and as an “existing client”
  1. 1.
    as a “new client” - the borrower whose application we offer is new to the buyer
  2. 2.
    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:
  1. 1.
    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;
  2. 2.
    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
1
{
2
"id": 52,
3
"amount": 100,
4
"term": 64000,
5
"refuse_reason": {
6
"id": 1,
7
"label": "ref_first"
8
},
9
"purpose": {
10
"id": 1,
11
"label": "purpose_first"
12
},
13
"requisites": {
14
"psl_number": "11235813"
15
}
16
}
Copied!
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
+
price
int
the price for which the application is bought, if the key is missing or the value is 0, the default price will be used
-
url
string
the link where you need to redirect the borrower after purchasing the application
+
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.
1
{
2
"status":2,
3
"price":100
4
"url": "https://a-partner.ninjalender.online/accept_borrower/"
5
}
Copied!
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
1
{
2
"status":1
3
}
Copied!
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 modified 1yr ago
Copy link