Home  Beta programs 
  Welcome to Mobipocket Developer Center
Home | Show TOC | Add to Favorites

Create a New Purchase Transaction

Before asking the user for a payment, the retailer must call the NewTransaction web service at eBookBase with the "CheckAvailability=true" parameter. This will make sure that the book is still available for purchase and that this user does not own it already.

After a successful payment on the retailer's site, the retailer must call the NewTransaction web service at eBookBase, to inform eBookBase that a given customer has purchased a Mobi eBook as part as a purchase transaction. eBookbase will log the transaction and return a link to download the DRM protected ebook file.

http://www.mobipocket.com/webservices/retailers/NewTransaction.asp?CommerceID=MOBIPOCKET&RetailerUserID=1256& BookID=34542&RetailerTrans=34542&HashCode=xxxx&EbookStore=MyUsedEbookStore&CheckAvailability=[true|false]


See NewTransaction web service for a detailed description.

The HashCode is an encrypted string generated using the MobiSecureClient encryption component, which can be downloaded from the eBookbase Retailer account. To generate Hashcode, create a string which is a concatenation of CommerceID+RetailerUserID+BookId+RetailerTrans. Encrypt the string using MobiSecureClient with your Retailer Key (provided in the Retailer account)

See example in ASP
See example in JSP

 

eBook file download link

The NewTransaction web service returns a download link for the customer to download the ebook file:
http://www.mobipocket.com/webservices/download/download.asp?Token=xxxxxxx

By default, the download link returns an XML output which is interpreted by Mobi Reader Desktop (5.0 and above), and the download of the ebook file will be handled seamlessly within the Reader software.

N.B. : If Mobi Reader Desktop is not supported on the customer's PC (i.e. Mac users, Win 98, OTA users, etc..), you can add the additional parameter Output=PRC to force the direct download of a full Mobi ebook file (instead of an XML output):

http://www.mobipocket.com/webservices/download/download.asp?Token=xxxxxxx&Output=PRC

Copyright 2000-2007 Mobipocket.com