How multiple purchases really work?

I’m slightly confused about license codes for multiple purchases work. If buyer purchases the same item number X of times, does he get new license code for every purchase?

I have some clients who purchased same product more than once, and they got new license codes for each purchase. However, I also know situations when buyer purchased multiple licenses, and his license code was the same for new purchases (but Envato API increased purchase_count parameter accordingly for this code).

So how do multiple purchases really work? Is Envato supposed to issue a new code for each purchase, re-use existing code for new purchases, or does it depend on some factor (so result can be different in each situation)?

When someone buys an item from CodeCanyon, they are not purchasing the item itself - they are purchasing a single license to use it. That license comes with a unique purchase code to identify it.

If they purchase another license, they will get a new purchase code.

If you ask the user for a purchase code and then look it up in the API, you will see the details for that specific code, and will also see their total purchase_count. You will not be able to see their other purchase codes. This is intentional.

If you use an endpoint like “List a buyer’s purchases” instead of asking for a purchase code, you will see all of their licenses (and purchase codes) listed as separate entries. Notably, this endpoint does not have the purchase_count property.