有効な定期購入 Grace Period
有料機能を維持
Account Hold
有料機能を制限
解約
Grace PeriodとAccount Hold
有効な定期購入 Grace Period
有料機能を維持
Billing retry state
有料機能を制限
解約
Play Store
App Store
10
支払いに問題が発生 💥
支払いに問題が発生 💥
Slide 11
Slide 11 text
Grace PeriodとAccount Holdの効果は高い
> Developers on Google Play who use a grace period see a 57% higher
recovery rate from renewal declines.
> ref:
https://medium.com/googleplaydev/how-to-win-back-subscribers-who-cancel-9960731adeb
> For example, account hold has helped developers achieve 8% lower
involuntary churn and 35% higher payment decline recovery rate
compared to developers without account hold.
> ref:
https://android-developers.googleblog.com/2020/06/new-features-to-acquire-and-retain-subscri
bers.html
note: 引用文のBoldは発表者が追加した 11
Slide 12
Slide 12 text
Grace PeriodとAccount Holdの期間
Play Store App Store
Grace Period 3, 7, 14, 30日間 3, 6, 16, 28 日間
Account Hold 30日間 60日間
12
Slide 13
Slide 13 text
Grace PeriodとAccount Holdの期間
Play Store App Store
Grace Period 3, 7, 14, 30日間 3, 6, 16, 28 日間
Account Hold 30日間 60日間
Play StoreはデフォルトON、App StoreはデフォルトOFF
13
Slide 14
Slide 14 text
Grace PeriodとAccount Holdの期間
Play Store App Store
Grace Period 3, 7, 14, 30日間 3, 6, 16, 28 日間
Account Hold 30日間 60日間
設定がなく常に有効である
14
Slide 15
Slide 15 text
● Play StoreとApp Storeでのそれぞれの実行イメージを紹介する
● 説明に使う例の状況設定
○ 請求対象期間は1か月
○ Grace Period
■ Play Store: 14日
■ App Store: 16日
Grace PeriodとAccount Holdの期間例
15
1. ライセンステスターの登録をする
a. Play Consoleで[設定] > [ライセンス テスト] を選択
b. メーリング リストからライセンステスターを選択する
c. メールアドレスを追加する
2. ライセンステスターアカウントでPlay ストアアプリにログインする
a. 注意:Play ストアアプリに複数のアカウントでログインしている場合、
最初にログインしたアカウントがテスト対象となる
テストができる環境を整える(Play Store)
26
Slide 27
Slide 27 text
3. Play Consoleの基本プランから猶予期間の設定を有効にする
テストができる環境を整える(Play Store)
App Storeと異なり、Sandbox
環境でのみ提供するオプショ
ンは存在しない
27
● 購入ステータスを確認するため次のAPIを呼ぶ
○ deprecated: verifyReceipt
○ Get All Subscription Statuses
● StoreKit 2、Get All Subscription Statuses、App Store Server
Notifications V2の登場により従来のverifyReceiptと状況が変わった
○ クライアントでレシートが検証されているため、購入ステータスに集中
できるようになった
App Store Server API (App Store)
44
実装コード
val params = InAppMessageParams.newBuilder()
.addInAppMessageCategoryToShow(InAppMessageParams.
InAppMessageCategoryId
.TRANSACTIONAL)
.build()
billingClient.showInAppMessages(activity
, params) { inAppMessageResult ->
when(inAppMessageResult.
responseCode) {
InAppMessageResult.
InAppMessageResponseCode
.NO_ACTION_NEEDED -> {
// The flow has finished and there is no action needed from developers.
}
InAppMessageResult.
InAppMessageResponseCode
.SUBSCRIPTION_STATUS_UPDATED -> {
// The subscription status changed. For example, a subscription
// has been recovered from a suspend state. Developers should
// expect the purchase token to be returned with this response
// code and use the purchase token with the Google Play
// Developer API.
}
}
}
62