Music Store/Spec
You have a script that runs over your database periodically, OR whenever you add new tracks. this script exports your entire database as an xml file (the "Music Store.xml" file). The XML file can be in whatever format/style is convenient for you, but there are two formats that are particularly easy for me to accept: excel-export, and plist (used by kJams directly), contact me for more info. It must be encoded in UTF-8, and it includes every bit of meta-data you have for each song eg:
name artist publisher if you have more than one (eg: sunfly, zoom, legends, chartbuster, etc) price (USD) (if purchaseable) if the song is streamable if you have a tiered service, what tier this song belongs in unique song ID (supplied by you, i use this to reference the song to you when requesting a purchase) a URL (or just the last component) for playing a sample of the song (hosted on your server, typically 15-30 seconds of the song in m4v format) genre duration media format type (MP3+G, mov, avi, mpg) url to icon (if any) song key (eg: "Key of Gm") if it's a duet date added to library any and all other meta data you have
Many meta-datum are optional, but the more you have, the more the user can search and filter on.
For URLs, you can save space in the xml by only including the last component of the URL, and just tell me what the first part is, or put it in a header section.
it's important that each song have a "date added" field. users will sort by "date added" to see the new additions when they get a new copy of your library index.
it's important you have a web site where the buyer can see / hear preview samples of your songs (typically 30 seconds or so). Each song should be at a unique url. The previews do NOT play within kJams, but are played directly on your web site
here is an example "preview" song
The meta data xml file is published to a known URL at your site, optionally zipped for download speed. My software, periodically, checks this file for updates. if it is newer than last time (ie: the "Last-Modified" header HTTP header is changed) then i re-download, parse, and display the newly updated store list.
the user can then search and filter your song store from within kJams.
when the user clicks the buy song button, i send an HTTPS request url to your server in one of 2 forms: 1) full credit card credentials of the user plus the song ID 2) "bulk purchase code" credentials plus song ID
when the user streams a song, i send an HTTPS request url to your server in this form: 3) "subscription ID" credentials plus song ID. if you're awesome this can be the same as 2 if you allow the pre-purchase of bulk credits.
for 1) i send, within the URL, the user's (buyer's) name, address, email, credit card, my affiliate ID, and song ID, and whatever else you'd require for 2) you would have to have some method of allowing the user to pre-purchase a block of credits for song purchases at your store. this would allow discounting for buying more. The user should be able to log in to your web site to see what songs have been bought and how many credits they have left. Your server should also allow kjams to send a "how many credits left on this purchase code" URL, so i can show how many credits are left in my UI. for 3) you need a URL to ask if the "subscription ID" is valid and what tier (if you have tiers) it is valid for. i will send in the url the customer's subscription ID and the song ID. Your server should also allow kjams to send a "when does this expire" URL, so i can show what date this is good thru.
upon successful processing of the credit card or purchase code or subscription ID (which is handled by your site), the result URL sent back to me is the actual download link for the purchased song. (for streaming i will encrypt the download as it lands on the hard drive, so it can not be extracted and used) For purchases, simultaneously you will send a receipt to the buyer (since you got their email address as part of the purchase request), this receipt would ALSO include the download URL, in case something went wrong. this URL may expire in a set number of days if you wish. Note I require the "Content-Length" http header field on this download. if this is not possible due to some technical reason, then you must include the size of the download within the meta data of the "Music Store.xml" file.
you price the songs and/or subscriptions however you wish, and for each song/subscription i sell i would simply get an affiliate commission, eg: 10% or omething, whatever you feel is reasonable. you may cut checks whenever it is fiscally reasonable to do so (eg: when i make more than say $100 or something, or just quarterly or bi-anually or whatever) or just use paypal to pay me.
i think you'd also want a download link for kJams on your website. users can use the free version to get to your music store. the ONLY limit on the free version is they can't make a playlist with more than 3 songs, can't export more than 10 songs to iPod, and can't rip from CD more than the first 2 songs on any disc. other than that it is fully functional. Note the "playlst size limit" does not affect the actual "Library" playlist, they can add as many songs as they want to that. i've got more than 20,000 kJams users that are using the free version (unregistered), i've purposely made it very useful and functional even when used in "Tryout" mode.
the Tricerasoft, KaraokeLocker and Chartbuster (streaming) stores are functioning now. go ahead and download kJams and give it a try, in your 1 click settings, enter 4111111111111111 as your credit card number, make up the rest except do use your real email address. and you'll be able to test the store (you'll always get a bon jovi song) so you can see just how dead simple it makes purchasing songs. it's impulse purchase at it's finest.
Summary
-> client asks for song list (Music Store.xml) eg:
http://karaoke.kjams.com/music_store/kJams.xml
<- server returns download URL link of xml or zipped xml file of song list including all meta data
later:
-> client sends purchase request (SSL) eg:
POST /cgi-bin/KaraokeDownloads/purchasexmlcc.asp?CCNUM=xxxxxxxxxxxxxxxx&EXPMM=01&EXPYYYY=2012&CVV=123&COUNTRY=US&FIRSTNAME=David%2520M.&LASTNAME=Cotter&STREET=20413%252012th%2520Place%2520West&CITY=Lynnwood&STATE=WA&ZIP=98036&EMAIL=me@davecotter.com&SONG_CODE=THM-C0707-04&RESELLER_CODE=KJ HTTP/1.1
or for a bulk purchase "gift card":
POST /cgi-bin/KaraokeDownloads/purchasexmlgift.asp?GIFTCODE=GP200809166545101VV720&FIRSTNAME=David&LASTNAME=Cotter&EMAIL=dave@kjams.com&SONG_CODE=MM6086-02&RESELLER_CODE=KJ HTTP/1.1
<- server performs financial transaction and succeeds
<- server responds to client with new unique URL to download purchased song eg:
http://karaoke.kjams.com/music_store/songs/kJ00001.zip
<- server emails user directly with receipt including (optionally expiring) download URL
-> client downloads purchased song and installs into user's library