[FREE] :google_play: In App Billing V7.0.0 - Integrate In App Purchases In Your Apps

:google_play: InAppBilling V7.0.0

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

Used to consume a purchase

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

Product Type InApp


ProductTypeSubscription

Product Type Subscription

Usage


This documentation was generated using Akshat Developer’s Documentation Generator.

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:

https://ko-fi.com/akshatdeveloper

This documentation was generated using Akshat Developer’s Documentation Generator.

12 Likes

Excellent work.

Thanks for your contribution :clap:
Uploading tutorial videos will be appreciated :+1:

You might correct this mistake.

1 Like

Excellent work :heart:

3 Likes

Awesome contribution Buddy :blue_heart:.

Keep K​:blue_heart:ding

3 Likes

Any help will be very much appreciated.

2 Likes

Use this Extension

1 Like

He seems to use this already.
@megshsh09 You forgot to tell us what error you get. Crystall Balls are rare these days.

Hi,
I am the developer of the extension. The subscription feature in the extension is still under development. It will be available soon. Currently the extension only supports in app purchase of a single product.

3 Likes

Thanks for letting me know. And my bad, but when the button to load the details is pressed, nothing shows up. Not even an error message.

Nice extension :+1:

@megshsh09, have you tried from exported apk or from Companion?

Here is my simple blocks for test InApp product and it’s working perfectly.

2 Likes

how to set single product purchase multiple time from same product id ??

This post was flagged by the community and is temporarily hidden.

First consume the product, then you can purchase it again

Taifun

1 Like

I did a simple test and it didn’t work, help

How to consume a product ? so i can purchase it again.

2 Likes

Major Update

→ Added support for subscription
→ Changed usage
→ Divided subscription and product purchase usage
→ Reduced extension size from 1.6MB to 300KB

See main post:-

1 Like

Opera Zrzut ekranu_2024-06-26_200320_creator.kodular.io
Hi

I’ve got a problem. In all my block there is a “for component” section. What/How should I define it? It cannot be left empty, it shows an error then “cannot accept the arguments nothing”