iOS IAP - Do I need my own server to check for refunds?
Yes, you need your own server to accept & respond to the REFUND
(webhook) notification(s) coming from Apple's App Store Server.
There is no Apple-provided UI for viewing this data as it is meant to be a programmatic integration with a backend service.
App Store Server Notifications is a server-to-server service as confirmed by official Apple documentation.
The language used in other official documentation, like the one you have linked or this one here, also clearly specifies the requirement for your server.
When the App Store processes a refund, the App Store Server sends a REFUND notification to your server, at the URL you configured. Your server must respond to the post with a 200 response code.
Your server is responsible to parse and interpret all notifications from App Store Server.
When you set up the endpoints on your server to receive notifications, configure your server to send a response.
How to handle refund/cancellation in-app purchase
I ended up storing the receipt string and running cron to go through the transactions and look for cancellation field.
$url = "https://buy.itunes.apple.com/verifyReceipt";
$data = json_encode(array('receipt-data' => $receipt));
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
$errno = curl_errno($ch);
$errmsg = curl_error($ch);
curl_close($ch);
if ($errno != 0) {
throw new Exception($errmsg, $errno);
}
return $response;
Related Topics
Xcode Myprojectname-Bridging-Header.H Does Not Exist
Force Landscape Viewcontroller in iOS 7
Trigger Local Notifications Automatically Daily on Dynamic Time Given in Arrays Objective C iOS
How to Use a Uisegmentedcontrol to Switch Views
iOS 8 Auto Cell Height - Can't Scroll to Last Row
Tutorial on How to Drag and Drop Item from Uitableview to Uitableview
Unbalanced Calls to Begin/End Appearance Transitions for <Uitabbarcontroller: 0X197870>
What Is the Life Cycle of an iPhone Application
Uicollectionview Set Number of Columns
Remove Empty Space Before Cells in Uitableview
Implement Document Picker in Swift (Ios)
Updating iOS Badge Without Push Notifications
Creating and Playing a Sound in Swift
Xcode 8 Shows Error That Provisioning Profile Doesn't Include Signing Certificate