Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iTunes Affiliate Program: Confirm if purchase is successful

In my application I am listing some songs and users can tap on download and Itunes open and user can download the music. This far its working perfect.

Now I need to know if user have successfully purchased the music. I have some logic to be implemented based on whether the purchase is successful or not.

Is there anyway we can find a successful iTunes purchase? At-least when we use our affiliate ID?

like image 670
Deepukjayan Avatar asked Oct 02 '22 21:10

Deepukjayan


1 Answers

Take a look at how Ebates does this. They link to the iTunes store through Apple's program in the LinkShare network (so you'll need to find analogous instructions for whichever network you use with iTunes: PHG, TradeDoubler, LinkShare, etc).

Notice that your outbound click to the iTunes store from Ebates contains a URL parameter u1 with a unique ID that looks like ebs1234567890sbe. That's what's called a "Signature" or "ShopperID" or "SID value". That ID gets attached to the user so that when they complete a purchase and you get your commission, your reporting will have this ID attached to the transaction. That's how cashback affiliates know to give the right cashback to the right user and you can use that same feature for your needs.

So, some steps for you:

  1. Find the documentation for sending SID values for the affiiliate network you're using to send traffic to iTunes. Here's the documentation for LinkShare (pdf).
  2. Pass a user id with clicks to iTunes
  3. Integrate with your affiliate network's commissions API so that your servers know when a sale has been completed and which user id completed the sale

EDIT: iTunes affiliates working through the PHG network will find these resources useful:

  1. This PDF is PHG's quick start guide. Follow the instructions for "Sub-ID tracking parameters."
  2. PHG's API Docs discuss reporting methods.
  3. Thanks to @Deepukjayan, here is the precise API query syntax for getting your pubref value back from PHG's iTunes API: https://login:[email protected]/reporting/report_publisher/publisher/YOUR_ID/conversion.json?publisher_reference=YOUR_PUBREF_STRING
like image 150
jonaz Avatar answered Oct 07 '22 16:10

jonaz