3

I've set up a URL on my server to receive auto-renewable IAP status change notifications per this article:

https://help.apple.com/itunes-connect/developer/#/dev0067a330b

And of course I've provided my URL to iTunes Connect via my app's main settings page.

However, I'm receiving neither update notifications nor any kind of message indicating that there's a problem.

Help troubleshooting? I don't even know where to start.

Thanks!

Christian Brink
  • 663
  • 4
  • 18
  • You'll have to elaborate a bit on what you mean exactly with "how have you configured your webhook". What webhook? Are you talking about the [SKPaymentQueue](https://developer.apple.com/documentation/storekit/skpaymentqueue), the new [URL scheme](https://developer.apple.com/videos/play/wwdc2017/303/?time=1539) in iOS 11, ... ? Also: please add some relevant parts of your code so we can take a look and help you out. – Kymer Aug 09 '17 at 22:32
  • @Kymer -- I made this post specifically for a person with whom I'd been talking in the comments on another post. He has context. – Christian Brink Aug 09 '17 at 23:53
  • If you made the post specifically for 1 person to answer then it doesn't belong here on a **public** forum. "He has context" does not make this a [*good question*](https://stackoverflow.com/help/how-to-ask). – Kymer Aug 10 '17 at 00:09
  • Fair enough. Are you a mod? – Christian Brink Aug 10 '17 at 03:18
  • @Kymer -- finally got a minute to edit it. Please let me know if you think it can still be improved. – Christian Brink Aug 11 '17 at 16:09

1 Answers1

2

Have you checked secure network connection with your server? I mean that you have to check ATS on your server. I'm using nginx such as proxy server. First of all, you have to check your nginx system pair past with ATS to connect with apple server.

This method to check ATS pass on nginx server

nscurl --ats-diagnostics <your status receive url>

See more on apple documentation Using the nscurl Tool to Diagnose ATS Connection Issues

If your server passed. You are ready to receive response from apple.

My subscription status URL setup simple such as a simple http service created on nodejs ( express framwork )

const express = require('express')
const app = express()
const bodyParser = require('body-parser');
const path = require('path');

process.on('uncaughtException', function (err) {
    console.log(err.stack);
});

process.on('exit', function (code) {
    console.log('About to exit with code: ' + code);
});

// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }))

// parse application/json
app.use(bodyParser.json())

app.post('/', function (req, res) {
    console.log(req.body); < response from apple is here >

    res.send({ ok: 1 });
})

const port = 12092;

app.listen(port, function () {
    console.log('Subscription status url ping on port ' + port);
});

By the way, you should update your question. you can reference from a other relation question on your question. This's more helpful!.

Loint
  • 3,560
  • 7
  • 26
  • 46
  • Our webserver passes the test, but we don't get notifications yet for sandbox IAPs in our development app build. Do you know whether we're supposed to receive IAPs for development / sandbox purchases? After entering the webhook URL in iTunes Connect, should it propagate immediately or do we first need to submit a new app version (e.g.: via TestFlight)? Thanks! – Yousef Sep 03 '17 at 18:18
  • Guys I did not get any Notification from Apple Store my link has https and also implement php file to get Notification. I have already set link to Itunes connect in APP. Do I need any extra code in APP side means set any Transparency, Arbitrary, domain name in info.plist file of APP ? I have set Allow Arbitrary Loads to Yes in info.plist file of APP – Ankur Patel Sep 05 '17 at 05:53
  • @Yousef: you don't need rebuild your app to receive notification form apple server. I need to have a development account to purchase subscription in your app, after that your subscription status url will receive a message from apple server. Please check your subscription status url work before. – Loint Sep 05 '17 at 09:26
  • @AnkurPatel: I don't need any extra code in APP side to receive apple notification in subscription status url. – Loint Sep 05 '17 at 09:29
  • @Loint, Thanks sounds good Php server get blank response from Apple Server anything else I have to set any extra code on server side. – Ankur Patel Sep 06 '17 at 04:43
  • @Loint do you want to say developer Account/Developer Profile One can not get notification for that One have to use Distribution Account/Distribution Profile ? am i right ? Let me correct if my understanding is wrong? – Ankur Patel Sep 06 '17 at 06:12
  • @AnkurPatel: Sorry , I don't understand your question. By the way, we should create a chat channel for this issue – Loint Sep 07 '17 at 08:16
  • 1
    @Loint good idea can we talk in chat channel I want to ask you If I use Developer Profile, can I get apple notification in subscription status url because now I get blank response from Apple Server or I have to use Distribution Profile to get apple notification in subscription status url ? – Ankur Patel Sep 13 '17 at 05:44
  • let's join my chat channel https://chat.stackoverflow.com/rooms/154306/https-stackoverflow-com-questions-45595499-trouble-receiving-notifications-from – Loint Sep 13 '17 at 07:58
  • @Loint why did you set up port 12092 (tcp/udp)? I haven't seen this port stated anywhere in Apple docs. I expect it will come through port 443. – Ozgur Sahin Jul 29 '20 at 06:56