Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
fredlynn
Visitor

Validate subscription using Channel Store Web Services API

I'm looking to use Roku In-app Payments to collection subscription payments from customers for my channel. It looks like I can use the Roku Channel Store Web Services API's "transaction-service.svc" call to validate a transaction (see http://sdkdocs.roku.com/display/sdkdoc/Web+Service+API). My channel sells monthly subscriptions. Consequently, the initial transaction could be valid, but next month the user could cancel his/her subscription, and/or the payment might fail. I would like to be able to make a Web service call from my Linux application server to verify that individual customer's subscriptions made vie Roku In-app Payments are still up-to-date/paid in full. Can I use the "transaction-service.svc" call to do that?
0 Kudos
1 REPLY 1
fredlynn
Visitor

Re: Validate subscription using Channel Store Web Services A

OK, I tried invoking the "validate-transaction" Web service and recieved the following response:

<result>
<errorCode i:nil="true"/>
<errorDetails i:nil="true"/>
<errorMessage>Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).</errorMessage>
<status>Failure</status>
<amount>0</amount>
<channelName i:nil="true"/>
<couponCode i:nil="true"/>
<currency i:nil="true"/>
<expirationDate i:nil="true"/>
<originalPurchaseDate>0001-01-01T00:00:00</originalPurchaseDate>
<partnerReferenceId i:nil="true"/>
<productId i:nil="true"/>
<productName i:nil="true"/>
<purchaseDate>0001-01-01T00:00:00</purchaseDate>
<quantity>0</quantity>
<rokuCustomerId i:nil="true"/>
<transactionId i:nil="true"/>
</result>

So, I would greatly appreciate if someone could verify that the following is true: If the actual currrent date is before the value of the "expirationDate" in the response from the validate-transaction service, then the customer has a valid/paid-up subscription. If a payment fails or the customer cancels, then the expirationDate element will be the last day of the last month that the customer has actually paid for a subsciption that he/she signed up for with the original in-app payment transaction.

Coudl someone let me know if the above statements are correct?

Thanks in advance for any help.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.