Implement checkout endpoint. Add BorrowingRecord, CheckoutOrder types