#daniel_api
1 messages ¡ Page 1 of 1 (latest)
đ 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/1338926570777350156
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Oh and I want to give the free access only for a month and it cancels if the user doesnt add the payment method later
Hi! You can read about that here: https://docs.stripe.com/billing/subscriptions/trials
I dont want to give a trial cuz we saled 10 licences to a school and we need to give 10 users access without asking them for a payment method
So it is not a trial it is a normal subscription
are you still with me?
@deft hornet ?
?
?
Sorry
One sec.
The use case you described - "I want to give the free access only for a month and it cancels if the user doesnt add the payment method later" - is exactly what a trial is for.
Wait, are you just saying "I will invoice you, but if you don't pay before your next invoice, I will cancel your service" ...?
no Like a school paid for 10 subscriptions so I need to give those subscriptions to those people without asking them for payment methods
But if they like Cogent they can add a payment method later and continue the subscription after a month
So a school already paid for those 10 subscrtiptions for a month
and if users want to continue after a month they need to start paying
You can have Stripe email the Invoice to the customer for payment.
That way there's an active Subscripton, and an outstanding Invoice.
yes yes but this is for future to collect the payment method for the next months
But I need to give a subscription to 10 users with api, but when I checked a user need to have a payment method to add a subscription to it
But the user doesnt have a subscription method and that is okay for me cuz the first month for the user is free cuz the school paid for it
It's in the docs - jsut give them a read.
You mean this?
But that doesnt make sense cuz stripe doesnty know what user has the invoice that has beed paid by the school
I don't understand what that means.
The thing I want to do is
I have a user named John
I want to give John a subscription for free for a month without asking him
Using api
there is no invoice sent to John
Then just don't create the Subscription in Stripe until after that month. Stripe Billing uses Invoices to model payments.
You're also going to have to figure out how to link up the data in Stripe with the data in your application to make the "who paid" connection.
I want to create a subscription on stripe becaus I want stripe to track when the month passed
So I just want to give a user a subscription for free (0$ so he shouldn't need any payment info to pay)
That's what trials are for.
and if the user dosnt add a subscription it cancels (Like usual stripe subscription)
That's what trials are for.
but It is not a trial cuz the user should have a normal subscription.
Arent trials for normal users that just want to check out the app
That is one thing that trials can be used for; this is another.
You could also likely use a discount, wait one.
okay so If I give the user a trial and they update their payment method
Will they get this email later
If the switch is on, and it's in livemode, then yes.
This would also potentially work: https://docs.stripe.com/api/coupons/create#create_coupon-duration
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
How can I apply the coupon without redirecting the user to a checkout page.
I want the user to just log in and if it is on a list of users that should get the first month off, the user automaticaly recives it with no need to go to a checkout page and put a discount code
fyi i'm stepping in for my colleague as he has to run, catching up on the thread now
ok, so if you want to just give users access to the subscription before making them visit a checkout page you can just create a subscription for them via the API and include the 1 month trial in the creation call
https://docs.stripe.com/api/subscriptions/create
can I instead of a trrial apply a discount code? like 100% once?
yep! that should work too
also fyi there are a lot of open threads so i might be a little slow getting back to you
if a subscription renewal fails cuz the user dosen't have a payment method, will there be an email sent to that user to add a payment method?