[PAID] InAppBilling Extension - Library 4.0.0

InAppBilling Extension - Library 4.0.0

aix

Hello friends, I've built this in-app-billing extension to monetize your app products using play store billing library 4.0.0.

Available features -

  • Get products details
  • Launch purchase flow
  • Get purchases details
  • Get purchases history
  • Consume products
  • Acknowledge products

All blocks -

This extension has 11 events, 9 functions and 2 properties.

StartConnection

To connect your app to Google Play, call this function before using other functions. The connection process is asynchronous. Setup Finished event will be trigger when app is connected with Google Play. BillingError will be triggered if any error occurred. isReady function return boolean value. It's return false if your app is not connected with google play. ServiceDisconnected event will be triggered when your app lose connection from google play.

setup

GetProductDetails

After you have established a connection to Google Play, you are ready to query for your available products and display them to your users. To query Google Play for in-app product details, call this function. Querying for SKU details is an important step before displaying your products to your users, as it returns localized product information. The skuType can be either InApp for one-time products or Subs for subscriptions. GotProductDetails will be triggered when extension got details for given product id. Rsturn types are string. BillingError will be triggered if any error occurred.

product-details

LaunchPurchaseFlow

To start a purchase request from your app, call this function. It will displays the Google Play purchase screen. Call this function after you got details of any product by GetProductDetails functions. ProductPurchased will be triggered when purchase will be success. PurchaseCanceled event will be triggered when user cancel or back pressed during purchase window open. PurchasePending event will be triggered when purchase will be held on pending. BillingError will be triggered if any error occurred.

ConsumePurchase

Give content to the user, and acknowledge delivery of the content. Optionally, mark the item as consumed so that the user can buy the item again. After granting entitlement, your app must then acknowledge the purchase. This acknowledgement communicates to Google Play that you have granted entitlement for the purchase. If you do not acknowledge a purchase within three days, the user automatically receives a refund, and Google Play revokes the purchase. The process to grant entitlement and acknowledge the purchase depends on whether the purchase is a non-consumable, a consumable, or a subscription. For consumables, this function fulfills the acknowledgement requirement and indicates that your app has granted entitlement to the user. This method also enables your app to make the one-time product available for purchase again. ConsumeSuccess event will be triggered when product is consumed. BillingError will be triggered if any error occurred.

consume

AcknowledgePurchase

Give content to the user, and acknowledge delivery of the content. Optionally, mark the item as consumed so that the user can buy the item again. After granting entitlement, your app must then acknowledge the purchase. This acknowledgement communicates to Google Play that you have granted entitlement for the purchase. If you do not acknowledge a purchase within three days, the user automatically receives a refund, and Google Play revokes the purchase. The process to grant entitlement and acknowledge the purchase depends on whether the purchase is a non-consumable, a consumable, or a subscription. To acknowledge non-consumable purchases, use this function. Before acknowledging a purchase, your app should check whether it was already acknowledged by using the isAcknowledged return type from ProductPurchased event. Subscriptions are handled similarly to non-consumables. You can acknowledge a subscription Acknowledgement using this function. All initial subscription purchases need to be acknowledged. Subscription renewals do not need to be acknowledged. AcknowledgeSuccess event will be triggered when acknowledge proces is done. BillingError will be triggered if any error occurred.

acknowledge

GetPurchasesDetails

Returns purchases details for currently owned items bought within your app. Only active subscriptions and non-consumed one-time purchases are returned. GotPurchasesDetails event will be triggered when got purchases products details. Return types are list. The skuType can be either InApp for one-time products or Subs for subscriptions. BillingError will be triggered if any error occurred.

purchases-details

GetPurchasesHistory

Returns the most recent purchase made by the user for each SKU, even if that purchase is expired, canceled, or consumed. GotPurchasesHistory event will be triggered when got purchases history. Return types are list. The skuType can be either InApp for one-time products or Subs for subscriptions. BillingError will be triggered if any error occurred.

purchases-history

Screenshot

I'm not good with UI design. It's just for showing example.

Simple Demo Blocks
Example for buying in-app products



4 Likes

Thanks for your great feedback :heart:

1 Like

Please what is the difference between id product and skutype ,,
Where i can put my license key?? Give us an example

1 Like

On Sdk version 4.0.0, you don't need any license key, just use product id, and don't forget to put your app in internal testing on console.

(Thanks)