License keys

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

What are license keys for? 

License keys are primarily used for creators selling software. The license keys correspond to purchases that a creator can verify through their own application, and then authorize or revoke access to software they've created. 

License keys will NOT help you limit access to digital audio, video, or ebook files that you are selling on Gumroad. Adding a license key to a digital product that is not software will simply add a license key to the bottom of a customer's receipt which has no effect on their purchase or ability to access their purchase.  

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. You can also retroactively add license keys to a product. 

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 check if a purchase has been refunded or charged back by checking the refunded/chargebacked fields of the license verify API call response.

The license key journey

  • Create a product with "generate license key for each sale"
  • The customer will get an email about the purchase with a license key
  • The customer launches the application and inputs the license key somewhere in the application
  • The application sends a request to Gumroad license verification API to check if the license is okay or not
  • The application receives a response from Gumroad and gets the license information (including email, product id, additional fields, create_time, subscription_time)
  • The application uses its own algorithm to check the license is okay or not

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": 29,
  "purchase": {
    "seller_id": "kL0paVL1SdmJSYRNs-OCMg==",
    "product_id": "32-nPAinqpLj0B_WIwVlMw==",
    "product_name": "license product",
    "permalink": "testprod1",
    "product_permalink": "",
    "email": "",
    "price": 0,
    "gumroad_fee": 0,
    "currency": "usd",
    "quantity": 1,
    "discover_fee_charged": false,
    "can_contact": true,
    "referrer": "direct",
    "card": {
      "bin": null,
      "expiry_month": null,
      "expiry_year": null,
      "type": null,
      "visual": null
    "order_number": 524459995,
    "sale_id": "FO8TXN-dvxYbBdahG97Y-Q==",
    "sale_timestamp": "2021-01-05T19:38:56Z",
    "purchaser_id": "5550311507811",
    "subscription_id": "GDzW4_NBdQy-o7Gjjng7lw==",
    "variants": "",
    "license_key": "85DB262A-C19D4B06-A5335A6B-8C079166",
    "ip_country": "India",
    "recurrence": "monthly",
    "is_gift_receiver_purchase": false,
    "refunded": false,
    "disputed": false,
    "dispute_won": false,
    "id": "FO8TXN-dvxYbBdahG97Y-Q==",
    "created_at": "2021-01-05T19:38:56Z",
    "custom_fields": [],
    "subscription_cancelled_at": "2021-02-05T20:09:27Z",
    "subscription_failed_at": null

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


Can I make API calls from the browser?

Yes, you can send API requests to from browser.

When the subscription is renewed, does the value of sale_timestamp update to the date and time of the renewal? Does created_at always stay the same?

They both remain the same. 

Does the disable method cancel the customers subscription? 

No, it just disables the license key. The customers subscription can be cancelled through the Audience Dashboard

When a user's payment fails, is "subscription_cancelled_at" null, or does it have a value?

If a user's payment fails a few times, then failed_at is set to a date time object. subscription_cancelled_at is only changed once the subscription is actually cancelled by the seller or buyer. 

When a user's payment clears after failing, does "subscription_failed_at" return null, or does it still have the value of when their payment failed?

If it's not failed and it's not cancelled (or it's cancelled but in the future) and there's no ended_at then it's active. If a payment clears after failing, failed_at is returned to null again. 

Can I use my own license keys?

Yes, but this is something you'll need to do outside of Gumroad. You either have to choose the license keys we generate or manage your license keys outside of our system. We do not have a way for you to import license keys. 

Can I reset the uses count parameter to zero?

No, you cannot reset the uses count. However, if you do not wish to increment the uses_count at all, there's a increment_uses_count  flag in the verify API call that they can set to false to not increment the uses count. Also refer our API doc here.

Can I generate License Keys for past purchases that did not have a License attached to them originally? 

Yes. When you turn on the "Generate a unique license key per sale" setting, all previous purchases of that product will also get a License Key. However, customers won't be automatically notified about this. So you might have to write them a Post stating that they can get their License Key from their Library/Product's download page.

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