どのようにお手伝いできますか?

[旧バージョン]アプリ内課金のレシート検証

  • 更新

 重要

This article describes the deprecated Receipt validation feature. For more information, see Bulletin: Legacy Receipt validation is deprecated

At a glance: Implement receipt validation to protect against fraudulent in-app purchases made in iOS and Android app stores, and make sure an in-app purchase occurred as reported. Note: This is a legacy feature. Learn more about the new, fully automatic, and improved in-app purchase validation mechanism.

レシート検証のフロー

レシート検証の流れは以下のとおりです。

  1. エンドユーザーがアプリ内課金を実行。
  2. アプリストアが、課金が成功したことをアプリへ通知。
  3. アプリ開発者が、SDK のレシート検証関数を呼び出す。

    validateAndLogInAppPurchase
  4. SDK が AppsFlyer のレシート検証サービスを呼び出す。
  5. AppsFlyerが、課金が不正なものではないことを確認するために検証。
  6. Upon success, AppsFlyer internally creates a regular af_purchase event. Otherwise, the created event is marked as fraudulent (available via Protect360).
  7. AppsFlyer の検証サービスが結果を SDK に返す。
  8. The SDK transfers the receipt validation response to the app (either success or fail).
    If receipt validation fails, the event displays in the blocked in-app events raw-data report (available to Protect360 subscribers). 

レシート検証の実装方法については、以下の SDK ドキュメントをご参照ください。

注意:

  • iOSのsandboxアプリ(App Storeには公開されていないアプリ)の場合、レシート検証を実装するにはコードの追加が必要です。
  • sandbox環境で行われた購入イベントは、通常の af_purchase イベントとして記録され、AppsFlyer の管理画面やレポートに収益が反映されます。
  • The AppsFlyer receipt validation service is free of charge to all account plans.
  • Android では、購入時にエンドユーザーがインターネットに接続していない場合、レシート検証が null を返し、検証失敗と判断されることがあります。

 重要

Calling validateAndLogInAppPurchase also generates an af_purchase in-app event. As such, don't generate an af_purchase event when validating. Doing so results in duplicate revenue events.

 注意

  • The legacy receipt validation explained here does not support StoreKit v2. For the current version, see Set up integration with iOS App Store.
  • アプリ内課金のレシート検証機能は、Android のサードパーティのアプリストアではサポートされていません。