Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yonatankinfe/yaya-wallet-webhook-implementation

This project implements a webhook endpoint for YaYa Wallet's transaction notification system. It receives transaction notifications, verifies their authenticity, and stores them in a PostgreSQL database.
https://github.com/yonatankinfe/yaya-wallet-webhook-implementation

Last synced: about 2 months ago
JSON representation

This project implements a webhook endpoint for YaYa Wallet's transaction notification system. It receives transaction notifications, verifies their authenticity, and stores them in a PostgreSQL database.

Awesome Lists containing this project

README

        

# YaYa-Wallet-Webhook-Implementation
This project implements a webhook endpoint for YaYa Wallet's transaction notification system. It receives transaction notifications, verifies their authenticity, and stores them in a PostgreSQL database.
# Features
+ Webhook endpoint for receiving transaction notifications
+ HMAC SHA256 signature verification
+ Replay attack prevention using timestamp validation
+ PostgreSQL database storage
+ Docker containerization
+ Flask-based REST API

# Prerequisites
+ Docker and Docker Compose
+ Python 3.9+
+ PostgreSQL

# Installation
Clone the repository:

bashCopy git clone https://github.com/Yonatankinfe/YaYa-Wallet-Webhook-Implementation
cd YaYa-Wallet-Webhook-Implementation

Build and run using Docker Compose:

bashCopydocker-compose up --build
The application will be available at http://localhost:5000
# Configuration
Environment variables (set in docker-compose.yml):

SECRET_KEY: Secret key for signature verification(i have set my own secret key so change it)
POSTGRES_USER: Change Database user
POSTGRES_PASSWORD: Change Database password
POSTGRES_DB: Chnage Database name
# Implementation Approach

## Replay Attack Prevention:

+ Implement 5-minute timestamp tolerance
+ Verify timestamp is part of signature

## Database Storage:

+ Use SQLAlchemy ORM for database operations
+ Store all transaction fields
+ Implement proper error handling

# Security Considerations

+ Implements signature verification
+ Prevents replay attacks
+ Validates input data