njosefbeck / gatsby-source-stripe

Gatsby source plugin for building websites using Stripe as a data source
74 stars 17 forks source link

Is there a ay of getting back the price of a subscription (product) #52

Closed jodiedoubleday closed 4 years ago

jodiedoubleday commented 4 years ago

I'm looping over SKU's displaying prices etc. I want to do the same with subscriptions and show the subscription information i.e free trial dates, renewal times etc. Is there a way to do this, I can't see anything come back in graphql.

njosefbeck commented 4 years ago

@jodiedoubleday Hello! Could you by chance post the config you use for this plugin? (w/o secret tokens in it of course!) Basically want to see what Stripe entities you're trying to get back.

jodiedoubleday commented 4 years ago

I've just added Plan hoping that that will bring back what I need...

{
  resolve: `gatsby-source-stripe`,
  options: {
    objects: ['Product', 'Sku', 'Subscription', 'Plan'],
    secretKey: `...`,
    downloadFiles: false,
  },
},
njosefbeck commented 4 years ago

Hi! So your options look right. Are Subscriptions not giving you the information you want? In looking at the API docs, what is missing that you'd like to get back? https://stripe.com/docs/api

njosefbeck commented 4 years ago

@jodiedoubleday Just checking in on this, to see if you're still experiencing issues? If I don't hear back in a week or so, I'll close this issue. But feel free to re-open if needed!