#diavo-subscriptions
1 messages · Page 1 of 1 (latest)
@frigid verge you don't store the payment details yourself, that's what the Customer object in Stripe's API is used for.
If you want to add another recurring element(another $5 a month) to an existing subscription you'd create Price for those details and add it to the existing subscription the Customer has in an API call : https://stripe.com/docs/billing/subscriptions/upgrade-downgrade
ok thanks mate, i'll check it
I have a site "A" where you buy your subscription with stripe interface, you create a customer object here with his data. he gets the opportunity to access to site B (where dashboard is) with the same mail he used to buy subscription, now he pay another recurring element, what makes the connection between site A customer object and now on site B when he click on "add website" ?
hard to say, since "site" and "website" are the things you sell, right? They don't really have representation in Stripe, which is just for processing the payments.
if the scope of your question is how to know what the customer has paid for and has active subscriptions for, you can check the items field of their subscription(https://stripe.com/docs/api/subscriptions/object#subscription_object-items) which lets you know what recurring prices they are paying and you can enable functionality in your system/provision access to your service, by reconciling against that.
The thing that a sell is a google analytics like, a tracker for a personnal website, i have a product page (a single page web app) where you buy subscription that works for just 1 website and a dashboard website where you can see tracking data of your personal websiteS, and you can add from here a new website to "track" for 5 dollars with just a button with pop up confirmation
The thing that i sell is a "service" for the user's website
ok i'm reading it
maybe if i store user id from payment (site A), can i call it back when he wants to add another website from site B and upgrade the subscription ?
I'm not sure what you call user ID, but you in general would be storing the Stripe customer ID cus_xxx and Subscription ID sub_xxx in your database so you can retrieve and update those objects in future for any changes you need to make to their subscription, yep!