Radar Event API
NearPay Radar helps you monitor users, devices, businesses, and payments across all your systems β protecting your customers and company from fraud and money-laundering risk.
Warning: As a third party connected to nearpay APIs, upon usage, you agree to uphold the upmost security standards in accessing and using these APIs. These APIs share information that is confidential to you as a third party connected to nearpay. This information must be stored and used in a secure manner.
Overview
The Radar Event API evaluates events in real-time against configurable rules and detectors to calculate risk scores and recommend actions. It supports three categories of events:
- User Events β Authentication, session management, and account activities (e.g.
login_succeeded,registration_failed) - Business Events β Business entity registration and updates (e.g.
business_registered) - Financial Events β Payment transactions, refunds, and chargebacks (e.g.
payment_requested,payment_completed)
How It Works
- Send an event β POST any user, business, or financial event to
/event - Radar scores it β The API evaluates the event against detectors, scenarios, and weighted rules
- Receive an action β The response returns a recommended
alloworblockaction - Act on it β Block or proceed with the transaction based on the response
Base URL
https://sandbox-api.nearpay.io/radar/v1/
Authentication
All requests require an API key passed in the request header.
| Header Name | Type | Required | Description |
|---|---|---|---|
api-key | string | Yes | Your Radar API key. Must be at least 60 characters. |
Quick Start
The minimal request to record a user login event and get a risk score:
POST/event
Create Event
Request
POST
/event{
"event": "login_succeeded",
"event_timestamp": 1715969600000,
"user": {
"id": "1d5a2d25-1ac9-455b-9a5a-aa4027356ce5",
"email": "[email protected]"
},
"device": {
"id": "d087ea4e-2d85-4e8d-9a49-fb7cf1c5fa3b",
"os": "iOS",
"rooted": false,
"emulator": false
}
}
Response:
Response 201
{
"action_id": "string",
"action": "allow",
"state": "normal"
}
If action is block, reject the operation. If allow, proceed normally.
Next Steps
- API Reference β Full endpoint documentation, request schema, and all field definitions
- Integration Guide β Use cases, validation rules, error handling, and best practices