How can ı. get order id in flutter for android
Hey
We don’t currently send the transaction or order ID in the purchase response from the Flutter SDK.
If you need access to the transaction ID, I’d recommend setting up webhooks as we include transaction identifiers in webhooks for purchases. You can consume webhooks from your server and save the transaction identifier server-side.
Thank you so much for letting me know this
Hey
We don’t currently send the transaction or order ID in the purchase response from the Flutter SDK.
If you need access to the transaction ID, I’d recommend setting up webhooks as we include transaction identifiers in webhooks for purchases. You can consume webhooks from your server and save the transaction identifier server-side.
Please add the order ID to the response, setting up webhook to save server side and then reading from there complicates what should be a pretty simple transaction. (Make an order -> get your order id in the success response)
HI, there is some way to identify the purchase?
I understand that I can validate the purchase with a webhook, but if i dont have any ID (like order ID o transaction ID) How i can verify if the purchase is the same that the webhook send to my server?
please, can you helpme?
Hey
We don’t currently send the transaction or order ID in the purchase response from the Flutter SDK.
If you need access to the transaction ID, I’d recommend setting up webhooks as we include transaction identifiers in webhooks for purchases. You can consume webhooks from your server and save the transaction identifier server-side.
I review your code in the library purchases-hybrid-common you can add the order Id, but you filter that in this line
So, there’s currently no way of getting the order-id from the Flutter SDK when a purchase is made?
This is a problem for my use case where I need to correlate a consumable purchase to the item that’s purchased in my app
I was looking for a similar solution to this. On the flutter side after calling purchaseProduct() you can get the last transaction from the returned CustomerInfo object and then send this details to your backend.
CustomerInfo? customerInfo = await Purchases.purchaseProduct(
“myProduct”,type: PurchaseType.inapp).then((value) {
if (value.nonSubscriptionTransactions.length > 0) {
int lastItem = value.nonSubscriptionTransactions.length - 1;
StoreTransaction item = value.nonSubscriptionTransactionselastItem];
// send item to your backend
In the backend implement the webhook and when you receive the webhook, call the subscriber endpoint:
https://api.revenuecat.com/v1/subscribers/{app_user_id}
to get a list of the transactions, then you should be able to match up the 2 on the transaction_id
It is ridiculous not to share this ID, it is very difficult to find it from the user database in case of refunds or problematic payments. Isn't this identity still shared in flutter? If it is not shared, why is it not shared yet?
I don't understand why this is marked as solved, this is a very critical issue and it's giving me a lot of trouble. How are we supposed to verify purchases, some people can use software's like lucky patcher to fool the app into thinking that the purchase has been made on Google play while it has not been made anywhere, how are we supposed to fight this threat if we can't verify purchases on our backend. From my testing the transaction Id returned from Customer info does not match the one sent by the web webhook, you can't even find it anywhere on the dashboard. Please someone let me know how I'm supposed to verify consumable purchases in my flutter app. This has been tormenting my app for days
I don't understand why this is marked as solved, this is a very critical issue and it's giving me a lot of trouble. How are we supposed to verify purchases, some people can use software's like lucky patcher to fool the app into thinking that the purchase has been made on Google play while it has not been made anywhere, how are we supposed to fight this threat if we can't verify purchases on our backend. From my testing the transaction Id returned from Customer info does not match the one sent by the web webhook, you can't even find it anywhere on the dashboard. Please someone let me know how I'm supposed to verify consumable purchases in my flutter app. This has been tormenting my app for days
Same issue, it feels like a no-brainer to just get the transaction ID so u can verify everything went smooth on the backend. Such webhook-unfriendly structure choice.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.