Skip to content

Instantly share code, notes, and snippets.

@cp-sumi-k
Last active June 27, 2022 04:21
Show Gist options
  • Save cp-sumi-k/66388c12455bf53d329d476828445244 to your computer and use it in GitHub Desktop.
Save cp-sumi-k/66388c12455bf53d329d476828445244 to your computer and use it in GitHub Desktop.
// 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