In App Billing

In App Billing extension developed by Akshat Developer. Using this extension you can sell digital in-app products and subscriptions in your app.

Blocks:

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.

ParameterType
productIdtext

GetSubscription

Performs a network query of the details of subscription available for sale in your app.

ParameterType
subscriptionIdtext

LaunchProductPurchase

Initiates the billing flow for an in-app product purchase.

ParameterType
productDetailsany

LaunchSubscriptionPurchase

Launches the billing-flow for an in-app subscription purchase.

ParameterType
subscriptionDetailsany
offerTokentext

ConsumePurchase

Used to consume a purchase

ParameterType
purchaseTokentext

GetPurchaseDetails

Retrieves the purchase details.

ParameterType
purchaseany

QueryPurchases

Returns purchases details for currently owned items bought within your app.

ParameterType
productTypetext

QueryPurchasesHistory

Returns purchases history details.

ParameterType
productTypetext

GetPurchaseJSON

Returns the JSON format details the purchase.

ParameterType
purchaseany

Return Type: dictionary

IsPurchased

Returns if the given product is purchased or not.

ParameterType
productIdtext
purchasesListlist

Return Type: boolean

GetPurchaseHistoryRecordJSON

Returns the JSON format record of purchases history from the given purchase record.

ParameterType
purchaseRecordany

Return Type: dictionary

IsPurchaseAcknowledged

Returns if the given purchase is acknowledged or not.

ParameterType
purchaseany

Return Type: boolean

AcknowledgePurchase

Used to acknowledge a purchase

ParameterType
purchaseTokentext

Events:

Error

ParameterType
messagetext

InAppMessageResponse

Called when response from In App Message is detected.

ParameterType
responseCodenumber
purchaseTokentext

ConnectionSuccessful

Called when connection is successful.

ConnectionFailed

Called when connection is failed.

ParameterType
messagetext

ConnectionDisconnected

Called when connection is disconnected.

GotProduct

Called when the product has been successfully retrived by GetProduct method.

ParameterType
productIdtext
titletext
nametext
descriptiontext
pricetext
productDetailsany

FailedToGetProduct

Called when the product failed to retrieve by GetProduct method.

ParameterType
messagetext

GotSubscription

Called when subscription details is successfully retrived.

ParameterType
subscriptionIdtext
subscriptionNametext
titletext
descriptiontext
priceListlist
offerTokenListlist
offerIdListlist
basePlanIdListlist
subscriptionDetailsany

FailedToGetSubscription

Called when subscription details is failed to get.

ParameterType
messagetext

ProductPurchaseLaunched

Called when purchase is successfully launched.

ProductPurchaseFailedToLaunch

Called when purchase failed to launch.

ParameterType
responsetext

SubscriptionPurchaseLaunched

Called when purchase is successfully launched.

SubscriptionPurchaseFailedToLaunch

Called when purchase failed to launch.

ParameterType
responsetext

ProductConsumedSuccessfully

Called when purchase is consumed successfully

ParameterType
purchaseTokentext

ProductConsumeFailed

Called when the purchase failed to consume

ParameterType
messagetext
purchaseTokentext

PurchaseSuccessful

Called when purchase is successful.

ParameterType
purchaseInstanceany
purchaseTokentext

PurchaseFailed

Called when purchase is failed due to any reason.

ParameterType
responsetext

PurchaseCancelled

Called when purchase is cancelled.

ParameterType
responsetext

GotPurchaseDetails

Called when purchase details have been retrived successfully

ParameterType
purchaseStatenumber
purchaseTokentext
responseJSONtext
orderIdtext
productslist
purchaseTimenumber
quantitynumber
signaturetext

QueryPurchasesSuccess

Called when query purchases is successful

ParameterType
purchasesListlist
responsetext

QueryPurchasesFailed

Called when purchase query failed due to some reason

ParameterType
responsetext

QueryPurchaseHistorySuccess

Called when query purchases history is successful

ParameterType
purchasesListlist
responsetext

QueryPurchaseHistoryFailed

Called when purchase history query failed due to some reason

ParameterType
responsetext

AcknowledgeSuccessful

Called when acknowledge successful

ParameterType
purchaseTokentext

AcknowledgeFailed

Called when the purchase is failed to acknowledge

ParameterType
responsetext
purchaseTokentext

Properties:

TestMode

Sets if test mode is enabled or not.

ShowInAppMessages

Overlays billing related messages on top of the calling app.

ProductTypeInApp

Product Type InApp

ProductTypeSubscription

Product Type Subscription

Usage:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top