#jbrappel

1 messages · Page 1 of 1 (latest)

tranquil harbor
#

Hey, do you have any specific flow you want to discuss?

earnest fox
#

yes, I want to create a subscription flow I read the "how to use subscription doc" and still struggle with understanding the invoice object in the subscription. Also in my case I have a subscription per month base in tiers and also charged per service, the idea is that this both amounts add at the end of the month, so the client can get the total price to pay, if the payment is successful then client keeps getting access to the platform, if not then the subscription has to stop , ask him to verify his payment method and then redo the cycle for payment

tranquil harbor
#

the idea is that this both amounts add at the end of the month
When creating a subscription you can add up to 20 items https://stripe.com/docs/api/subscriptions/create#create_subscription-items
This will create an invoice with n-line items ( the subscription fees and any extra service you want to charge)

#

It will calculate the total price and try to directly charge the user if you the subscription has default_payment_method or the customer has invoice_settings.default_payment_method or default_source

#

the main takeaway is basically listening to invoice.paid and invoice.payment_failed to react accordingly

#

I hope I answered all the questions you mentioned above

#

let me know if you need any more help