Whenever you're ready, walk me through how you'd approach this.
Implement a REST API endpoint that records a transaction and implement a client library that uses the endpoint. You can use any database you like.