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 google_apple_inapp_purchases
Usage
Currently google_apple_inapp_purchases-purchases supports Google Play and App Store subscription services. But, product purchases is available retrieving raw data.
Google Play:
from google_apple_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 google_apple_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file google-apple-inapp-purchases-0.6.tar.gz.
File metadata
- Download URL: google-apple-inapp-purchases-0.6.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db2f6edbcce3049bd2cb99ba28fe813c5cf40ce154fba2993036f67b1f351eed
|
|
| MD5 |
f59b98c3cfdfa1de82fe73f71574d13e
|
|
| BLAKE2b-256 |
995314e00b77246deadb14ed4c47f9268e7079f4a2cee43b984e9ac86ec5e0d3
|