Last active
June 27, 2022 04:21
-
-
Save cp-sumi-k/66388c12455bf53d329d476828445244 to your computer and use it in GitHub Desktop.
https://medium.com/canopas/golang-handling-appstore-server-to-server-v2-notifications-ef1e8eb05118 - app-store-notification-structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Notification signed payload | |
type NotificationPayload struct { | |
jwt.StandardClaims | |
NotificationType string `json:"notificationType"` | |
Subtype string `json:"subtype"` | |
NotificationUUID string `json:"notificationUUID"` | |
NotificationVersion string `json:"notificationVersion"` | |
Data NotificationData `json:"data"` | |
} | |
// Notification Data | |
type NotificationData struct { | |
jwt.StandardClaims | |
AppAppleID int `json:"appAppleId"` | |
BundleID string `json:"bundleId"` | |
BundleVersion string `json:"bundleVersion"` | |
Environment string `json:"environment"` | |
SignedRenewalInfo string `json:"signedRenewalInfo"` | |
SignedTransactionInfo string `json:"signedTransactionInfo"` | |
} | |
// Notification Transaction Info | |
type TransactionInfo struct { | |
jwt.StandardClaims | |
TransactionId string `json:"transactionId"` | |
OriginalTransactionID string `json:"originalTransactionId"` | |
WebOrderLineItemID string `json:"webOrderLineItemId"` | |
BundleID string `json:"bundleId"` | |
ProductID string `json:"productId"` | |
SubscriptionGroupIdentifier string `json:"subscriptionGroupIdentifier"` | |
PurchaseDate int `json:"purchaseDate"` | |
OriginalPurchaseDate int `json:"originalPurchaseDate"` | |
ExpiresDate int `json:"expiresDate"` | |
Type string `json:"type"` | |
InAppOwnershipType string `json:"inAppOwnershipType"` | |
SignedDate int `json:"signedDate"` | |
Environment string `json:"environment"` | |
} | |
// Notification Renewal Info | |
type RenewalInfo struct { | |
jwt.StandardClaims | |
OriginalTransactionID string `json:"originalTransactionId"` | |
ExpirationIntent int `json:"expirationIntent"` | |
AutoRenewProductId string `json:"autoRenewProductId"` | |
ProductID string `json:"productId"` | |
AutoRenewStatus int `json:"autoRenewStatus"` | |
IsInBillingRetryPeriod bool `json:"isInBillingRetryPeriod"` | |
SignedDate int `json:"signedDate"` | |
Environment string `json:"environment"` | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment