Google Transaction Example - Subscription

google-assistant

#1

Are there any examples of Google Transactions with Subscriptions?

I’m having issues with the function:

this.$googleAction.$transaction.completePurchase(skuId)

Can you help me?


#2

Here’s the current error I’m receiving when I run

this.$googleAction.$transaction.completePurchase(skuId)

Sent in-response to @alexswe
image


#3

Currently, neither @alexswe or myself know what the issues is.

Next Step:

  • I am creating a new project in Actions on Google to see if the bug goes away.

#4

BUG DID NOT GO AWAY WITH NEW ACTION :frowning:

Next step, as suggested by @gal-shenar via Jovo Slack

Implement Digital Purchase Check
this.$googleAction.$transaction.checkDigitalPurchaseRequirements();
image

When we implemented this we actually received a landing in built in function:

ON_TRANSACTION: {
        async DIGITAL_PURCHASE_CHECK() {
            this.tell("DIGITAL CHECK")
        },
    },

#5

SOLUTION:

Found via this tweet: https://twitter.com/omenocalc/status/1246154043791155212

head to Google Cloud API Console to enable the Actions API:

  1. Visit Google Cloud Console -> APIs & Services
  2. Search “Actions API”
  3. Select “Enable”

Then you should be all hunky-dory :grinning:

Special thanks to the people who helped work this out:


#6

Thanks a lot for all the updates here! Really helpful