- Name: David Andrés Garza Medina
- LinkedId Profile: https://www.linkedin.com/in/david-garza-medina/
- Personal Website: https://davidgarza.me/
- Email: [email protected]
Every time a financial transaction is created it must be validated by our anti-fraud microservice and then the same service sends a message back to update the transaction status. For now, there are only three transaction statuses:
- Pending
- Approved
- Rejected
Every transaction with a value greater than 1000 should be rejected.
flowchart LR
Transaction -- Save Transaction with pending Status --> transactionDatabase[(Database)]
Transaction --Send transaction Created event--> Anti-Fraud
Anti-Fraud -- Send transaction Status Approved event--> Transaction
Anti-Fraud -- Send transaction Status Rejected event--> Transaction
Transaction -- Update transaction Status event--> transactionDatabase[(Database)]
- Backend: Node.js with Express.js as the framework and Sequelize as ORM.
- Database: PostgreSQL.
- Message Broker: Kafka.
- Transaction creation:
{
"accountExternalIdDebit": "Guid",
"accountExternalIdCredit": "Guid",
"tranferTypeId": 1,
"value": 120
}
- Transaction retrieval:
{
"transactionExternalId": "Guid",
"transactionType": {
"name": ""
},
"transactionStatus": {
"name": ""
},
"value": 120,
"createdAt": "Date"
}