View Source AppleAppStore.Receipts (apple_app_store v0.1.0)

App Store Receipts - validates app and in-app purchase receipts with the App Store.

App Store Receipts has been deprecated by Apple.

Read more at https://developer.apple.com/documentation/appstorereceipts.

Summary

Types

The app's shared secret.

The Base64-encoded receipt data.

Functions

Sends a receipt to the App Store for verification.

Types

@type app_shared_secret() :: String.t()

The app's shared secret.

@type option() :: {:exclude_old_transactions, boolean()}
@type options() :: [option()]
@type receipt_data() :: String.t()

The Base64-encoded receipt data.

Functions

Link to this function

verify_receipt(receipt_data, app_shared_secret, options \\ [])

View Source
@spec verify_receipt(receipt_data(), app_shared_secret(), options()) ::
  {:ok, map()} | {:error, Tesla.Env.t()} | {:error, any()}

Sends a receipt to the App Store for verification.

The receipt will be sent to production environment first. If a 21007 status code is returned, then receipt will be sent to sandbox environment. Following this approach ensures that we do not have to switch between URLs while your application is tested, reviewed by App Review, or live in the App Store.

Read more at Validating receipts with the App Store.