[OUTDATED] [Free] InAppBilling V5.0.0 - Sell your digital product from your android application

Replace your Product_ID variable to ProductDetails and initialize it as an empty dictionary.

In QueryProductDetails method, pass your product id as “string”.

Another Note: After Clicking Button1, Please wait for a few seconds to Let it fetch (Query) the Product Details and then click Button2.

(Complicated Approach, Skip this part if you feel you are a Beginner) Ideally in my opinion you should QueryProductDetails when the Billing client is ready & Store each of them in a Dictionary (Product Id: Details Json pair). Then when you need to LaunchPurchaseFlow for any ProductID → Get it’s ProductDetails from that dictionary by passing ProductId as key.

Hope it helps, Please skip the latter part of my suggestion if you are a Beginner, Have a nice day!

1 Like


I have checked the code for errors, but there were none. What should I do?

Hello oseamiya , I want this in app billing extension but can you send the pictures or videos of how to set the blocks , I only know about taifun. Thanks

hello, i wanna ask how to check if the user already buy the in app purchase or not?
here is my block

The order id that i got from GotPurchaseDetails blocks are same old order number even after purchasing new one. how to get current order number ?

Iam facing this issue in test mod

Please help me


Iam facing issue

Hello, good afternoon everyone!

How can I validate purchases made by my users in a backend securely? I want my “server” to give the product to the client instead of the client app. For this, I would need to validate whether the purchase was successfully made outside the client’s app, is there any way to check this?

PS: I did some research and saw that there is a Google API for this, but I’m finding the way to configure it very complex.

Thanks in advance everyone!

Hello,
I have tested the InAppBilling 5.0 and you can’t verify the active subscriptions withe the the call in app billing query purchase block, response block. From time to time the block detected no active subscription but in the most time also if the subscription is canceled the list in the response block isn’t empty. That must be an error.
Further problem is, after a buy from a subscription, the block purchase success and the block purchase failed with error code 6 fired but the subscription is then active.
And still a further problem, after upload the bundle to Google play console and then after download, if I then start the subscription process, the app close. After few hours it goes but with the main problem what I firs described and the other problem.
Is the Version 2 better and is this version still compatible with Google play store?
Is there in the future an update without the errors?

I tested the InAppBilling from kodular circa 1-2 months ago and the test if a subscription is active goes well but there was some errors after cancel subscription but minor. Today the same problem like with your extension. The is subscribed block doesn’t goes correctly.

Thank for an answer and if the currently available extension all don’t go correctly, is there an alternative in app billing extension with correct function?

Verifying purchases is considered a best practice when selling in-app products. For more about how to fight fraudulent purchases, check out chapter Verify purchases before granting entitlements in the Fight fraud and abuse page and chapter Processing Purchases in the Integrate the Google Play Billing Library into your app page.
After verifying the purchase, your app then needs to acknowledge the purchase.

Taifun

There are 3 billing extensions available… just search the community or the extensions directory App Inventor Extensions | Pura Vida Apps

Taifun

The error I described what occurs by testing if subscription is active could be an error with mobile network. I can currently no confirm this fact but my first run for 1-2 months ago was with Wlan, now with mobile network. Today I was Wlan but I don’t test often so I can’t not say currently if this is the error.

Anyone an idea to this or the ground problem if it doesn’t comes from mobile network?

Thanks for the answer Taifun, I hope if I decided to choose another billing extension, the work well in all situations.

where did you get the test aia please??

Continuing the discussion from [Free] InAppBilling - Sell your digital product from your android application:

Hello,

I am facing a blank screen after Purchase Flow is launched. I’ve set up the productID in PlayStore.

Here are my blocks and the inapp products page.

I’ve tried both the test and non-test mode while testing.

The Playstore app is in Closed Testing mode. Merchant a/c has been set up.

What am I doing wrong?


Here is what I see when Product flow is launched: I can see the slider card from bottom open up, but it is blank with no product details visible.

I can obtain product details in the dictionary, but the purchase card is blank when it shows up.

Your premium product id is a subscription, isn’t it? Then you should use it together with skuType Subs
Taifun

No, it is an in-app product.

But I got it working!!

  • I had used “price templates” in PlayStore to create the products. So I created a new product with a direct price.
  • I also cleared the phone’s Playstore app cache from file info.

I guess it was the cache thing that resolved the issue.

Now I can see the purchase card and everything is working as expected.

Thanks Taifun so much for being around here and your help.

Thanks to Jewel also… I will see if I need the new extension.

1 Like

Hello, need help with the subscription cancelled event block:

cancelledblock

If a user cancels a subscription, will the CancelledPurchase block get triggered? And how does one know which subscription got cancelled?

In my app there are channels that can be subscribed. I store the names of channels subscribed in a dictionary and TinyDB. I need to remove the channel name in case user cancels its subscription.

It will help me to know if the purchase token is removed from list of purchases we get from the Query Purchase block.

This is not recommended… a user also can cancel outside of the app… why don’t you check the active subscriptions each time you need it?

You can get all active subscriptions and non-consumed one-time purchases using QueryPurchases block.

Taifun

1 Like

Okay, thanks Taifun. I will do this.