#jbrappel
1 messages · Page 1 of 1 (latest)
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
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)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
when it comes to handling the fulfillment of the subscription from your side, I would suggest you take a look at this guide for using webhooks with subscriptions https://stripe.com/docs/billing/subscriptions/webhooks
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