WebhookEvent class

Constructors

WebhookEvent({WebhookCancellationReason? cancellationReason, String? currency, required WebhookEventEnvironment environment, double? expiresAt, required String id, required double occurredAt, required IapPlatform platform, double? priceAmountMicros, String? productId, required String projectId, String? purchaseToken, String? rawSignedPayload, required double receivedAt, double? renewsAt, required WebhookEventSource source, SubscriptionState? subscriptionState, required WebhookEventType type})
const
WebhookEvent.fromJson(Map<String, dynamic> json)
factory

Properties

cancellationReason WebhookCancellationReason?
Reason for cancellation, when applicable.
final
currency String?
Localized currency code (ISO 4217) at event time, when available.
final
environment WebhookEventEnvironment
final
expiresAt double?
When the current subscription period ends. Epoch milliseconds.
final
hashCode int
The hash code for this object.
no setterinherited
id String
Stable identifier suitable for idempotency. Derived from the source notification UUID where the store provides one (ASN v2 notificationUUID, RTDN message id); otherwise hashed from the canonicalized payload.
final
occurredAt double
Time the underlying event occurred at the store. Epoch milliseconds.
final
platform IapPlatform
final
priceAmountMicros double?
Price in micros (1/1,000,000 of the currency unit) at event time, when available. Matches Google Play's priceAmountMicros convention; iOS values are converted.
final
productId String?
Product the event pertains to. May be null for account-level events.
final
projectId String
kit project that owns the subscription / purchase this event refers to.
final
purchaseToken String?
Cross-platform purchase identity used to correlate this event with an existing purchase record. iOS: originalTransactionId. Android: purchaseToken. Null for TestNotification events (Apple ASN v2 / Google RTDN test payloads carry no transaction); always present for every other event type.
final
rawSignedPayload String?
Original signed payload from the store. ASN v2 events expose the JWS string; RTDN events expose the base64-decoded Pub/Sub message JSON. Provided so that consumers can independently verify or extract platform-specific fields. kit always validates this payload before emitting the event.
final
receivedAt double
Time kit ingested and normalized this event. Epoch milliseconds.
final
renewsAt double?
When auto-renewal will charge again. Epoch milliseconds.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source WebhookEventSource
final
subscriptionState SubscriptionState?
Normalized subscription state at the time of event, when the event refers to a subscription. Null for one-time purchase events.
final
type WebhookEventType
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited