Leanpub doesn't have a box where you enter coupon codes. Instead, we have coupon links
When an author makes a discount coupon, they do so by adding /c/ and some coupon code to the end of their leanpub landing page.
Normally, an author will provide you with the full link. Here is an example of what this would look like:
If all the author provides you with is the code - in this case
discount-code - just go to their leanpub landing page, and and
/c/discount-code to the URL, and you should see the coupon discount, if the coupon is still valid.