Verify Purchase API Response Example

Hello everyone.

I am planing on releasing a massive CMS on CodeCanyon soon, and i want to implement a licencing system for it. The problem is that there are no test API purchase keys so i can test whether the API is working or not, so i have made a connection with the buyer/purchase API to check for the items i have bought, and its working (I get proper response), but now the problem is that i dont have any access to the /author/sale response so i can handle the response property.

Is there any good soul that can share any kind of response from that API endpoint so i can implement it into my cms? Or if are there any other solutions for this problem, i am happy to hear about them too.

I think you may want /buyer/purchases, which is shown here:

@baileyherbert but i cannot do this API call with my API Token and their purchase code. They would need to authenticate first and then enter the purchase licence. I would like to do it with a simple form, with my own API token, thats why i wanted the author/sale response.

Wouldn’t it be easier if you let them click a button to login with Envato and then they were done? Why make them enter a purchase code? Just curious. :slight_smile:

Let me get a sample response for you.

@baileyherbert too much work for them i guess. And i would love to use that API endpoint, whats the use of it if it cannot be used … :smiley: Thank you btw, i really appreciate your responses and help.

I use the /buyer/purchases for verifying licenses with my app. It requires no effort on the customer’s end, they simply login and I can see all of their purchases including purchase codes immediately just by them logging in. It does work perfectly well.

Sample response for /author/sale:

  "amount": "21.38",
  "sold_at": "2016-07-29T11:10:00+10:00",
  "item": {
    "id": 1702000,
    "name": "Some Item Name",
    "description": "Very long item description...",
    "site": "",
    "classification": "php-scripts/some-category",
    "classification_url": "",
    "price_cents": 2800,
    "number_of_sales": 350,
    "author_username": "baileyherbert",
    "author_url": "",
    "author_image": "",
    "url": "",
    "summary": "High Resolution: Yes, Software Version: PHP 7.x, PHP 5.4, PHP 5.5, PHP 5.6, MySQL 5.x",
    "rating": 5.0,
    "rating_count": 3,
    "updated_at": "2017-03-22T16:58:54+10:00",
    "published_at": "2016-09-13T19:07:03+10:00",
    "trending": false
  "license": "Regular License",
  "support_amount": "0.00",
  "supported_until": "2017-01-28T02:10:00+11:00",
  "buyer": "customer_name_here",
  "purchase_count": 1
1 Like

@baileyherbert thank you my friend! Your help saved me a lot of time and effort.

1 Like

Read this:

Its for the old API. I will go @baileyherbert’s way :slight_smile:

It still works :slight_smile: