Business rules - JulianPasquale/venmo-api GitHub Wiki

Venmo is a mobile payment service which allows friends to transfer money to each other. It also has some social features like show your friends’ payment activities as feed.

Sending and Receiving Payment(s)

  • User can only send payments to friends.
  • Payment amount has to be greater than $0 and less than $1,000.
  • User can add a description on his/her payment.
  • Each payment will generate a feed event.
  • Each user has a payment account with some balance.
  • Receiving money will add to the balance while sending money will deduct balance.
  • If the balance is less than $0, system needs to automatically transfer money from external bank or credit card company to the payment account (mock service).

Activity feed

  • Show friends’ payment activities including yours in reverse chronological order; friends is up to the second degree.
  • Each feed will have a title: “{A} paid {B} on {timestamp} - {description}” followed by description of this payment
  • Feed should be paginated with 10 feed per page.

Assumptions

  • No authentication is needed. We will assume the user is authenticated and get its id from URL.
  • For the bank automatic transfer, we will use a simple PORO class to mock this. When users is balance is about to be negative, we do a transfer to keep it in $0.
  • No UI is needed.