-
-
KING-RAJ PaySentinel architecture: React interface, backend services, PayPal Sandbox, policy engine and audit controls.
-
KING-RAJ deterministic policy evaluation: AI provides advice while security rules retain payment decision authority.
-
Recorded PayPal Sandbox payment capture evidence, including workflow execution and webhook-related verification.
-
Recorded test summary: 129 passed, 0 failed and 1 skipped, with authentication and security verification evidence.
Inspiration
Digital payments are becoming increasingly complex, and security decisions must be fast, explainable, and reliable. Traditional rule-based systems provide predictable enforcement, while AI can help analyze suspicious activity and provide additional context.
I created KING-RAJ PaySentinel to explore how deterministic security policies and AI-assisted risk advisory can work together in a PayPal-integrated payment workflow.
The goal is to build a transparent, auditable payment-security prototype in which AI supports decision-making without replacing essential security controls.
What it does
KING-RAJ PaySentinel is an AI-assisted payment-security and transaction-monitoring prototype built around PayPal Sandbox.
Its core capabilities include:
- PayPal Sandbox Integration: Demonstrates payment order creation, approval, capture, and transaction lifecycle handling.
- KING-RAJ Policy Engine: Uses deterministic policy rules to evaluate payment-related conditions.
- AI Risk Advisory: Provides an advisory layer for interpreting transaction risks, separate from authoritative payment decisions.
- Payment Monitoring: Tracks transaction states and supports operational visibility.
- Webhook Security: Includes verification and handling controls for PayPal webhook events.
- Audit Evidence: Maintains structured records to support traceability and investigation.
- Access Security: Incorporates authentication, authorization, and request-protection mechanisms.
The system is designed to demonstrate a security-first approach in which deterministic controls remain authoritative.
How I built it
The prototype combines a modern web interface with a Node.js and TypeScript backend.
Key technologies include:
- React and TypeScript for the application interface
- Node.js for backend services
- SQLite for local transaction and audit data
- PayPal Sandbox APIs for payment integration
- KING-RAJ
.krpolicy rules for deterministic decision logic - AI-assisted analysis for transaction-risk advisory
- Git and GitHub for source-code publication
The implementation focuses on separating payment operations, policy evaluation, advisory analysis, and audit evidence.
Challenges I ran into
One of the biggest challenges was ensuring that AI-generated recommendations could not override deterministic security decisions.
Other challenges included:
- Handling asynchronous PayPal payment and webhook events
- Managing payment capture and settlement states consistently
- Designing fail-safe behavior for unexpected or invalid inputs
- Protecting authentication and sensitive application data
- Testing payment workflows safely using sandbox transactions
- Preparing a reproducible public release without exposing development secrets or private records
Accomplishments that I'm proud of
I developed an integrated payment-security prototype that combines PayPal Sandbox workflows, deterministic policy evaluation, transaction monitoring, and audit-oriented design.
I also prepared a public source-code release with licensing information and documented setup instructions.
The project demonstrates how AI advisory and deterministic controls can coexist within a payment-security architecture.
What I learned
This project reinforced the importance of separating advisory intelligence from authoritative security enforcement.
I also learned more about PayPal API integration, webhook lifecycle handling, defensive backend design, transaction-state consistency, automated testing, and responsible open-source publication.
What's next
Future development priorities include:
- Improving real-time transaction-risk analysis
- Expanding automated security and integration testing
- Adding more advanced fraud-detection signals
- Improving audit reporting and operational dashboards
- Integrating a production-ready identity and access-management solution
- Performing independent security assessments before considering production use
Important: KING-RAJ PaySentinel is a hackathon prototype using PayPal Sandbox. It is not a production-certified payment-processing or fraud-prevention system.
Source Code
https://github.com/rajkumargond53-wq/KING-RAJ-PaySentinel
Demo Video
Built With
- ai
- engine
- express.js
- github
- javascript
- king-raj
- node.js
- paypal
- paypal-sandbox
- policy
- react
- rest-api
- sqlite
- typescript