#gregg-casey_api

1 messages ¡ Page 1 of 1 (latest)

karmic martenBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1332039956285096078

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

civic bobcat
#

Hello! Not sure I understand. What's your question? What's blocking you? How can I help?

arctic oracle
#

We have a working implementation. We charge people for subscriptions and our backend gets the updates we need.
But now we want to add a 7-day free trial to our subscriptions in Stripe/Revenue Cat.

#

It doesn't look like that is directly supported.

civic bobcat
arctic oracle
#

(Revenue Cat is one of your business partners)

civic bobcat
#

Sure, but we have thousands of business partners. They're ultimately a third-party, and I don't have context or knowledge of them specifically. I can help you with the Stripe side of things, but not third-parties.

arctic oracle
#

Ok, how do I do it with stripe

#

(I don't thing RC is an issue -just giving you more info)

#

So only at subscription level not at product level?

civic bobcat
#

Not sure what you mean by "at a product level"? Can you provide more deails? Are you talking about defining the trial period on the Price?

arctic oracle
#

If so, then was my assumption in the ticket correct? That we have to customize our webhook code to add parameters to the call that creates teh subscription?

#

Product level- Apple supports this at the product level. We have a product (subscription product) called "Basic plan" and all we do is turn on the free trial options and Apple takes care of the rest.

#

(So every "Basic PLan" subbscription comes with a free trial.)

civic bobcat
#

Sorry, I'm not following. I think you need to provide way more context. I don't know what webhook code you're referring to. I don't know exaclty how Apple is or would be involved in this flow. I don't understand which systems are talking to which other systems.

arctic oracle
#

Stripe uses webhooks for developers to help process transactions. Let me send you some docs

civic bobcat
#

Okay, so you're talking about Stripe webhooks. Gotcha. How does that factor in to setting up a trial period when creating a Subscription, though? Webhooks would happen after the Subscription is created, not before.

arctic oracle
#

Ok, starting over.

#

We want our subscriptions to include free trials. How do we do that in Stripe?

civic bobcat
#

I linked you to the API parameters you can use to set a trial when creating a Subscription above.

arctic oracle
#

So, I was asking, does this mean that the only way to do this is at the subscription level?
If so, I guess that means that we update our webhook code to do this?

civic bobcat
#

So, for example, when you create the Subscription you can set trial_period_days to 7 if you want a 7 day trial period.

#

What other level would you do this? You want a 7 day trial on a Subscription, right? Not on some other thing?

#

Sorry, I feel like we're talking past each other, and I'm trying to find out where the disconnect is.

arctic oracle
#

Apple handles it different and much better for us. It is at the product level.
You essentially add a flag for trial and "7" for days and you are done. Everything else just works.

#

You don't have to code anything and you don't have to do it for every subscription.

civic bobcat
#

Okay, I think the disconnect might be regarding how the Subscriptions are being created. Are you using the API to create Stripe Subscriptions, or are you doing it some other way?

arctic oracle
#

We are using a Stripe webhook which has to call the stripe APIs to create the subscription. We are using the session method.

civic bobcat
#

That doesn't make sense. You can't create a Subscription by receiving a webhook. Can you give me an example Subscirption ID (starts with sub_) so I can take a look and see how your system works?

#

It would also help to know what Event type(s) you're referring to?

arctic oracle
#

sub_1QX09tA0zuegyhzkS74jvEJX

#

All of our subscriptions work the same

civic bobcat
#

Ah, so this Subscription was created with a Payment Link.

#

One sec, I need to step away for a moment, but I'll be right back.

#

Can you modify your Node code to do that? Would that be a viable path forward?

arctic oracle
#

That is ok. It would be nice not to have to update it but not a really big deal. Mostly I wanted to confirm that and it isn't clear that that is the only option.

#

Suggestion- add that to your roadmap if you can.

civic bobcat
#

Sorry, I'm not sure what you mean. I'm still not clear on what feature you're requesting, or what roadblock you're running into. To put it another way, you're defining the parameters of the Subscription when you create the Checkout Session. How else would you define the trial period if not in the parameters you pass to the Checkout Session API?

arctic oracle
#

As I said, like Apple does- at the product level. Not sure how else to explain it.

civic bobcat
#

I'm not at all familiar with how Apple does this, so I don't know what you mean when you say that.

#

Even so, if it's set at "the product level" you'd still need to specify the correct "product" when creating the Checkout Session, right? What's the difference between specifying a specific "product" with a trial period vs. specifying the trial period info in the same API call?

arctic oracle
#

No, the user just selects a product, the purchase happens with the same code we use today w/o changes. Stripe would just automatically create the subscription with a free trial bc the product always gets a free trial- it's part of the product.