Never Get RENEWAL Notification Type on Apple status 更新通知

Never Get RENEWAL Notification Type on Apple statusUpdateNotification

我创建了一个 API 供 Apple webhook 调用以处理订阅。我已经在 Itunes 中设置 API url 由 webhook 调用。

根据 Apple 帮助站点 https://help.apple.com/app-store-connect/#/dev7e89e149d 关于 测试自动续订订阅 ,在测试环境中测试自动续订订阅时,Apple webhook 将如果我 select 1 个月的订阅期,5 分钟后给 API 打电话。

但问题是,在首次购买后,apple webhook 不会跟进调用我创建的 API 来续订订阅。即使我等了超过 5 分钟。所以我无法从 API 进行任何处理来更新数据库中的用户订阅。

我是否必须进行一些配置才能测试自动更新并使 apple webhook 调用 API 来更新 sub?

我们发现 Apple 的订阅更新网络书调用相当不可靠。

根据经验:

  1. 不要指望 Apple 会通知您续订。通知可能会任意延迟到达(通常会及时留下 "gap"),或者根本不会。我们已保留并重试原始 iTunes-provided 收据以在订阅期结束时重新验证续订——到期日期将更改以说明续订。
  2. 也不要指望 Apple 会通知您取消。同上,计算订阅时长,在一个周期结束时重试收货(取消订阅不会更新到期日期)。

通常,这涉及将与重试收据一起返回的额外 transactions/in_apps 映射到 original_transaction_id -- 并相应地更新 expires_at。

希望对您有所帮助!

更新: 在 WWDC2020 中,Apple 宣布他们添加了一种名为 DID_RENEW 的新通知类型,它将在任何成功的自动续订后发送。 this video 中的更多信息,大约从 16:00.

开始

原回答:

我找不到您链接到的页面,但是 this page 可能会阐明该主题(我强调):

The App Store attempts to charge the user account 24 hours before an auto-renewing subscription expires. If the renewal is successful, there is no server-to server notification because the auto-renewing subscription did not enter into the expired state. However, in the few cases that iTunes is unable to renew the subscription (generally there was a connection problem with the credit card server) and the auto-renewing subscription is not renewed before the expiration_date passes, the auto-renewing subscription is technically considered expired. iTunes may continue to attempt to renew the subscription. If iTunes is successful, then the RENEWAL event is sent.

意思是,您不应该收到续订通知,但只有在订阅过期后才会收到续订通知。沙盒更新也可能是这种情况。