Skip to main content

Available Events

This is a list of all supported events triggered by Liap once a server notification is received. Each event is documented below, and you can follow this guide to learn how to use them.

App Store Events

🎉 New in 1.2.x

Both App Store server notifications v1 and v2 are supported.

📝 Note

The v2 Event names are written in bold. The v1 Event names are written in italic. If an event name is bold and italic, it means that the event is available in both v1 and v2.

EventNamespaceDescription
Following events are available in v1 and v2
Consumption request 1 & 2Imdhemy\Purchases\Events\AppStore\ConsumptionRequestThe customer initiated a refund request for a consumable in-app purchase, and the App Store is requesting that you provide consumption data.Apple support requested the user to consume the product.
Did change renewal pref 1 & 2Imdhemy\Purchases\Events\AppStore\DidChangeRenewalPrefThe customer made a change in their subscription plan that takes effect at the next renewal. The currently active plan isn’t affected.
Did change renewal status 1 & 2Imdhemy\Purchases\Events\AppStore\DidChangeRenewalStatusIndicates a change in the subscription renewal status.
Did fail to renew 1 & 2Imdhemy\Purchases\Events\AppStore\DidFailToRenewIndicates a subscription that failed to renew due to a billing issue.
Did renew 1 & 2Imdhemy\Purchases\Events\AppStore\DidRenewIndicates that a customer’s subscription has successfully auto-renewed for a new transaction period.
Refund 1 & 2Imdhemy\Purchases\Events\AppStore\RefundIndicates that the App Store successfully refunded a transaction for a consumable in-app purchase, a non-consumable in-app purchase, or a non-renewing subscription.
Revoke 1 & 2Imdhemy\Purchases\Events\AppStore\RevokeIndicates that an in-app purchase the user was entitled to through Family Sharing is no longer available through sharing.
Following events are available in v2
Expired 2Imdhemy\Purchases\Events\AppStore\ExpiredIndicates that a subscription has expired.
Grace period expired 2Imdhemy\Purchases\Events\AppStore\GracePeriodExpiredIndicates that the billing grace period has ended without renewing the subscription
Offer redeemed 2Imdhemy\Purchases\Events\AppStore\OfferRedeemedIndicates that a customer redeemed an offer code.
Price increase 2Imdhemy\Purchases\Events\AppStore\PriceIncreaseIndicates that the system has informed the user of an auto-renewable subscription price increase.
Refund declined 2Imdhemy\Purchases\Events\AppStore\RefundDeclinedIndicates that the App Store declined a refund request initiated by the app developer.
Renewal extended 2Imdhemy\Purchases\Events\AppStore\RenewalExtendedIndicates that the App Store extended the subscription renewal date that the developer requested.
Subscribed 2Imdhemy\Purchases\Events\AppStore\SubscribedIndicates that the user subscribed to a product.
Following events are available in v1
CancelImdhemy\Purchases\Events\AppStore\CancelApple support cancelled the auto-renewable subscription and the user received a refund.
Did recoverImdhemy\Purchases\Events\AppStore\DidRecoverIndicates a successful automatic renewal of an expired subscription that failed to renew in the past.
Initial buyImdhemy\Purchases\Events\AppStore\InitialBuyOccurs at the user’s initial purchase of the subscription.
Interactive renewalImdhemy\Purchases\Events\AppStore\InteractiveRenewalIndicates the customer renewed a subscription interactively, either by using your app’s interface, or on the App Store in the account’s Subscriptions settings.
Price increase consentImdhemy\Purchases\Events\AppStore\PriceIncreaseConsentIndicates that the App Store has started asking the customer to consent to your app’s auto-renewable subscription price increase that requires consent.
RenewalImdhemy\Purchases\Events\AppStore\RenewalDEPRECATED Use Did recover instead.

Google Play Events

EventNamespaceDescription
Subscription recoveredImdhemy\Purchases\Events\GooglePlay\SubscriptionRecoveredA subscription was recovered from account hold.
Subscription renewedImdhemy\Purchases\Events\GooglePlay\SubscriptionRenewedAn active subscription was renewed.
Subscription canceledImdhemy\Purchases\Events\GooglePlay\SubscriptionCanceledA subscription was either voluntarily or involuntarily cancelled. For voluntary cancellation, sent when the user cancels.
Subscription purchasedImdhemy\Purchases\Events\GooglePlay\SubscriptionPurchasedA new subscription was purchased.
Subscription on holdImdhemy\Purchases\Events\GooglePlay\SubscriptionOnHoldA subscription has entered account hold (if enabled).
Subscription in grace periodImdhemy\Purchases\Events\GooglePlay\SubscriptionInGracePeriodA subscription has entered grace period (if enabled).
Subscription restartedImdhemy\Purchases\Events\GooglePlay\SubscriptionRestartedUser has restored their subscription from Play > Account > Subscriptions. The subscription was canceled but had not expired yet when the user restores.
Subscription price change confirmedImdhemy\Purchases\Events\GooglePlay\SubscriptionPriceChangeConfirmedA subscription price change has successfully been confirmed by the user.
Subscription deferredImdhemy\Purchases\Events\GooglePlay\SubscriptionDeferredA subscription's recurrence time has been extended.
Subscription pausedImdhemy\Purchases\Events\GooglePlay\SubscriptionPausedA subscription has been paused.
Subscription pause schedule changedImdhemy\Purchases\Events\GooglePlay\SubscriptionPauseScheduleChangedA subscription pause schedule has been changed.
Subscription revokedImdhemy\Purchases\Events\GooglePlay\SubscriptionRevokedA subscription has been revoked from the user before the expiration time.
Subscription expiredImdhemy\Purchases\Events\GooglePlay\SubscriptionExpiredA subscription has expired.

How to track refunds in Google Play

There are two ways for a user to request refund for a subscription in Google Play: either by sending a request to Google or by contacting the developer.

If a user requests a refund from the developer, you as a developer can keep track of the process. However, if a user requests a refund from Google, you will not receive any notification if the refund is successful or not.

From the developers experience, there is an indirect way to track refunds. after a subscription is refunded two real-time events are sent: SubscriptionCanceled followed by SubscriptionRevoked.

On your server, you can treat the SubscriptionCanceled event as a normal cancel, then if that event is followed by a SubscriptionRevoked event, you can mark it as a refund.