In App Billing extension developed by Akshat Developer. Using this extension you can sell digital in-app products and subscriptions in your app.
InAppBilling
In App Billing extension developed by Akshat Developer. Using this extension you can sell digital in-app products and subscriptions in your app.
Methods:
StartConnection
Starts up BillingClient setup process asynchronously.
EndConnection
Ends the connection with billing client
IsReady
Checks if the client is currently connected to the service, so that requests to other methods will succeed.
Return Type: boolean
IsSubscriptionSupported
Returns if subscription feature is supported or not.
Return Type: boolean
GetProduct
Performs a network query of the details of products available for sale in your app.
Parameter | Type |
---|---|
productId | text |
GetSubscription
Performs a network query of the details of subscription available for sale in your app.
Parameter | Type |
---|---|
subscriptionId | text |
LaunchProductPurchase
Initiates the billing flow for an in-app product purchase.
Parameter | Type |
---|---|
productDetails | any |
LaunchSubscriptionPurchase
Launches the billing-flow for an in-app subscription purchase.
Parameter | Type |
---|---|
subscriptionDetails | any |
offerToken | text |
ConsumePurchase
Parameter | Type |
---|---|
purchaseToken | text |
GetPurchaseDetails
Retrieves the purchase details.
Parameter | Type |
---|---|
purchase | any |
QueryPurchases
Returns purchases details for currently owned items bought within your app.
Parameter | Type |
---|---|
productType | text |
QueryPurchasesHistory
Returns purchases history details.
Parameter | Type |
---|---|
productType | text |
GetPurchaseJSON
Returns the JSON format details the purchase.
Parameter | Type |
---|---|
purchase | any |
Return Type: dictionary
IsPurchased
Returns if the given product is purchased or not.
Parameter | Type |
---|---|
productId | text |
purchasesList | list |
Return Type: boolean
GetPurchaseHistoryRecordJSON
Returns the JSON format record of purchases history from the given purchase record.
Parameter | Type |
---|---|
purchaseRecord | any |
Return Type: dictionary
IsPurchaseAcknowledged
Returns if the given purchase is acknowledged or not.
Parameter | Type |
---|---|
purchase | any |
Return Type: boolean
AcknowledgePurchase
Used to acknowledge a purchase
Parameter | Type |
---|---|
purchaseToken | text |
Events:
Error
Parameter | Type |
---|---|
message | text |
InAppMessageResponse
Called when response from In App Message is detected.
Parameter | Type |
---|---|
responseCode | number |
purchaseToken | text |
ConnectionSuccessful
Called when connection is successful.
ConnectionFailed
Called when connection is failed.
Parameter | Type |
---|---|
message | text |
ConnectionDisconnected
Called when connection is disconnected.
GotProduct
Called when the product has been successfully retrived by GetProduct method.
Parameter | Type |
---|---|
productId | text |
title | text |
name | text |
description | text |
price | text |
productDetails | any |
FailedToGetProduct
Called when the product failed to retrieve by GetProduct method.
Parameter | Type |
---|---|
message | text |
GotSubscription
Called when subscription details is successfully retrived.
Parameter | Type |
---|---|
subscriptionId | text |
subscriptionName | text |
title | text |
description | text |
priceList | list |
offerTokenList | list |
offerIdList | list |
basePlanIdList | list |
subscriptionDetails | any |
FailedToGetSubscription
Called when subscription details is failed to get.
Parameter | Type |
---|---|
message | text |
ProductPurchaseLaunched
Called when purchase is successfully launched.
ProductPurchaseFailedToLaunch
Called when purchase failed to launch.
Parameter | Type |
---|---|
response | text |
SubscriptionPurchaseLaunched
Called when purchase is successfully launched.
SubscriptionPurchaseFailedToLaunch
Called when purchase failed to launch.
Parameter | Type |
---|---|
response | text |
ProductConsumedSuccessfully
Called when purchase is consumed successfully
Parameter | Type |
---|---|
purchaseToken | text |
ProductConsumeFailed
Called when the purchase failed to consume
Parameter | Type |
---|---|
message | text |
purchaseToken | text |
PurchaseSuccessful
Called when purchase is successful.
Parameter | Type |
---|---|
purchaseInstance | any |
purchaseToken | text |
PurchaseFailed
Called when purchase is failed due to any reason.
Parameter | Type |
---|---|
response | text |
PurchaseCancelled
Called when purchase is cancelled.
Parameter | Type |
---|---|
response | text |
GotPurchaseDetails
Called when purchase details have been retrived successfully
Parameter | Type |
---|---|
purchaseState | number |
purchaseToken | text |
responseJSON | text |
orderId | text |
products | list |
purchaseTime | number |
quantity | number |
signature | text |
QueryPurchasesSuccess
Called when query purchases is successful
Parameter | Type |
---|---|
purchasesList | list |
response | text |
QueryPurchasesFailed
Called when purchase query failed due to some reason
Parameter | Type |
---|---|
response | text |
QueryPurchaseHistorySuccess
Called when query purchases history is successful
Parameter | Type |
---|---|
purchasesList | list |
response | text |
QueryPurchaseHistoryFailed
Called when purchase history query failed due to some reason
Parameter | Type |
---|---|
response | text |
AcknowledgeSuccessful
Called when acknowledge successful
Parameter | Type |
---|---|
purchaseToken | text |
AcknowledgeFailed
Called when the purchase is failed to acknowledge
Parameter | Type |
---|---|
response | text |
purchaseToken | text |
Properties:
TestMode
Sets if test mode is enabled or not.
ShowInAppMessages
Overlays billing related messages on top of the calling app.
ProductTypeInApp
ProductTypeSubscription
This documentation was generated using Akshat Developer's Documentation Generator.
Usage
Changelogs
π V2 (SDK 7.0.0) (23 May 2024)
Major Update
--> Added support for subscription
--> Changed usage
--> Divided subscription and product purchase usage
--> Reduced extension size from 1.6MB to 300KB
V7.0.0 (23 May 2024)
Extension Released.
Video Tutorial
Download
Liked My Work?
Support me on: