Skip to content
Apple iTunes In-app purchase verification tool
Branch: master
Clone or download

Latest commit

Latest commit 2b74435 Dec 27, 2019


Type Name Latest commit message Commit time
Failed to load latest commit information.
docs migrate to setup.cfg Dec 27, 2019
itunesiap migrate to setup.cfg Dec 27, 2019
tests fix test / py37 Feb 21, 2019
.gitignore refactoring Jul 21, 2017
.travis.yml migrate to setup.cfg Dec 27, 2019
LICENSE python3 compatibility Jul 21, 2013 2.6.0 Jun 17, 2018
README.rst pip install `itunes-iap`, not `itunesiap`. Aug 7, 2017
codecov.yml codecov May 4, 2016
pyproject.toml migrate to setup.cfg Dec 27, 2019
setup.cfg migrate to setup.cfg Dec 27, 2019 migrate to setup.cfg Dec 27, 2019
tox.ini fix test / py37 Feb 21, 2019


itunes-iap v2

Python 2 & 3 compatible! Even with :mod:`asyncio` support!


Create request to create a request to itunes verifying api.

>>> import itunesiap
>>> try:
>>>     response = itunesiap.verify(raw_data)  # base64-encoded data
>>> except itunesiap.exc.InvalidReceipt as e:
>>>     print('invalid receipt')
>>> print response.receipt.last_in_app.product_id  # other values are also available as property!
The common attributes are:
product_id, original_transaction_id and quantity.
See the full document in:


>>> import itunesiap
>>> response = await itunesiap.aioverify(raw_data)  # verify -> aioverify

The other parts are the same.

See the full document in:


PyPI is the recommended way.

$ pip install itunes-iap
To browse versions and tarballs, visit:

Apple in-review mode

In review mode, your actual users who use older versions want to verify in production server but the reviewers in Apple office want to verify in sandbox server.

Note: The default env is production mode which doesn't allow any sandbox verifications.

You can change the verifying mode by specifying env.

>>> # review mode
>>> itunesiap.verify(raw_data,

Note for v1 users

There was breaking changes between v1 and v2 APIs.

  • Specify version 0.6.6 for latest v1 API when you don't need new APIs.
  • Or use import itunesiap.legacy as itunesiap instead of import itunesiap. (from itunesiap import xxx to from itunesiap.legacy import xxx)



You can’t perform that action at this time.