Radar API
NearPay Radar helps you to monitor your Users,Devices,Business,Payments, Wallets, etc across all your systems to make sure your system is safe to operate and protect your customers and company from fraud & money laundering risk.
Authentication
NearPay uses API key & client id as an authentication method.
Base URL
https://sandbox-api.nearpay.io/radar/v1/
Financial Activity
User activity api allows you to record all financial important events through simple and powerful api.
Post payment request
Send the payment request before your gateway sends it to the bank to check for risk score
Request
{
"event_id": "b245f5e1-3a6a-4c9c-8a30-20bd8a590f34",
"event_timestamp": 1715969600,
"request": {
"id": "ebd6e0b5-3c9f-4a8a-9400-bc821cbd5c88",
"card_present": true,
"channel": "pos",
"entry_mode": "tapped",
"created_at": "2025-05-13T08:30:00.000Z",
"card": {
"id": "6f7e74c3-0c87-4e88-85d0-49b497ce0fdd",
"pan": "4111111111111111",
"brand": "Visa",
"last4": "1111",
"exp_month": "12",
"exp_year": "29",
"verification": "cvv"
},
"merchant": {
"id": "e85c33f5-5bd5-41ce-bf57-e2a875f9f107",
"business_id": "57c53b63-1087-48e8-8615-4b494d2d98c3"
},
"cardholder": {
"ip": "192.168.1.100",
"verification": "3ds",
"device": {
"id": "d087ea4e-2d85-4e8d-9a49-fb7cf1c5fa3b",
"os": "iOS",
"brand": "Apple",
"model": "iPhone 14",
"os_version": "17.1",
"sim": {
"carrier": "STC",
"country": "SA"
},
"trust": {
"rooted": false,
"tempered": false,
"hooked": false,
"debuggable": false,
"emulator": false,
"virtual": false,
"malware": false
}
}
},
"location": {
"latitude": 24.7136,
"longitude": 46.6753,
"mocked": false
}
}
}
Response 201
{
"risk": "low",
"score": 0
}
Post payment response
Send the payment response after you get the response from bank and before you send it to the customer.
Request
{
"event_id": "b245f5e1-3a6a-4c9c-8a30-20bd8a590f34",
"event_timestamp": 1715969600,
"response": {
"id": "03f0b1c9-7b22-4974-a790-b64ecf34a104",
"auth_code": "A1B2C3",
"response_code": "00",
"response_message": "Approved",
"responded_at": "2025-05-13T08:30:15.000Z"
}
}
Response 201
{
"risk": "low",
"score": 0
}
Post payment completed
Send the payment completed before you return it to the customer.
Request
{
"event_id": "b245f5e1-3a6a-4c9c-8a30-20bd8a590f34",
"event_timestamp": 1715969600,
"request": {
"id": "ebd6e0b5-3c9f-4a8a-9400-bc821cbd5c88",
"card_present": true,
"channel": "pos",
"entry_mode": "tapped",
"created_at": "2025-05-13T08:30:00.000Z",
"card": {
"id": "6f7e74c3-0c87-4e88-85d0-49b497ce0fdd",
"pan": "4111111111111111",
"brand": "Visa",
"last4": "1111",
"exp_month": "12",
"exp_year": "29",
"verification": "cvv"
},
"merchant": {
"id": "e85c33f5-5bd5-41ce-bf57-e2a875f9f107",
"business_id": "57c53b63-1087-48e8-8615-4b494d2d98c3"
},
"cardholder": {
"ip": "192.168.1.100",
"verification": "3ds",
"device": {
"id": "d087ea4e-2d85-4e8d-9a49-fb7cf1c5fa3b",
"os": "iOS",
"brand": "Apple",
"model": "iPhone 14",
"os_version": "17.1",
"sim": {
"carrier": "STC",
"country": "SA"
},
"trust": {
"rooted": false,
"tempered": false,
"hooked": false,
"debuggable": false,
"emulator": false,
"virtual": false,
"malware": false
}
}
},
"location": {
"latitude": 24.7136,
"longitude": 46.6753,
"mocked": false
}
},
"response": {
"id": "03f0b1c9-7b22-4974-a790-b64ecf34a104",
"auth_code": "A1B2C3",
"response_code": "00",
"response_message": "Approved",
"responded_at": "2025-05-13T08:30:15.000Z"
}
}
Response 201
{
"risk": "low",
"score": 0
}
Users Activity
User activity api allows you to record all users important events through simple and powerful api.
Post user activity request
Full User Activity
Request
{
"event_id": "1e360a3c-ea81-407e-ae59-642b2376cc41",
"event": "login_succeeded",
"event_timestamp": 1747114109,
"ip": "192.168.0.1",
"location": {
"latitude": 24.7136,
"longitude": 46.6753,
"mocked": false
},
"device": {
"id": "e44eaee7-b79c-43ef-a145-6510098b6d3f",
"os": "iOS",
"brand": "Apple",
"model": "iPhone 14",
"os_version": "16.0"
},
"browser": {
"name": "Safari",
"version": "16.0",
"user_agent": "Mozilla/5.0",
"accept_language": "en-US",
"content_language": "en",
"timezone": "Asia/Riyadh"
},
"user": {
"id": "c585bfe9-e270-413a-9932-934536e25a62",
"name": "User Name Example",
"email": "[email protected]",
"mobile": "+966555555555",
"type": "individual",
"status": "active"
}
}
Response 201
{
"risk": "low",
"score": 0
}
Minimal User Activity
Request
{
"event_id": "1e360a3c-ea81-407e-ae59-642b2376cc41",
"event": "login_succeeded",
"event_timestamp": 1747114109,
"user": {
"id": "c585bfe9-e270-413a-9932-934536e25a62"
}
}
Response 201
{
"risk": "low",
"score": 0
}
Business Activity API
User activity api allows you to record all business important events through simple and powerful api.
Post business activity request
Full business Activity
Request
{
"event_id": "0ba9c0e4-2b3e-4d8f-b28d-51b7ec04a561",
"event": "business_updated",
"event_timestamp": 1715969600,
"ip": "192.168.1.1",
"business": {
"id": "c1494dc4-70a2-4c1c-88a6-51cfb75860a1",
"registration_number": "CR-789456",
"registration_date": "2022-10-10T00:00:00.000Z",
"registration_country": "SA",
"registration_state": "Riyadh",
"name": "Bussiness Name Example",
"category": "Technology",
"type": "LLC",
"address": {
"line1": "Building 1",
"line2": "Zone A",
"city": "Riyadh",
"state": "Riyadh",
"country": "SA",
"zip": "11564"
},
"incorporation_certificate": "CERT12345",
"tax_id": "TAX67890",
"tax_id_type": "Zakat",
"tax_id_expiry_date": "2030-01-01T00:00:00.000Z",
"owners": [
{
"id": "e65dfebf-8028-4f7d-bd94-2c04b7a7d812",
"name": "Fahad",
"date_of_birth": "1980-05-05T00:00:00.000Z",
"mobile": "+966555555555",
"national_id": "1234567890",
"email": "[email protected]",
"passport_number": "P1234567",
"national_id_type": "nid",
"passport_expiry_date": "2032-05-05T00:00:00.000Z",
"national_id_expiry_date": "2030-12-31T00:00:00.000Z",
"nationality": "Saudi",
"gender": "male",
"marital_status": "single",
"occupation": "CTO",
"employer": "NextGen",
"income_source": "salary",
"income_range": "20000-30000",
"address": {
"line1": "Street 5",
"line2": "Apartment 10",
"city": "Riyadh",
"state": "Riyadh",
"country": "SA",
"zip": "11564"
}
}
],
"directors": [
{
"id": "d3eb0f0f-1b4d-42b1-b841-542e7dfb491e",
"name": "Mona",
"date_of_birth": "1985-06-15T00:00:00.000Z",
"mobile": "+966555555555",
"national_id": "9876543210"
}
],
"shareholders": [
{
"id": "a124f11d-b3c4-4fa2-a2c3-1e7c0c8dfb19",
"name": "Name Example",
"date_of_birth": "1990-07-20T00:00:00.000Z",
"mobile": "+966555555555",
"national_id": "1122334455"
}
],
"authorized_signatories": [
{
"id": "f59de345-1206-4f6d-84d6-4bb7cc45ad77",
"name": "Name Example",
"date_of_birth": "1988-08-25T00:00:00.000Z",
"mobile": "+966555555555",
"national_id": "5566778899"
}
],
"status": "active"
}
}
Response 201
{
"risk": "low",
"score": 0
}
Minimal business Activity
Request
{
"event_id": "0ba9c0e4-2b3e-4d8f-b28d-51b7ec04a561",
"event": "business_registered",
"event_timestamp": 1715969600,
"business": {
"id": "c1494dc4-70a2-4c1c-88a6-51cfb75860a1",
"owners": [
{
"id": "e65dfebf-8028-4f7d-bd94-2c04b7a7d812",
"name": "Owner Name Example",
"date_of_birth": "1980-05-05T00:00:00.000Z",
"mobile": "+966555555555",
"national_id": "1234567890"
}
]
}
}
Response 201
{
"risk": "low",
"score": 0
}