agisboye / app-store-server-api

A Node.js client for the App Store Server API
MIT License
218 stars 36 forks source link

make "signedRenewalInfo" optional in "NotificationData" #37

Closed fariassdev closed 1 year ago

fariassdev commented 1 year ago

Hi August!

The signedRenewalInfo is only present in App Store Server Notifications V2 for auto-renewable subscriptions. It is the same case as status that it is already optional.

According to the documentation:

Subscription renewal information signed by the App Store, in JSON Web Signature (JWS) format. This field appears only for notifications sent for auto-renewable subscriptions.

So we can safely decode this field checking if it is present first.

agisboye commented 1 year ago

Thanks! Released as v0.12.0. 😊