Manage in-app purchases for Apple AppStore and Google Play
Project description
inapp-purchases
Manage in-app purchases for Apple AppStore and Google Play
Installation
pip install inapp-purchases
Usage
Currently inapp-purchases supports Google Play and App Store subscription services. But, product purchases is available retrieving raw data.
Google Play:
from inapp_purchases.google_play import GooglePlayService
service = GooglePlayService(
service_account_file='service-info.json',
# or service_account_info='service-info.json'
package_name='com.package.name'
)
purchase = service.get_subscription_purchase(
subscription_id='com.subscription.id',
token='purchase-token'
)
AppStore:
from inapp_purchases.app_store import AppStoreService
service = AppStoreService(
sandbox=True,
password='secret-password'
)
purchase = service.get_subscription_purchase(
receipt_data='receive-hash'
)
Response
{
'bundle_id': unicode,
'subscription_id': unicode,
'purchase_id': unicode,
'original_purchase_id': unicode,
'purchase_date_ms': int,
'original_purchase_date_ms': int,
'auto_renewing': bool,
'expires_date_ms': int,
'country_code': unicode,
'price_currency_code': unicode,
'price_amount': float,
'cancellation_date_ms': int,
'cancellation_reason': unicode,,
'payment_state': int,
'status': unicode,
'is_active': bool,
'is_trial_period': bool,
'expiration_intent': unicode,
}
TODO
- Exceptions
- Google Play products data response (the raw content is returned)
- AppStore products data response (the raw content is returned)
- Get list of products from AppStore
- Tests
- Retrieve more information from the services
- Documentation
- Examples
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
inapp-purchases-0.2.3.tar.gz
(5.0 kB
view details)
Built Distributions
File details
Details for the file inapp-purchases-0.2.3.tar.gz
.
File metadata
- Download URL: inapp-purchases-0.2.3.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
ca45ed605f8c614d8ba52a0b79ef6e912354c32cbf63521b5ca10835c1c343d3
|
|
MD5 |
208fe0c4dc16fbadf12bf8c4742859c7
|
|
BLAKE2b-256 |
c4eab6ac3dff90817e8d93db4819721279615ceeb52e8f148920cb7a964bb606
|
File details
Details for the file inapp_purchases-0.2.3-py3-none-any.whl
.
File metadata
- Download URL: inapp_purchases-0.2.3-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4797a13b7bdaaf35f70c353960099b6d7b190a33cb8849e314bb7af2071d6261
|
|
MD5 |
bece731ec713bb2e223a5d71284e1c01
|
|
BLAKE2b-256 |
d3d42123cbd2ca2365777acf87c96fc4199705c8cc2c8077ed5bcba244233201
|
File details
Details for the file inapp_purchases-0.2.3-py2-none-any.whl
.
File metadata
- Download URL: inapp_purchases-0.2.3-py2-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/2.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
13e5b934c62cd49d67e03e5cf92a384635c4b0c4e6b545bdf9e3e4357e1f86d7
|
|
MD5 |
d80360445b46da275e010df49256969c
|
|
BLAKE2b-256 |
673c231d38fb39fd84803933e196b77a545ead175317579ac0dd1d08d9164663
|