API Traffic

Last updated last month

Describes API calls to a Lender

post
Request to Lender's endpoint

https://lender.tld
/lender/api/endpoint
You need to provide API endpoint that receives POST request from Cashcat.
Request
Response
Body Parameters
timestamp
required
integer
unix timestamps
affiliate
required
object
Affiliate object
lead
required
object
Lead object, contains Person, Documents and Loan objects.
200: OK
​
302: Found
​
400: Bad Request
​
403: Forbidden
​
404: Not Found
​
500: Internal Server Error
​

Request JSON structure:

Field

Type

Required

Description

timestamp

int

yes

UNIX timestamp

affiliate

object

yes

describes affiliate settings and callbacks URL's

lead

object

yes

describe Lead data, consists 3 main objects: Person, Documents, Loan

Affiliate JSON structure

Field

Type

Required

Unique

Description

name

string 64

yes

​

affiliate name, can be cashcator other affiliate name (there is Affiliate program)

website

url

yes

​

Cashcat operate in several countries, it can be different only if Lender operate in different countries too

postback_url

url

yes

​

Postback URL. After positive or negative design about Lead, Lender needs to send postback to this URL. Please read more in postback section

request_id

str

16

yes

Unique ID of conversion, used in postback​

Person JSON structure

Field

Type

Required

Description

first_name

string 30

yes

First name

middle_name

string 30

yes

Middle name

last_name

string 30

yes

Last name

birth_date

date in ISO format

yes

Birth date in format YYYY-MM-DD

gender

string 5

yes

Gender, based on 9-th char of the tax_number. Possible values: Male, Female

country_residence

string 64

yes

Residence country, if Lender operates in one country it will be same all the time

home_town

string 64

yes

Residence city with localized (translated) value. For Ukraine - localization is ru, for other countries - en

mobile_phone

sting 10

yes

Domestic mobile phone number without country phone code. For every country verified with mobile operators' list (first 3 chars). The number is not verified by SMS.

email

email

yes

Email. Not verified by sending verification email.

employer_name

string 128

yes

Employer name. Input from user. Please, verify for injections from your side.

Documents JSON structure (array of the objects)

Field

Type

Required

Description

type

string 32

yes

Please, look for possible values in the table below

id

string 32

yes

Document number. Input from a User. Please verify for injections from your side.

check_sum

string 32

​

Verification for tax_number or other documents numbers with existing verification rules for checksum. User can't send not valid tax number.

Documents type values:

Country

Type Value

Description

Philippines

SSS

Social Security System ID

​

TIN

Tax Identification Number

Ukraine

passport

National Passport

​

tax_number

Tax Identification Number

Mexico

passport

National Passport

South Africa

passport

National Passport

Loan JSON structure

Field

Type

Required

Description

amount

float

yes

Requested amount

currency

3-digit ISO code

yes

Currency, same across one-country Lender

term

int

yes

Requested loan term

duration_period

string 16

yes

Duration period, always days

purpose

sting 64

yes

Purpose from list below

purpose_detailed

string 128

yes, if purpose value is Other purpose

User input of custom purpose, not included in the list purpose

type

sting 32

yes

User's choice of requested distibution type. Possible values: Bank Card, Bank Account, Cash. You could ignore this parameter if you dosn't support many distribution types.

Purpose List Values

A User could select Other purpose option from the list and provide purpose_detailed

Value

Medicine

Urgent needs

Repayments to another loan

Home repairs

Business needs

Food and household goods

Holidays, vacations or recreation

Other purpose

Example of JSON structure

POST from Cashcat
HTTP response from Lender
{
"timestamp": 1549291928597,
"affiliate": {
"name": "cashcat",
"website": "https://cashcat.ph",
"postback_url": "https://cashcat.ph/postback/lender-url/",
"request_id": "wmnw3v6w08"
},
"lead": {
"person": {
"first_name": "Tommy",
"middle_name": "",
"last_name": "Hilfiger",
"birth_date": "1994-06-09",
"gender": "Male",
"country_residence": "Philippines",
"home_town": "Quezon City",
"mobile_phone": "00011122233",
"email": "test3838@test.com",
"employer_name": "Manila Bank"
},
"documents": [
{
"type": "TIN",
"id": "123243212"
"check_sum": "verified"
},
{
"type": "SSS",
"id": "3184710691",
}
],
"loan": {
"amount": 5000.0,
"currency": "PHP",
"term": 9,
"duration_period": "days",
"purpose": "Other purpose",
"purpose_detailed": "Urgent Needs",
"type": "Bank Account"
}
}
}

We expect that your backend will handle request and response with basic https codes like that:

200 - correct request
404 - wrong destination endpoint
500 - internal server error while processing request

Retry Policy

Cashcat will send retries of every http POST request if request will be unsuccessful (host not found, 500, network errors, etc.) with delay in 5 minutes. Each request has 5 attempts of the retries. After 5-th attempt, Cashcat will stop retries and will start it only in manual mode from Cashact's backend.