How to verify purchase for android app in server side (google play in app billing v3)

It sounds what you’re looking for is a way to check if the user has premium features enabled on their account, so this is where I would start; Ensure there is a flag of some sort on your database indicating if the user has premium features and include that in the API response payload when … Read more

iPhone Store Kit “Cannot connect to iTunes Store”

I was getting SKPaymentTransactionStateFailed error code 0 “Cannot connect to iTunes Store” and thanks to thomax for this answer my problem is solved. Turns out you MUST enter a build number under Targets->Summary. I spent the last 24 hours resetting my phone, screwing with iTunes connect, and doing just about everything i could think of … Read more

Verify receipt for in App purchase

First, there are a few typos in the posted code. Try this. (Disclaimer: Refactoring et. al is left as an exercise for the readership!) – (BOOL)verifyReceipt:(SKPaymentTransaction *)transaction { NSString *jsonObjectString = [self encode:(uint8_t *)transaction.transactionReceipt.bytes length:transaction.transactionReceipt.length]; NSString *completeString = [NSString stringWithFormat:@”http://url-for-your-php?receipt=%@”, jsonObjectString]; NSURL *urlForValidation = [NSURL URLWithString:completeString]; NSMutableURLRequest *validationRequest = [[NSMutableURLRequest alloc] initWithURL:urlForValidation]; [validationRequest setHTTPMethod:@”GET”]; NSData … Read more

Android : inApp purchase receipt validation google play

Google provides receipt validation through the Google Play Developer API, within the API are two endpoints you will be most interested in: Purchases.products: get and Purchases.subscriptions: get. Purchases.products: get can be used to verify a non-auto-renewing product purchase, where Purchases.subscriptions: get is for verifying and re-verifying auto-renewing product subscriptions. To use either endpoint you must … Read more

A complete solution to LOCALLY validate an in-app receipts and bundle receipts on iOS 7

Here’s a walkthrough of how I solved this in my in-app purchase library RMStore. I will explain how to verify a transaction, which includes verifying the whole receipt. At a glance Get the receipt and verify the transaction. If it fails, refresh the receipt and try again. This makes the verification process asynchronous as refreshing … Read more

How do you add an in-app purchase to an iOS application?

Swift Users Swift users can check out My Swift Answer for this question.Or, check out Yedidya Reiss’s Answer, which translates this Objective-C code to Swift. Objective-C Users The rest of this answer is written in Objective-C App Store Connect Go to appstoreconnect.apple.com and log in Click My Apps then click the app you want do … Read more