Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
sharris
Level 7

Problems with testing billing integration

Hi everyone,

I'm trying to put together a proof-of-concept channel for an integration with Roku billing, but I'm running into a number of problems. The immediate goal is to generate a test transaction, then validate that against the web API. The channel code I'm using is a lightly modified version of Roku's simple sign up example. Although I can sign in on the channel and initiate a test purchase, different issues are preventing me from being able to complete the POC. My Roku account is initiated with Roku billing using a sandbox PayPal account, and I'm testing on a Roku Streaming Stick 3500EU.

If I try making this purchase from a direct, sideloaded version of the channel, I see the hardcoded test product list as expected, but once I complete these purchases, there's no way I can see to cancel these purchases and buy them again. These purchases also didn't generate any transactions in Roku's billing system, so I presume this is by design.

I can sign and upload this code as a private channel, re-download it to the same Roku stick and attempt to make a purchase. After entering my sign-in details, the channel attempts to download the list of products, but fails with a generic "The subscription service is currently unavailable" message. Nothing in the developer console or Roku's online portal sheds any light on what this could mean.

For the web API part of this integration, I've tried using the validate-transaction method against two zero-priced transactions already against my Roku account, but had no success there either. The documentation says the URL needs a devtoken and a transaction ID, but doesn't say what these values would be. Is devtoken the hexadecimal device token created from the genkey command? Does a transaction ID map directly to an invoice ID, or is it more private than that? If I try an API call using the device token and transaction ID (with/without the leading 'c'), I get an 'UNAUTHORIZED' error with a server stack trace. What am I missing here?

Thanks in advance.
0 Kudos
1 Reply
EnTerr
Level 8

Re: Problems with testing billing integration

My apology, since what i am writing here won't address the core of your problems - but maybe the pointers will help. Indeed you can't use side-loaded channel for testing in-app purchases, it's crudely stubbed - use private channel instead, add yours or other account email as "test user", that will give you $0 charges but the rest of the back end will be exercised and you can void transactions in the dev.portal. See also viewtopic.php?f=34&t=95592 for erratum 
0 Kudos