What the server-to-server responseBody looks like?

Viewed 90

What the server-to-server responseBody looks like and how should i know if a user cancelled subscription or refunded? I have seen this doc: https://developer.apple.com/documentation/appstoreservernotifications/responsebody, but still confused.I have not seen a field like cacellation_date. Should i parse the latest_receipt_info, and then if user cacel subscription, there will be cacellation_data and cacallataion_intent?

1 Answers

The cancellation fields are only for the case that the Apple Support cancelled the subscription for a customer. In that case you get the cancellation_date_ms field in the server-to-server response.

cancellation_date_ms

The time and date that Apple customer support canceled a transaction or the time and date the user upgraded an auto-renewable subscription.

more details here.

cancellation_date is the corresponding field in the receipt itself.

Note: cancellation_date and cancellation_date_ms both only exist in the production environment.

To check if a user cancelled your subscription, you would use expiration_intent (The reason a subscription expired).

You can use this value to:

  • Decide whether to survey the subscribers who have opted in to an account on your system or show alternative subscription products within the same group, if the value is “1”.
  • Decide whether to show the same or alternative subscription products, if the value is “2”, since the user did not actively make the choice to unsubscribe.
  • Decide whether to present a subscription offer to win back the user if the value is "1".

more details here

Related