#jasonfish568
1 messages · Page 1 of 1 (latest)
Not automatically no. We'll either automatically prorate for the unused/remaining time of reset the billing anchor and charge the new $200 upfront
If you want different behaviour you'd need to handle that manually
And if I want to downgrade in the next month, do I use subscription schedule?
Speaking of handling manually, what exactly do I need to do?
If you want to schedule a downgrade at a specific timestamp, yes
I'd imagine you'd add an additional invoice item to round out the total to $100 as desired. Whether that's a negative line item or not depends on whether you prorate
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So ideally, it's better to use the proration or charge the total whole amount of the new product? Is this because it's commonly used in many industries?
Well those are the default behaviours we support when upgrading/downgrading. What is 'best' depends on your use case and requirements
The documentation mentioned, my app must send a request to finalise the invoice when the app receives invoice.created. However, the documentation also says draft invoices will be auto finalised in 24hours.
Which is correct?
Both are correct. It depends if you're receiving invoice.created events
So if I finalize the invoice when I receive invoice.created, does Stripe try to charge the customer right away?
Yes, finalisation attempts payment
A new invoice of the subscription is created a few days before the end of the current billing cycle. If I finalise the invoice, does it mean the invoice will be charged before the end of the current billing cycle? And the invoice object will contain the new billing cycle?
A new invoice of the subscription is created a few days before the end of the current billing cycle
Is it? Shouldn't be
So when does the new invoice get issued?
At the current_period_end timstamp on the Subscription
Ok. which means there will be a tiny gap between the actual end time and the payment charge time?
Yes, normally ~1 hour
Thanks. Also, for the period timestamps. If a new invoice is created and paid, should I use Subscription.current_period_end or should I use Invoice.period.end as the end timestamp for the subscription?
I noticed the invoice items also have period attribute
You'd use current_period_end from the Subscription. The fields on the Invoice are for the previous period
So they'll be significantly different
I thought invoices are prepaid?
Technically yes, but the invoice timestamps reflect the previous period
Just understood it.
Some more questions regarding the webhook events, please bare with me a second
invoice.updated, does it cover both invoice.paid and invoice.payment_failed? Does it cover invoice.payment_action_required?
customer.subscription.created is pushed when the subscription is created. However, it doens't mean it's paid. Can I only listen to invoice.paid to identify that the subscription is paid and becomes active?
I'm using Checkout Sessions to initiate payment for new Subscriptions. I use checkout.session.completed to identify the payment is paid. Do I need to monitor checkout.session.async_payment_succeeded to see if the payment was made asyncronously?
If you use Checkout then you should use the Checkout events yes, in preference to anything from Invoices or Subscriptions.
https://stripe.com/docs/payments/checkout/fulfill-orders#delayed-notification
well it triggers when anything about the Invoice changes(including its status) so to an extent, yes.
if you were not using Checkout that is generally the recommended approach yes.
So, by using checkout.session.completed to finish the initial payment process for new Subscriptions, then for future renewals, use invoice.paid to check the renewal status, is this right?
sounds good
In case invoice.payment_action_required, can I direct the customers to their Client Portal to finish the payment?
you mean on a recurring payment? Sure. Also there's a setting you can turn on for us to email them directly for a link for 3DS in that case
Oh nice. Could you send me the documentation for enabling this link thing?
https://dashboard.stripe.com/settings/billing/automatic 'Send a Stripe-hosted link for customers to confirm their payments when required'
Thanks so much for your generous help!