Help with implementing app monetization

My app is in review and I am trying to implement monetization in my app. I am trying to display a banner that informs the user about the number of trial days they’ve left and a button for them to subscribe to a new plan which opens up the plan selection page.

Currently I’m able to display the banner and button and open the plan selection page, but I can’t what remember my app_plan_ids are so I can’t write logic around that. Is there a way to fetch that?

Secondly, I’m unable to create a mock subscription. I keep getting an Unauthorized error when I try.

This query returns an empty array.

query {
        app_subscription {
          billing_period
          days_left
          is_trial
          plan_id
          renewal_date
        }
      }

I will appreciate some help on this.

Could you share the error you get when trying to create he mock subscription?

You also have to use an API token from a user in the developer account that is a collaborator on the app. Don’t API call using seamless authentication or oauth token you got for the app.

AS far as retrieving your plan IDs - nope, none of that is exposed by API. The assumption is since you defined them you would have them documented. That said, you can probably contact support via the support form and ask for some help with it.

Hi Cody,

Thanks for the response.

I was able to figure this out. I think the problem was coming from me using the wrong number of characters for the partial_signing_secret.

It works now.