Hi.
Is it possible to have a “test” purchase ID for each of our items? I’d like to use the API to verify when a user has purchased my item.
Currently, the only way to get it is to buy your own item yourself. (As far as i’m aware)
And i don’t fancy loosing 50% ($10) for buying my own work. 
Any chance we can get a test ID in the future? Adrian
You can’t buy your own work anyway (not sure if you can when logged out).
Nice idea though.
- Envato Staff
- Reviewer
- Sold between 10 000 and 50 000 dollars
- Author was Featured
- Item was Featured
- Has been a member for 4-5 years
- Bought between 50 and 99 items
- Contributed a Tutorial to a Tuts+ Site
- Beta Tester
I don’t think there is a test ID. I solved it by creating a second account and purchased one of my own items. But like you said it’s not the most ideal solution.
- United Kingdom
- Community Superstar
- Attended a Community Meetup
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Sold between 5 000 and 10 000 dollars
- Has been a member for 2-3 years
- Microlancer Beta Tester
- Bought between 100 and 499 items
- Referred between 10 and 49 users
if you knew anyone that had bought a item of yours you could always ask them, thats what i did when i was testing it out.
- Grew a moustache for the Envato Movember competition
- Community Moderator
- Contributed a Blog Post
- Author was Featured
- Item was Featured
- Won a Competition
- Repeatedly Helped protect Envato Marketplaces against copyright violations
- Has been a member for 4-5 years
I just create my own test purchase code, and return my own test api data when that code is entered from a certain ip address. Here’s a quick example, it should work.
$license_code = $_REQUEST['license_code'];
if($license_code == 'my_unique_testing_code'){
$verify_data = '{"verify-purchase":{"buyer":"DEV","created_at":"Wed Dec 01 05:00:47 +1100 2010","licence":"Regular Licence","item_name":"Your Item Name Here","item_id":"123456"}}';
}else{
$verify_data = file_get_contents("http://marketplace.envato.com/api/edge/".$username."/".$api_key."/verify-purchase:$license_code.json");
}
$license_check = json_decode($verify_data,true);
print_r($license_check);
restricting it to an ip address lets you also use your own unique dev code in certain situations, such as a demo of the item (example) while stopping other people using that demo license code.
it would be nice to have a unique purchase code for each item that worked directly the api though. maybe displayed in the “edit” screen of the authors item.
Thanks for that Baker. 
