description: Ability to send money from a buyer to a seller for a specific offer and amount, through a provided method)
returns:
a transaction identifier
in case of synchronous transaction processing the status may be returned, in case of asynchronous processing an additional endpoint would be required to fetch the transaction status
accountStatus(userId)
Description: Display account information, namely how much money for a specific user
returns:
amountOfmoney
currency
userInformation
transactionHistory(userId)
Description: display transaction history for a specific user
Returns:
list of transaction, may be already processed, in progress, or under refund request/dispute
Description: Ability to a recipient for a specific user, with a recipient name for clarity. recipientMetadata will contain information such as method (wire, credit/debit card, etc) and additional data like account number for a wire, card number, etc
Description: Find the conversion rate and fees applied to an amount based on the original and target currency, as well as the amount (likely more useful for fee calculation)
Returns:
Conversion rate between original and target currency.
Transaction fees in case the transaction is actually made
requestRefund(userId, offerId, reason)
Description: Buyer can request a refund for a specific offer. A reason must be provided
Returns:
requestRefundId
disputeRefundRequest(userId, refundRequestId)
Description: Seller can dispute a refund request. Status of the refund request will be updated to something like "disputed" to underline in progress dispute process
Returns:
Success
High-Level Design
See "High level diagram"
Detailed Component Design
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.