iOS Receipt Validation from Server Side
See original GitHub issueI am using my backend server to validate the iOS receipt. For that all I’ve done is passed the purchase.transactionReceipt to the application server in a post request. I want to know if purchase.transactionReceipt returns a base64 encoded receipt data or what? I’m getting error: 21002 with the current implementation
requestServerForReceiptVerification = (purchase: InAppPurchase | SubscriptionPurchase) => {
const receipt = purchase.transactionReceipt;
if (receipt) {
// Hit Server API for Receipt Validation
if (Platform.OS == 'ios') {
let headers = {
'Content-Type': 'application/json'
}
Stores.UserStore.hitVerifyiOSReceiptAPI(receipt, headers, this.dropdown, (response: any) => {
finishTransaction(purchase).then(() => {
console.warn('Trasaction Finished');
}).catch((error) => {
console.warn(error.message);
})
})
}
}
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
iOS In-App Purchases Server Side Validation - Adapty
Server validation (server-side receipt validation) is a way to verify the purchase's authenticity. Unlike device-based validation, server ...
Read more >Choosing a receipt validation technique - Apple Developer
You can authenticate purchased content by adding receipt validation code to your app or server. Receipt validation requires an understanding of secure coding ......
Read more >How to do App store IAP verification on server side with S2S ...
1. Receipt validation · a. Verify receipt with app store URL · b. Get a receipt from the app, parse it and then...
Read more >How to verify ios In-App Purchase on your server
On this page you can find detailed information about IOS receipt verification. It is very easy. You should just send http request with...
Read more >App Store Receipt Verification Tutorial: The Basics - Nami ML
It's possible to validate a receipt from the client-side or the server-side. Server-side receipt validation is more complicated, but the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
check this one
@leelandclay Thanks for putting up your solutions. This really helped a lot and we finally were able to validate our receipt. Thanks !!