Roku Developer Program

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

Validating subscription renewal

I think that I understand correctly the process for validating a new subscription, but I have questions on how to validate the renewal of the subscription (Step #7).

Process for validating an initial subscription:

1) Get Transaction ID from Roku device (once subscription is complete)
2) Pass Transaction ID from Roku device to my backend server
3) Backend server communicates to Roku server at following URL

http://apipub.roku.com/listen/transacti ... ansaction/ + devToken + / + transactionID;

4) If a valid subscription, the ExpirationDate is returned. Let's assume that it is a one month subscription.
5) Store expiration date in database - associated with User.
6) Return expiration date to Roku client

7) If current Roku device time is greater than expiration date stored, then check if subscription was auto-renewed.

My question is how do I go about implementing Step #7? Should I store / persist the transactionID on the backend server, and then have the Roku client make a request to the backend server, to revalidate the transaction (and get a new expiration data)?

http://apipub.roku.com/listen/transacti ... ansaction/ + devToken + / + transactionID;

Thanks,

Kurt
0 Kudos
1 REPLY 1\
joetesta
Level 11

Re: Validating subscription renewal

Personally I wouldn't rely on storing / comparing an expiration date in the roku's registry. In my channel every media request to the back-end server checks the stored token to make sure the user is still a valid (current paid) member. in our case, Roku doesn't need to know or care about expiration dates, the back-end server handles that and given a unique token just responds with "yes" (valid member) or "no". Then the channel decides what to do based on that response.
aspiring
0 Kudos