Do I need the server side to support iOS Grace Period of auto-renewable subscriptions?
Asked Answered
C

1

7

Apple introduced Grace Period for subscriptions.

https://developer.apple.com/app-store-connect/whats-new/?id=billinggraceperiod

I still can't tell if I need to set up the server-side to support this feature or just checking the receipt on the server is just an recommended way and I can use Grace Period without the server-side?

For example, you can check the receipt in the device to use auto-renewable subscriptions on iOS without the server-side, but checking the receipt with the server is a recommended way to avoid scum.

The grace period descriptions say you need to check receipts and server notifications, I guess you can check receipts on the device only if you want, but not sure about server notifications part.

Any help is appreciated!

Close answered 15/9, 2019 at 8:13 Comment(0)
D
1

You can do it without server but not with offline on-device receipt validation as you need fresh receipt info from /verifyReceipt endpoint from Apple servers. That's why it's recommended to use server-to-server validation as direct network request is vulnerable to man-in-the-middle attack.

Parsing receipt validation response you can get info whether subscription is in grace period by looking for grace_period_expires_date_ms in pending_renewal_info and also check is_in_billing_retry_period to indicate Apple is still trying to collect payment.

Receipt response documentation: https://developer.apple.com/documentation/appstorereceipts/verifyreceipt Handling billing grace period documentation: https://developer.apple.com/documentation/storekit/in-app_purchase/reducing_involuntary_subscriber_churn

Dependable answered 29/11, 2019 at 9:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.