Skip to content

Latest commit

 

History

History
66 lines (56 loc) · 1.76 KB

README.md

File metadata and controls

66 lines (56 loc) · 1.76 KB

Yape Code Challenge 🚀

Table of Contents

Candidate Information

Problem

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:

  1. Pending
  2. Approved
  3. 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)]
Loading

Tech Stack

  1. Backend: Node.js with Express.js as the framework and Sequelize as ORM.
  2. Database: PostgreSQL.
  3. Message Broker: Kafka.

Resources

  1. Transaction creation:
{
  "accountExternalIdDebit": "Guid",
  "accountExternalIdCredit": "Guid",
  "tranferTypeId": 1,
  "value": 120
}
  1. Transaction retrieval:
{
  "transactionExternalId": "Guid",
  "transactionType": {
    "name": ""
  },
  "transactionStatus": {
    "name": ""
  },
  "value": 120,
  "createdAt": "Date"
}