We should have routes to create a payment for a booking, get payment details, get all payments for a user, update payment status and delete a payment record
It will probably follow this pattern:
POST /payments - Create a payment for a booking
GET /payments/:paymentId - Get payment details
GET /payments/user/:userId - Get all payments for a user
PUT /payments/:paymentId - Update payment status (e.g., Paid or Pending)
DELETE /payments/:paymentId - Delete a payment record
Make sure it queries the db correctly and all code works
We should have routes to create a payment for a booking, get payment details, get all payments for a user, update payment status and delete a payment record
It will probably follow this pattern: POST /payments - Create a payment for a booking GET /payments/:paymentId - Get payment details GET /payments/user/:userId - Get all payments for a user PUT /payments/:paymentId - Update payment status (e.g., Paid or Pending) DELETE /payments/:paymentId - Delete a payment record
Make sure it queries the db correctly and all code works