We make Keyturn Kit, a starter for selling Chrome extensions with license keys, and just added Gumroad to it. Gumroad's license API is the simplest of the providers we support and also the one that leaves the most to you, so here are the details, whether you use our kit or not.
Turn license keys on
In Gumroad, open the product's content page, choose Insert and add a License key block. While you edit, the block shows the product's ID. Copy it, because every verify call needs it. Gumroad requires product_id for products created on or after 9 January 2023; the older product_permalink only works for older products.
Add https://api.gumroad.com/* to host_permissions in your manifest.
One endpoint, called two ways
There's a single public call, POST https://api.gumroad.com/v2/licenses/verify , with form fields:
const res = await fetch ( ' https://api.gumroad.com/v2/licenses/verify ' , { method : ' POST ' , headers : { ' Content-Type ' : ' application/x-www-form-urlencoded ' }, body : new URLSearchParams ({…