定期購入再購入 t1 t2 Is SKU returned in queryPurchases()? yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間
定期購入再購入 継続課金に失敗 猶予期間開始 t1 t2 Is SKU returned in queryPurchases()? yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 Fields in server API, Purchase.subscriptions
定期購入再購入 継続課金に失敗 猶予期間開始 猶予期間 (サービスは継続利用可能) t1 t2 Is SKU returned in queryPurchases()? yes yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 t3 Fields in server API, Purchase.subscriptions
定期購入再購入 継続課金に失敗 猶予期間開始 猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU returned in queryPurchases()? yes yes no 定期購入 自動キャンセル SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _CANCELED SUBSCRIPTION _RENEWED 定期購入有効期間 Fields in server API, Purchase.subscriptions
t1 t2 Is SKU returned in queryPurchases()? yes Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入
猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU returned in queryPurchases()? yes yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _ON_HOLD 継続課金に失敗 アカウントの一時停止開始 SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 継続課金に失敗 猶予期間開始
猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU returned in queryPurchases()? yes yes SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true アカウントの一時停止 (サービスは利用不可) expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true t4 no SUBSCRIPTION _ON_HOLD SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 継続課金に失敗 猶予期間開始 継続課金に失敗 アカウントの一時停止開始
猶予期間 (サービスは継続利用可能) t1 t2 t3 Is SKU returned in queryPurchases()? yes yes no 定期購入 自動キャンセル SUBSCRIPTION_IN_ GRACE_PERIOD Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t2) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true SUBSCRIPTION _CANCELED アカウントの一時停止 (サービスは利用不可) expiryTimeMillis: time of grace period end (t3) paymentState: 0 autoRenewing: true t4 no SUBSCRIPTION _ON_HOLD SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 継続課金に失敗 猶予期間開始 継続課金に失敗 アカウントの一時停止開始
t1 Is SKU returned in queryPurchases()? yes Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t3) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 t3
解約予約期間 (この間は復元可能) t1 t2 t3 Is SKU returned in queryPurchases()? yes yes SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t3) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: false SUBSCRIPTION _EXPIRED SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 ユーザーが自発的に解約 (解約予約)
解約予約期間 (この間は復元可能) t1 t2 t3 Is SKU returned in queryPurchases()? yes yes SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t3) paymentState: 1 autoRenewing: true expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: false 定期購入解約 expiryTimeMillis: time of grace period end (t3) paymentState: 1 autoRenewing: false no SUBSCRIPTION _EXPIRED SUBSCRIPTION _RENEWED 定期購入有効期間 定期購入再購入 ユーザーが自発的に解約 (解約予約)
定期購入再購入 t1 Real-time Developer Notifications expiryTimeMillis: time of next renewal (t4) paymentState: 1 autoRenewing: true SUBSCRIPTION _RENEWED 定期購入有効期間 Is SKU returned in queryPurchases()? yes t4 Fields in server API, Purchase.subscriptions yes 定期購入再購入
定期購入再購入 t1 t2 t4 SUBSCRIPTION _CANCELED Real-time Developer Notifications expiryTimeMillis: time of next renewal (t4) paymentState: 1 autoRenewing: true expiryTimeMillis: time of subscription end (t4) paymentState: 1 autoRenewing: false SUBSCRIPTION _RENEWED 定期購入有効期間 Is SKU returned in queryPurchases()? yes yes SUBSCRIPTION _EXPIRED 解約予約期間 (この間は復元可能) ユーザーが自発的に解約 (解約予約) no 定期購入解約 Fields in server API, Purchase.subscriptions
定期購入再購入 t1 t2 t4 SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in server API, Purchase.subscriptions expiryTimeMillis: time of next renewal (t4) paymentState: 1 autoRenewing: true expiryTimeMillis: time of subscription end (t4) paymentState: 1 autoRenewing: false SUBSCRIPTION _RENEWED 定期購入有効期間 Is SKU returned in queryPurchases()? yes yes t3 SUBSCRIPTION _RESTARTED 解約予約を キャンセル SUBSCRIPTION _RENEWED expiryTimeMillis: time of next renewal (t4) paymentState: 1 autoRenewing: true 解約予約期間 (この間は復元可能) ユーザーが自発的に解約 (解約予約) yes
(定期購入の再開) ● 解約予約した定期購入の有効期限が切れる前 ○ アプリ内から定期購入を再開する ○ Google Play Subscriptions Centerから定期 購入を再開する(Restore) ● 定期購入の有効期限が切れたあと ○ Google Play Subscriptions Centerから最大1 年の間に同じSKUを再購入する
有効期限が切れる前 Resubscribeではアプリ内からの再開となるため、 アプリ内に「再開」ボタンを設置する必要がある isAutoRenewingで解約予約中かを判別して導線 を表示する 考慮することが増えてしまうため、アプリ内に再開 導線を出すよりはGoogle Play Subscrition Center を開くようにするのがおすすめ 詳細はこちら: developer.android.com/goo gle/play/billing/subs#deep- link
定期購入再購入 t1 t2 Real-time Developer Notifications Fields in server API, Purchase.subscription s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? 定期購入 有効期間
定期購入再購入 t1 Real-time Developer Notifications Fields in server API, Purchase.subscription s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? SUBSCRIPTION_PAUSE_ SCHEDULE_CHANGE 定期購入 一時停止予約 定期購入 有効期間 expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: time of pause end (t3) t2 SUBSCRIPTION _CANCELED 定期購入 一時停止開始
定期購入再購入 t1 t2 SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in server API, Purchase.subscription s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: time of pause end (t3) SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? expiryTimeMillis: time of next renewal (t4) autoResumeTimeMillis: n/a SUBSCRIPTION_PAUSE_ SCHEDULE_CHANGE 定期購入 一時停止予約 t3 定期購入 有効期間 一時停止 (サービスは利用不可) 定期購入 一時停止開始 定期購入 有効期間 SUBSCRIPTION _RENEWED 一時停止終了 定期購入再購入
定期購入再購入 t1 t2 SUBSCRIPTION _CANCELED Real-time Developer Notifications Fields in server API, Purchase.subscription s expiryTimeMillis: time of next renewal (t2) autoResumeTimeMillis: n/a expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: time of pause end (t3) SUBSCRIPTION _RENEWED Is SKU returned in queryPurchases()? expiryTimeMillis: time of pause start (t2) autoResumeTimeMillis: n/a SUBSCRIPTION_PAUSE_ SCHEDULE_CHANGE 定期購入 一時停止予約 t3 再購入に失敗 定期購入の一時停止終了 アカウントの一時停止開始 アカウントの一時停止 (サービスは利用不可) 定期購入の一時停止 (サービスは利用不可) 定期購入 一時停止開始 定期購入 有効期間 SUBSCRIPTION_ _ON_HOLD
val params = BillingFlowParams.newBuilder() // Specify an obfuscated identifier to uniquely identify the // user’s account. .setObfuscatedAccountId(obfuscatedAccountId)
val params = BillingFlowParams.newBuilder() // Specify an obfuscated identifier to uniquely identify the // user’s account. .setObfuscatedAccountId(obfuscatedAccountId) // Optionally, specify an obfuscated identifier to uniquely // identify the character profile with the user’s account. .setObfuscatedProfileId(obfuscatedProfileId)
val params = BillingFlowParams.newBuilder() // Specify an obfuscated identifier to uniquely identify the // user’s account. .setObfuscatedAccountId(obfuscatedAccountId) // Optionally, specify an obfuscated identifier to uniquely // identify the character profile with the user’s account. .setObfuscatedProfileId(obfuscatedProfileId) billingClient.launchBillingFlow(activity, params.build())