#hiroshi nishio
1 messages ยท Page 1 of 1 (latest)
Hi there ๐ what part(s) of the process is unclear or are you looking for assistance/guidance with?
Yellow parts I pasted are unclear for me
Sorry, but I'm going to need more context on those, what about them is unclear?
There are several, but for example, when a user installs a slack bot, we would like to start counting the 7 days of free trial on the stripe side for that workspace id. I am not sure how to do that.
I can capture the timing of the user's installation on my application side. I also want users to feel free to use it, so I have to tell them about the trial period, but I don't want them to register a credit card or anything at this time.
When you're creating the user's Subscription, you can specify how long of a trial period they should be given:
https://stripe.com/docs/billing/subscriptions/trials
Doing so causes the customer to not need to immediately provide payment method details, though if they're not collected by the time the trial period ends then when the Subscription attempts to bill for the next billing period it won't be able to successfully.
Ah, so this is where I call stripe.subscriptions.create.
Can the customer id I need as an argument here be anything? For example, can it be a slack workspace id that is a string of some sort?
No, it needs to be the ID of a Customer object:
https://stripe.com/docs/api/customers/object
I would suggest starting here to get a feel for what Stripe objects are involved when working with Subscriptions, and what the general flow of Subscriptions look like.
https://stripe.com/docs/billing/subscriptions/overview
Ah, that's right. So I have to create a customer object first?
Correct
For example, is it possible to create only one customer id for the same slack workspace id? Otherwise, we don't want to have a different customer id for the same workspace every time a user installs a bot.