Skip to Content
WebhooksOrder Created

Order Created

Description

This event is triggered when a new order is created.

Triggers

  • Order created

Webhook URL

https://example.com/api/webhooks/order-created

Method

POST

Request

{ "id":"434-4324-4324-4ffas", "status":"PRE-APPROVED", "customer": { "salary": 25000, "id": 1005530090, "id_version": 1, "first_name_ar": "محمد", "father_name_ar": "احمد", "grand_name_ar": "محمد", "family_name_ar": "ابراهيم", "first_name_en": "MOHAMED", "father_name_en": "AHMED", "grand_name_en": "MOHAMED", "family_name_en": "IBRAHIM", "two_names_ar": "محمد احمد", "two_names_en": "MOHAMED AHMED", "full_name_ar": "محمد احمد ابراهيم", "full_name_en": "MOHAMED AHMED IBRAHIM", "gender": "M", "id_issue_date_g": "2017-08-20", "id_issue_date_h": 14381128, "id_expiry_date_g": "2040-03-24", "id_expiry_date_h": 14620311, "language": "A", "nationality": 113, "nationality_ar": "العربية السعودية", "nationality_en": "Saudi Arabia", "dob_g": "1975-03-24", "dob_h": 12940312, "card_issue_place_ar": "الرياض 1", "card_issue_place_en": "Riyadh 1", }, "masdr": { "basicWage": 530, "housingAllowance": 0, "otherAllowance": 1267, "fullWage": 1797, "employerName": "الخدمات البحري العامليه", "dateOfJoining": "01/04/2005", "workingMonths": "7", "gosinumber": "1234567890", "legalEntity": "منشأة محدودة", "occupation": { "arabic": "أمين مخزن", "english": "Storekeeper" }, "occupationCode": 432101 }, "product": { "category": 12, "id": 3, "name": "Personal Finance", "managementFeesPercentage": 1, "managementFeesMaxAmount": 30000, "brokerageFeesPercentage": 1, "brokerageFeesMaxAmount": 25000, "advancePayment": 50000, "interestRateMin": 1, "debtBurdenRatio": 33, "interestRateMax": 3, "financeAmountMin": 10000, "financeAmountMax": 1000000 }, "loan": { "preferredAmount": 376153, "period": 48, "MaxRepaymentPeriod": 1, "SalaryBank": { "id": 1, "name": "Riyadh Bank" } }, "engine": { "totalAmountPaid": 324324, "brokerageFees": 323, "totalAmountRecieved": 322324, "managementFees": 123, "apr": 6, "monthlyInstallment": 500, "eligibility": true, "rules": { "WATCH_LIST_CHECK": true, "CREDIT_SCORE_CHECK": true, "FRAUD_CHECK": true, "CUSTOMER_DUE_DILIGENCE": true, "CUSTOMER_AGE_CHECK": true, "CUSTOMER_SALARY_CHECK": true, "SIMAH_JUDGEMENTS_CHECK": true, "SIMAH_CHEQUE_BOUNCE_CHECK": true, "SIMAH_CREDIT_SCORE_CHECK": true } } }
Request
{...

Request Parameters

ParameterTypeDescription
customerObjectCustomer information
productObjectProduct information
loanObjectLoan information
engineObjectTamawal Decision Engine information

Request Description

Customer Parameters

ParameterTypeDescription
salaryNumberSalary
idNumberID
id_versionNumberID version
first_name_arStringFirst name in Arabic
father_name_arStringFather name in Arabic
grand_name_arStringGrand name in Arabic
family_name_arStringFamily name in Arabic
first_name_enStringFirst name in English
father_name_enStringFather name in English
grand_name_enStringGrand name in English
family_name_enStringFamily name in English
two_names_arStringTwo names in Arabic
two_names_enStringTwo names in English
full_name_arStringFull name in Arabic
full_name_enStringFull name in English

Masdr Parameters

ParameterTypeDescription
basicWageNumberBasic wage
housingAllowanceNumberHousing allowance
otherAllowanceNumberOther allowance
fullWageNumberFull wage
employerNameStringEmployer name
dateOfJoiningStringDate of joining
workingMonthsStringWorking months
gosinumberStringGosinumber
legalEntityStringLegal entity
occupationObjectOccupation information
occupationCodeNumberOccupation code

Product Parameters

ParameterTypeDescription
categoryNumberCategory
idNumberID
nameStringName
managementFeesPercentageNumberManagement fees percentage
managementFeesMaxAmountNumberManagement fees max amount
brokerageFeesPercentageNumberBrokerage fees percentage
brokerageFeesMaxAmountNumberBrokerage fees max amount
advancePaymentNumberAdvance payment
interestRateMinNumberInterest rate min
debtBurdenRatioNumberDebt burden ratio
interestRateMaxNumberInterest rate max
financeAmountMinNumberFinance amount min
financeAmountMaxNumberFinance amount max

Loan Parameters

ParameterTypeDescription
preferredAmountNumberPreferred amount
periodNumberPeriod
MaxRepaymentPeriodNumberMax repayment period
SalaryBankObjectSalary bank information

Engine Parameters

ParameterTypeDescription
totalAmountPaidNumberTotal amount paid
brokerageFeesNumberBrokerage fees
totalAmountRecievedNumberTotal amount received
managementFeesNumberManagement fees
aprNumberAnnual percentage rate
monthlyInstallmentNumberMonthly installment
eligibilityBooleanEligibility status
rulesObjectRules information

Rules Parameters

ParameterTypeDescription
WATCH_LIST_CHECKBooleanWatch list check
CREDIT_SCORE_CHECKBooleanCredit score check
FRAUD_CHECKBooleanFraud check
CUSTOMER_DUE_DILIGENCEBooleanCustomer due diligence
CUSTOMER_AGE_CHECKBooleanCustomer age check
CUSTOMER_SALARY_CHECKBooleanCustomer salary check

Response

ℹ️

Please Notice The webhook response must be in the following format.

{ "totalAmountPaid":324324, "brokerageFees":323, "totalAmountRecieved":322324, "managementFees":123, "apr":6, "monthlyInstallment":500, "eligibility": true }

Response Parameters

ParameterTypeDescription
totalAmountPaidNumberTotal amount paid
brokerageFeesNumberBrokerage fees
totalAmountRecievedNumberTotal amount received
managementFeesNumberManagement fees
aprNumberAnnual percentage rate
monthlyInstallmentNumberMonthly installment
eligibilityBooleanEligibility status
Last updated on