Refers to specific refund if my app has only one product

Hi guys:v:
My app has only one product and user can buy it how many times he want.
This product refers to different things every times user buy it.
So, if user requests a refund for his last purchase, how could my app know that this refund is referred only for the last thing and not for all the previous things purchased?:thinking:

I suppose it’s not so simple…

You can refer and unique I’d for every product so that if user refund the item so it’s unique

Each purchase is a unique event linked to the customer. Therefore, each purchase must be identified by a unique number + customer code (and it can also have a date)

So, do exist a block that return a history of all purchase made by user (refunded and not)?

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

@Taifun based on what @Rogerio_Rios said, can I achieve what I want with your in app billing extension, so an history of ALL purchase made by user?:crossed_fingers:

before being able to purchase the same product again, you have to consume it…
so if you are using the same product id for different products, you have to maintain a list of purchased prroducts yourself
as others already said, it would be easier for you to have a seperate product id for each product

currently not… you will have to store a history yourself…
what you can get is a list of all owned products…


1 Like

I found out this:


Is there any way to get the token with Kodular?


I saw your extension have this block:


Is it the token required by the API?

yes, the purchase token is used to verify the purchase
you can read more about it in the documenation App Inventor Extensions: Billing | Pura Vida Apps

Acknowledge purchases : your app must consume or acknowledge all purchases. This is a new feature Google added into the Billing library to prevent fraud. If you don’t consume or acknowledge a purchase within three days, Google automatically revokes the purchase and refunds the user.
If your app has a validating server component, you should only acknowledge a purchase after successfully validating it.

Verifying purchases is not required, but 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.

How the billing extension can help: If you decide to not verify the purchase, you can use the AutoAcknowledge feature of the extension to automatically acknowledge after purchasing. If you choose to verify the purchase, use the PurchaseUpdated event to get the purchase token and follow chapter Verify purchases before granting entitlements in the Fight fraud and abuse page. After successful verification then use method Acknowledge together with the purchase token to acknowledge the purchase.

to get the purchase token, you also can use the PurchaseToken method


Get purchase token of a purchased product or subscription, jsonString can be a jsonObject returned from event PurchaseUpdated or a jsonArray returned from event GotPurchasedProducts or GotPurchasedSubscriptions .

Note : The use of this method is only required if AutoAcknowledge is false and you like to verify the purchase token on your backend server.


Thanks Taifun:+1: