agisboye / app-store-server-api

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

make "signedRenewalInfo" optional in "NotificationData" #37

Closed fariassdev closed 11 months ago

fariassdev commented 11 months 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 11 months ago

Thanks! Released as v0.12.0. 😊