Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Apple iTunes In-app purchase verification api.

Project Description
itunes-iap v2
~~~~~~~~~~~~~

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

.. image:: https://travis-ci.org/youknowone/itunes-iap.svg?branch=master
:target: https://travis-ci.org/youknowone/itunes-iap
.. image:: https://coveralls.io/repos/github/youknowone/itunes-iap/badge.svg?branch=master
:target: https://coveralls.io/github/youknowone/itunes-iap?branch=master

- Source code: `<https://github.com/youknowone/itunes-iap>`_
- Documentation: `<http://itunes-iap.readthedocs.io/>`_
- Distribution: `<https://pypi.python.org/pypi/itunes-iap/>`_


Quickstart
----------

Create request to create a request to itunes verifying api.

.. sourcecode:: python

>>> 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:
- :func:`itunesiap.verify`: The verifying function.
- :class:`itunesiap.receipt.Receipt`: The receipt object.


asyncio
-------

.. sourcecode:: python

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

The other parts are the same.

See the full document in:
- :func:`itunesiap.aioverify`: The verifying function.


Installation
------------

PyPI is the recommended way.

.. sourcecode:: shell

$ pip install itunesiap

To browse versions and tarballs, visit:
`<https://pypi.python.org/pypi/itunes-iap/>`_


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`.

.. sourcecode:: python

>>> # review mode
>>> itunesiap.verify(raw_data, env=itunesiap.env.review)


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`)


Contributors
------------

See https://github.com/youknowone/itunes-iap/graphs/contributors
Release History

Release History

This version
History Node

2.5.0

History Node

2.4.1

History Node

2.4.0

History Node

2.3.0

History Node

2.2.0

History Node

2.1.0

History Node

2.0.1

History Node

2.0.0

History Node

0.7.0

History Node

0.6.6

History Node

0.6.5

History Node

0.6.4

History Node

0.6.3

History Node

0.5.1

History Node

0.5

History Node

0.4.1

History Node

0.4

History Node

0.3

History Node

0.2.1

History Node

0.2

History Node

0.1.2

History Node

0.1.1

History Node

0.1

History Node

0.0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
itunes_iap-2.5.0-py2-none-any.whl (18.8 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Aug 2, 2017
itunes-iap-2.5.0.tar.gz (13.2 kB) Copy SHA256 Checksum SHA256 Source Jul 31, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting