Google Play’s billing system with SDK Version 5
Extension that enables you to use Billing system that enables you to sell Digital products in your app.
Note: Starting on August 2, 2022, all new apps must use Billing Library version 4 or newer. By November 1, 2022, all updates to existing apps must use Billing Library version 4 or newer. Source → Pura Vida Apps
Functions
- Establishes the connection to the Google Play Billing Client.
-
This block uses the Google Billing API to alert users if a transaction is failed, and tells them to update the Payment methods.
-
It can be called when the Screen Initializes or when any purchase is successful and after acknowledgement.
- Is Purchased block to check if the user is subscribed or purchased a product.
- product: product id, e.g.
android.test.purchased
- type: type of the product, 1 = inapp, 2 = subscription
- product: product id, e.g.
Warning: The block is implemented in such a way that, an asynchronous operation is fired (according to the billing v5) then the app shall wait for the operation to complete.
- Queries the information about the given product.
- product: product id, e.g.
android.test.purchased
- type: type of the product, 1 = inapp, 2 = subsiption
- product: product id, e.g.
- Purchase block, that enables the user to purchase or do a subscription to a product.
- product: product id, e.g.
android.test.purchased
- tokenOffer: token offer required for the purchase, can be empty.
- type: type of the product, 1 = inapp, 2 = subsiption
- product: product id, e.g.
- Block to get a property from the product (e.g.
formatted_price
…)- product: the product object to retrive the property from.
- name: the name of the property
- Blocks to acknowledge a non-consumable (purchases that can be only done once) purchase or a consumable (purchase that can be made again) purchase.
- purchase: the purchase product to acknwoledge
- ackId: Or the acknowledged Id, will be returned by the event to distinguish multiple requests.
Event block fired when the Purchase is completed by the user after calling the @Purchase block.
Fired when the user cancels the purchase in middle of the translation. Such as dismissing the Dialog.
Block that returns the info of the product, (from @Query block).
Block to report the failure of the attempt to retrieve the product info.
Block to report the launch of the Flow…(When the billing dialog is launched successfully, this block is fired.)
Fired after the product acknowledge result is returned.
response Code = 0, states that it was successfully acknowledged.
After the Google Play Billing client is ready/error-ed, this block is fired.
isOkay = everything went right.
Event fired after the Billing Service to the client got disconnected.
- This block is called when no action is needed and everything seems fine when we call the InAppMessages block.
- Called after InAppMessages detects a update of the subscription. A new purchase token is returned.
Screenshots
Blocks
Next
That’s it! The next roadmap; To implement the Google Play Rest API that allows to verify purchases more securely with the servers instead of relying on the Google Play data.
Purchase
If you are interested in the extension, you can write a message to me in the PM or reply in the topic, I’ll message you back.
Price: 1534 INR | 15 USD
Two of them: Billing Extension + Crash Reporter: 1500 INR | 18$
PayPal | PayTm (Message me) | Stripe
Thanks for @Baxolino for sponsoring the extension!
With @UnknownBeast and @Pradevel for testing