#shrey
1 messages ยท Page 1 of 1 (latest)
Hi ๐ you can create Subscriptions directly without using Checkout:
https://stripe.com/docs/api/subscriptions/create
Once I know they're a student, can I like create a stripe customer, activate membership for this customer, and assign this customer to my user?
In this statement, who or what is the "user" that you're referring to?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you so much for replying. Lemme reframe. I mean to ask you if I can create a subscription which is active, assign it to a (stripe) customer, and assign this customer to the user entity in my database?
(all this without checkout)
The URL that you sent, allows me to create a subscription, I see that, but is the returned subscription object in active state?
Creating a Subscription requires that you provide a Customer for it to be associated with, so this part:
create a subscription which is active, assign it to a (stripe) customer,
is all one step.
Then associating that with records in your database is possible, you'll likely want to set up a webhook endpoint for that.
https://stripe.com/docs/webhooks
Whether the Subscription is active depends on how it is created. If you're creating a paid subscription then the first Invoice needs to be successfully paid for the Subscription to get into an active state.
I see. It's not really possible to have an active state without getting payment info, then?
Correct (unless the first Invoice is a zero-dollar-Invoice and doesn't require a payment to be completed)