Versions in this module Expand all Collapse all v1 v1.1.4 Sep 28, 2026 v1.1.3 Sep 5, 2026 v1.1.2 Aug 11, 2026 v1.1.1 Aug 4, 2026 v1.1.0 Aug 3, 2026 Changes in this version + const AppleProductionEnvironment + const AppleReceiptIsFromTestSandbox + const AppleReceiptValidationURLProduction + const AppleReceiptValidationURLSandbox + const AppleRootPEM + const AppleSandboxEnvironment + var ErrInvalidSignatureHuawei = errors.New("inAppPurchaseData invalid signature") + var ErrNon200ServiceApple = errors.New("non-200 response from Apple service") + var ErrNon200ServiceGoogle = errors.New("non-200 response from Google service") + var ErrNon200ServiceHuawei = errors.New("non-200 response from Huawei service") + var HTTPClient = &http.Client + func IsJWS(receipt string) bool + func ParseMsTimestamp(ms string) time.Time + func ValidateAppleJWSSignature(receipt string) error + func ValidateReceiptHuawei(ctx context.Context, httpc *http.Client, ...) (*ValidateReceiptHuaweiResponse, *InAppPurchaseDataHuawei, []byte, error) + func VerifySignatureHuawei(base64EncodedPublicKey, data, signature string) error + type AppleJWSTransaction struct + Environment string + ExpiresDate int64 + OriginalTransactionID string + ProductID string + PurchaseDate int64 + RevocationDate int64 + TransactionID string + func ParseAppleJWSTransaction(receipt string) (*AppleJWSTransaction, error) + type InAppPurchaseDataHuawei struct + AccountFlag int + ApplicationID string + AutoRenewing bool + Kind int + OrderID string + PackageName string + ProductID string + PurchaseTime int64 + PurchaseToken string + PurchaseType int + type ReceiptGoogle struct + OrderID string + PackageName string + ProductID string + PurchaseState int + PurchaseTime int64 + PurchaseToken string + func DecodeReceiptGoogle(receipt string) (*ReceiptGoogle, error) + type SubscriptionV2GoogleResponse struct + LineItems []struct{ ... } + StartTime time.Time + func ValidateSubscriptionGoogle(ctx context.Context, httpc *http.Client, ...) (*SubscriptionV2GoogleResponse, []byte, error) + type ValidateReceiptAppleResponse struct + Environment string + LatestReceiptInfo []struct{ ... } + Receipt ... + Status int + func ValidateLegacyReceiptApple(ctx context.Context, httpc *http.Client, password, receipt string) (*ValidateReceiptAppleResponse, []byte, error) + type ValidateReceiptGoogleResponse struct + AcknowledgementState int + ConsumptionState int + Kind string + OrderID string + PurchaseState int + PurchaseTimeMillis string + PurchaseType int + RegionCode string + func ValidateProductGoogle(ctx context.Context, httpc *http.Client, ...) (*ValidateReceiptGoogleResponse, []byte, error) + type ValidateReceiptHuaweiResponse struct + DataSignature string + PurchaseTokenData InAppPurchaseDataHuawei + ResponseCode string + ResponseMessage string + type ValidationError struct + Err error + Payload string + StatusCode int + func (e *ValidationError) Error() string + func (e *ValidationError) Unwrap() error