License Keys

Selling license keys to single products or subscriptions can be difficult with some other services. Gumroad makes it a checkbox.

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.

Setting up a product that issues license keys is very straightforward. Visit an existing product's Options tab and you will see an option for "License Keys:"

Click the checkbox to the right and click Save changes. Now your product is ready to issue license keys for each sale.

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

  \ -d "product_permalink=QMGY"
  \ -d "license_key=YOUR_CUSTOMERS_LICENSE_KEY"
  \ -X POST

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.

Was this article helpful?