A secure, robust REST API designed to handle identity management and core financial data retrieval for the Cyber Pay platform. Built with ASP.NET Core, this service manages the full user lifecycle—from registration and email verification to secure login and profile updates—secured via JWT (JSON Web Tokens).
This API acts as the central gatekeeper for the Cyber Pay ecosystem. It ensures that only authenticated users can access sensitive endpoints. Beyond authentication, it integrates with external services to validate bank details, fetch geographical data, and handle background messaging tasks.
- Secure Authentication: User registration and login protected by JWT (JSON Web Tokens).
- Account Recovery: Complete "Forgot Password" and "Reset Password" flows with secure token generation.
- Email Verification: Integration with SendGrid to send account confirmation and OTP emails.
- Profile Management: Endpoints for users to update their personal information securely.
- Bank Account Resolution: Resolve and verify bank account names using account numbers.
- Data Lookup: Retrieve lists of supported banks, countries, and business types.
- Account Creation: Standardized endpoints to onboard new user accounts into the system.
- Background Jobs: Integrated Hangfire for reliable background task processing (e.g., sending emails asynchronously).
- Logging: centralized logging using NLog for monitoring and debugging.
- API Documentation: Fully interactive API documentation via Swagger/OpenAPI.
- Framework: ASP.NET Core Web API
- Security: ASP.NET Identity, JWT Bearer Authentication
- Database: SQL Server / Entity Framework Core
- Email Service: SendGrid
- Background Tasks: Hangfire
- Logging: NLog
- Documentation: Swagger UI
Follow these steps to set up the API locally for development and testing.
- .NET SDK (Version 6.0 or later recommended)
- SQL Server (LocalDB or Docker container)
- SendGrid API Key
- Clone the repository:
git clone https://github.com/Otormin/CyberpayAuthenticationAPI.git
cd CyberpayAuthenticationAPI
- Configure AppSettings:
Open
appsettings.jsonand update the following connection strings and keys:
{
"ConnectionStrings": {
"DefaultConnection": "Server=YOUR_SERVER;Database=CyberPayAuth;Trusted_Connection=True;"
},
"Logging": {
"LogLevel": {
"Default": "Warning",
"Microsoft.AspNetCore": "Warning"
}
},
"JWTSettings": {
"TokenKey": "Your Token"
},
"CyberPayAPISecret": "Your Cyber Pay API Secret",
"CyberPayAppUrl": "Your Cyber Pay App URL",
"SendGridAPIKey": "Your SendGrid API Key",
"AppUrl": "Your App URL",
"frontendUrl": "your Frontend URL",
"AllowedHosts": "*"
}
- Run Migrations: Apply the database schema and Identity tables.
dotnet ef database update
- Start the API:
dotnet run
- Explore:
Navigate to
https://localhost:PORT/swaggerto see the interactive documentation and test the endpoints.


