This major milestone was difficult to achieve but is now complete. I'm so happy.
The API uses Gumroad license keys for validation and reacts accordingly - logs usage per key or informs the user that the limit has been reached.
The challenge for me was the sliding subscription, that is, a user has a predefined number of requests (example: 1000) for the subscription period (example: 1 month) and after the end of the period the amount is reset back to 0.
I drew the algorithm on a piece of paper, checked it at least three times, and then discussed it with my wife. That was sooo helpful - she's not a technical person so I had to explain the problem, explain my solution and get confirmation from her or not. At some point she understood the problem and suggested a very clever solution which I took. It is always very helpful to discuss your thoughts with someone else.
I am considering writing an article on how I tackled this.