License Keys

To work with Gumroad's license keys, make sure you are familiar with cURL. Brush up on your skills here

Setting up a product that issues license keys.

Click on a product in your Products Dashboard to open the Product drawer. Scroll down to Settings and click the Generate a unique license key per sale toggle. Then, click save changes.

How license key enforcement works

License key enforcement is completely up to you. As the seller, you can decide how many uses each key gets depending on the verify license API calls you make. Gumroad does no additional license key verification.

Remember that if you check for a valid license on each launch you will increment the usage count unless you set increment_uses_count flag to false. You can also make sure a user hasn't refunded or charged back their purchase by checking the refunded/chargebacked fields of the license verify API call response.

Verifying a license key in your application.

We have worked hard to make verifying your customers' license keys as easy as possible. Verifying a license key uses these parameters:

  • product_permalink (the unique permalink of the product)
  • license_key (the license key provided by your customer)
  • increment_uses_count ("true"/"false", optional, default: "true")

If your product URL is "" your product_permalink would be "QMGY." We use these parameters to call the Gumroad API and verify the provided license key:

cURL example

curl \
  -d "product_permalink=QMGY" \
  -d "license_key=YOUR_CUSTOMERS_LICENSE_KEY" \

If the verification is successful you will receive a response similar to this:

Example response:

  "success": true,
  "uses": 3,
  "purchase": {
    "id": "OmyG5dPleDsByKGHsneuDQ==",
    "product_name": "licenses demo product",
    "created_at": "2014-04-05T00:21:56Z",
    "full_name": "Maxwell Elliott",
    "variants": "",
    "refunded": false,
    # purchase was refunded, non-subscription product only
    "chargebacked": false,
    # purchase was refunded, non-subscription product only
    "subscription_cancelled_at": null,
    # subscription was cancelled,
    subscription product only
    "subscription_failed_at": null,
    # we were unable to charge the subscriber's card
    "custom_fields": [],
    "email": ""

Otherwise, if verification fails, you will receive a 404 response code with an error message.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us