×
A new build of Corona SDK is now available to subscribers. Not a subscriber? Subscribe now.
CoronaSDK 2012.821 | Released: 23 May 2012, 2:01am | What's New | Download Now

In-App Purchases

Overview

This feature allows you to support In-App Purchases. Currently, only the Apple iTunes Store is supported. In the future, other store fronts may be added.

Note: Google's Android Market is now supported starting with build 2012.760. As of 4/30/2012, the Google changes have not been intergrated into the API pages See Getting Started with Android In-app Billing for more information.

Sample code for both iOS and Android is available in the Corona SDK at Samples/Networking/InAppPurchase

More Information

For more information see the In-App Purchases guide.

For Android Developers, please see: Getting Started with Android In-App Billing in Corona

Replies

Viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kennw's picture
kennw
User offline. Last seen 8 hours 21 min ago. Offline
Joined: 9 Jan 2011

Link to the documentation on In-App Purchases:

http://developer.anscamobile.com/reference/in-app-purchases

;-)

[Oops. EDITED to fix the link. Thanks ewing!]

ewing
User offline. Last seen 4 hours 54 min ago. Offline
Staff
Joined: 13 Jul 2010

Actually, this is the link:
http://developer.anscamobile.com/reference/in-app-purchases

But thanks for noting this.

corona706
User offline. Last seen 1 day 10 hours ago. Offline
Joined: 15 Dec 2011

So how do people currently handle in-app purchase on non-ios devices?

don's picture
don
User offline. Last seen 19 hours 7 min ago. Offline
Joined: 24 Jan 2011
simopt2
User offline. Last seen 1 day 2 hours ago. Offline
Joined: 15 Nov 2011

Is there any way, how to handle error state of network? Some timeout?

For example, when user touches button for store, I want to load information about products, call store.loadProducts(). I want to provide to user some feedback, I display activity indicator at this moment. But if the wifi is off, I will wait for callback forever and application is stuck.

ewing
User offline. Last seen 4 hours 54 min ago. Offline
Staff
Joined: 13 Jul 2010

For loadProducts, I don't see any error APIs provided by Apple for timeouts. However, you can use the network reachability APIs to monitor if WiFi gets disconnected.

claes.lindblom's picture
claes.lindblom
User offline. Last seen 19 hours 8 min ago. Offline
Joined: 4 Jul 2011

Amazon AppStore has released API for In-App purchase. Will this be a priority for Corona SDK to implement support?

https://developer.amazon.com/sdk/in-app-purchasing.html