KZix
changed title from Create POST /api/coin-purchases endpoint to Implement POST /api/coin-purchases with Payment Validation2025-12-30 20:17:31 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Acceptance Criteria:
Validate Payload: Ensure euros is positive and payment_type is valid.
Validate Payment References (Mock Gateway):
Atomic Transaction: Create record in coin_transactions AND coin_purchases within a DB transaction.
Update Balance: Increment users.coins_balance correctly.
Response: Return 201 Created with the new balance and transaction ID.
Security: Return 401 if unauthorized.
Create POST /api/coin-purchases endpointto Implement POST /api/coin-purchases with Payment Validation