sdornan
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2014
11:00 AM
Integrated Billing Sample Code
Is there any implementation documentation or sample code available for implementing in-app purchases - specifically subscriptions - within a channel?
Our team currently has some documentation that includes some example UI flows, but it would be great to have some sample code that we could use as a base for our own implementation.
Our team currently has some documentation that includes some example UI flows, but it would be great to have some sample code that we could use as a base for our own implementation.
11 REPLIES 11

TheEndless
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2014
11:02 AM
Re: Integrated Billing Sample Code
This might help: http://blog.roku.com/developer/2013/06/ ... -channels/
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
sdornan
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2014
02:37 PM
Re: Integrated Billing Sample Code
Thanks, that is helpful!
Another question: how would you go about making a PIN entry screen like the one shown in the UI guidelines?
Another question: how would you go about making a PIN entry screen like the one shown in the UI guidelines?


RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-06-2014
02:42 PM
Re: Integrated Billing Sample Code
The PIN entry screen is part of the firmware - it will automatically show when a user attempts to make a purchase, if they have a PIN set in their account. We also have a component:
http://sdkdocs.roku.com/display/sdkdoc/roPinEntryDialog
That can be used to enter a PIN if your channel needs to use one for its own purposes but it is not part of the Roku Billing Services purchasing process.
- Joel
http://sdkdocs.roku.com/display/sdkdoc/roPinEntryDialog
That can be used to enter a PIN if your channel needs to use one for its own purposes but it is not part of the Roku Billing Services purchasing process.
- Joel
sdornan
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2014
05:34 PM
Re: Integrated Billing Sample Code
Thanks. It seems to work as you describe.
One more question:
I'm looking to validate an order on our server using the web API after the purchase has been made. However, to do this I need the order's transaction ID. What is the best way to retrieve this transaction ID? I assumed that DoOrder() would return the order's information, including the transaction ID, which I could then pass to our server. That doesn't seem to be the case though, as the method simply returns a boolean value indicating whether the purchase was successful.
One more question:
I'm looking to validate an order on our server using the web API after the purchase has been made. However, to do this I need the order's transaction ID. What is the best way to retrieve this transaction ID? I assumed that DoOrder() would return the order's information, including the transaction ID, which I could then pass to our server. That doesn't seem to be the case though, as the method simply returns a boolean value indicating whether the purchase was successful.
sdornan
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2014
02:53 PM
Re: Integrated Billing Sample Code
Now I see that the Roku receives a roChannelStoreEvent response after the purchase is complete that contains the items that were ordered. However, this response only contains information about the items that were ordered and doesn't provide the actual transaction ID of the order. Am I looking in the wrong place?

RokuRobB
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2014
09:52 PM
Re: Integrated Billing Sample Code
The event that is fired after making a purchase contains an attribute called PurchaseID. This is how the BrightScript events sends the transaction id. It is a bit confusing that the names are different.
fortscan
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-05-2014
02:33 AM
Re: Integrated Billing Sample Code
"RokuRobB" wrote:
The event that is fired after making a purchase contains an attribute called PurchaseID. This is how the BrightScript events sends the transaction id. It is a bit confusing that the names are different.
Is it possible that legacy devices on the 3.1 firmware are filtering/ignoring the purchaseId attribute? It seems to happen even when testing locally with the store.FakeServer function using a valid purchaseId at the corresponding PlaceOrder.xml file inside csfake folder. It only happens in 3.1 fw. Perhaps the attribute is simply being ignored, but it would be possible to manually parse the response from the roChannelStoreEvent without relying on GetResponse()?

RokuJoel
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2014
03:25 PM
Re: Integrated Billing Sample Code
FYI in-channel purchases and subscriptions are not really supported on firmware 3.1, only purchase or subscription of the channel itself.
- Joel
- Joel
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2014
10:45 AM
Re: Integrated Billing Sample Code
"RokuJoel" wrote:
FYI in-channel purchases and subscriptions are not really supported on firmware 3.1, only purchase or subscription of the channel itself.
Wait, wat?
Could you explain more on this, please. Are you saying that roChannelStore is not in fw3 - or is there something else? I just checked and createObject returned me <Component: roChannelStore> on 2050 player.