Type

notification_type

The type that describes the subscription event for which the App Store sent the notification.

Declaration

string notification_type

Possible Values

CANCEL

Indicates that either Apple customer support canceled the subscription or the user upgraded their subscription. The cancellation_date key contains the date and time of the change.

DID_CHANGE_RENEWAL_PREF

Indicates the customer made a change in their subscription plan that takes effect at the next renewal. The currently active plan is not affected.

DID_CHANGE_RENEWAL_STATUS

Indicates a change in the subscription renewal status. Check auto_renew_status_change_date_ms and auto_renew_status in the JSON response to know the date and time of the last status update and the current renewal status.

DID_FAIL_TO_RENEW

Indicates a subscription that failed to renew due to a billing issue. Check is_in_billing_retry_period to know the current retry status of the subscription, and grace_period_expires_date to know the new service expiration date if the subscription is in a billing grace period.

DID_RECOVER

Indicates successful automatic renewal of an expired subscription that failed to renew in the past. Check expires_date to determine the next renewal date and time.

INITIAL_BUY

Occurs at the initial purchase of the subscription. Store latest_receipt on your server as a token to verify the user’s subscription status at any time, by validating it with the App Store.

INTERACTIVE_RENEWAL

Indicates the customer renewed a subscription interactively, either by using your app’s interface, or on the App Store in the account's Subscriptions settings. Make service available immediately.

RENEWAL

Indicates successful automatic renewal of an expired subscription that failed to renew in the past. Check expires_date to determine the next renewal date and time.

Discussion

You receive and can react to server notifications in real time for the subscription events these notification_type values describe.

Handle Use Cases for Notification Events

You can handle various use cases in the customer's subscription life cycle based on the notifications you receive from the App Store. Here are some examples of server notifications you can expect to receive for the specified subscription event:

Subscription event

Notification types triggered

Initial purchase

INITIAL_BUY

Subscription is active; upgrade to another SKU

CANCEL, DID_CHANGE_RENEWAL_STATUS, INTERACTIVE_RENEWAL

Subscription is active; downgrade to another SKU

INTERACTIVE_RENEWAL, DID_CHANGE_RENEWAL_PREF

Subscription has expired; resubscribe to the same SKU

DID_CHANGE_RENEWAL_STATUS

Subscription has expired; resubscribe to another SKU (upgrade or downgrade)

INTERACTIVE_RENEWAL, DID_CHANGE_RENEWAL_STATUS

Auto-renewal disabled (canceled) from the App Store account's Subscriptions settings

DID_CHANGE_RENEWAL_STATUS

AppleCare refund

CANCEL, DID_CHANGE_RENEWAL_STATUS

Subscription failed to renew because of a billing issue

DID_FAIL_TO_RENEW

Expired subscription recovered by App Store through a billing retry

DID_RECOVER

Subscription churned after failed billing retry attempts

DID_CHANGE_RENEWAL_STATUS

See Also

Server Notification

object responseBody

The JSON data sent in the server notification from the App Store.