Understanding how to use validatePurchaseGoogle() in TS

Hello, I’m trying to use Nakama to validate in-app purchases on Android.

My app is built with Cordova, using the In-App Purchase plugin (https://purchase.cordova.fovea.cc/). After clicking buy, the plugin gives me a JSON string like this (except I put XXX in the place of the real values):


When I call client.validatePurchaseGoogle() with the session and this string, the server is sending back a 400 error, without any further description. I don’t see any errors in the console, nor in the server log file.

I’m wondering what the problem is here. Is this the correct format for the Google reciept? Does receipt validation work with test purchases, or only real ones?

Thanks for your help!