Facebook Instant Games InApps

Integrating InApp purchases in my game(build using cocos creator). but unable to get payments.purchaseAsync in FBInstant.getSupportedAPIs() on both Android And Facebook.com any Help please below is the my sample code.

let supportedAPIs = FBInstant.getSupportedAPIs();
if(supportedAPIs.includes(‘payments.purchaseAsync’))
{
console.log(‘payments supported…’);
this.lblLogResult.string = “payments supported”;

      FBInstant.payments.onReady(() => {
          console.log('payments ready...');
  
          FBInstant.payments.purchaseAsync({
              productID: 'com.test.testing',
              developerPayload: 'foobar',
          }).then(function (purchase) {
              console.log(purchase);
          });
      });
  }
  else
  {
      console.log('payments not supported...');
      this.lblLogResult.string = "payments not supported";
  }

I have a same problem :(, who can support us?, Please!

i have resolved it. but for that you have to see if your account is verified business.
i will share my solution

1 Like