#KRS
1 messages · Page 1 of 1 (latest)
I think it's simply to call the Update Subscription API and set proration_bahavior to none, as it sounds like you don't want proration
Yes, I understand what to do. But the question is when to do?
is there any webhook event that I can rely on to trigger this ugprade?
You can call it anytime inside the billing cycle. Assume that child and adult plan has same interval (ie. monthly), the change will happen in the next billing cycle
ok.
if i change the subscription price on the invoice created webhook event, will the invoice will be updated?
After received invoice.created it's already the next billing cycle so it will be pending until next Invoice. But you can try in Test mode
ok.
Another question - Is it possible to create a subscription with past_due status? In some cases, the subscription should be created without payment info, users can come back and pay it later, in a month or 2. But we wanted to keep in the invoice open (failed state), but subscription should be created as past_due
You seems want error_if_incomplete here https://stripe.com/docs/api/subscriptions/create?lang=ruby#create_subscription-payment_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
no, i dont want to error out. still wanted to create subscription
It's the Payment to be error and the Subscription will be past_due
ohh.. i will try that.
https://connect.stripe.com/test/logs/req_AEwk6iNJ6TAyoZ - why is this throwing error?
i tried the error_if_incomplete but it is not working - here is the request - https://connect.stripe.com/test/logs/req_8zTKnRBnCkK2rv
Hi!
https://connect.stripe.com/test/logs/req_AEwk6iNJ6TAyoZ - why is this throwing error?
I think the error is pretty clear: "The backdated subscription start date must be in the past"
i tried the error_if_incomplete but it is not working - here is the request - https://connect.stripe.com/test/logs/req_8zTKnRBnCkK2rv
Again the error message is pretty clear: "This customer has no attached payment source or default payment method. Please consider adding a default payment method."
What exactly are you trying to do?
backdated start date is 1st Oct 2022, which is back dated.
I am trying to create a subscription without card, which should mark the invoice as error and subscription in past_due
backdated start date is 1st Oct 2022, which is back dated.
Let me double check this
I am trying to create a subscription without card, which should mark the invoice as error and subscription in past_due
Are you doing this to test what happens when a subscription payment fails? If so you should follow this instead: https://stripe.com/docs/billing/testing#payment-failures
no. i have a scenario create a subscription without card.
as part of the migrating users
i would like to keep the invoice in past_due and allow user to comeback and pay later
backdated start date is 1st Oct 2022, which is back dated.
True, but the customer had a test clock, so that changes what is "in the past"
but there is no defined timeline when the payment can happen/
Ok, got it. I will modify it accordinly.
no. i have a scenario create a subscription without card.
I would create a subscription withpayment_behavior: "default_incomplete", and add a very short free trial (a few seconds). This way:
- The subscription is created without a card and is
active - When the trial ends an invoice is created
- When the invoice is finalized and paid, it will fail (this will happen automatically after one hour, but you can speed up the process by manually finalizing and paying for the invoice)
- So the invoice will be
past_due
ok, let me try, i can do this with backdated subscription?
Not sure, can you try and see if it works?
the subscription period is set after the trial is ended. and the backdated is not honored
https://connect.stripe.com/test/subscriptions/sub_1LsjRFK5Jxl3vjti3BR0v8hZ - for your reference
the subscription period is set after the trial is ended.
That's expected, when a free trial ends it starts a new billing cycle.
If that's not what you want, maybe you can try removing the free trial entirely?
if i don't set trial, here is what i see
is there a way allow the invoice to fail but keep the subscription active?
So you want:
- Create a subscription with a
backdate_start_date - That has an
activestatus - And has one invoice in
past_due
Is this correct?
correct
And you want the very first invoice of the subscription to be past_due?
yes.
To be clear, invoice status will be failed (what i see in the stripe dashboard) and the subscription status will be past_due
Got it. Give me a few minutes to run some tests.
ok
I'm not sure that's possible:
- If you don't provide a payment method, the status of the subscription will be
incomplete - And if you do add a free trial, the status will be
activebut the end of the trial will change the billing cycle anchor
ok thanks for confirming.
But you could create the subscription with a payment method first (so status:active), then remove the payment method. So at the next billing cycle the payment will fail and the invoice will be past_due.
yeah. we don't want that behaviour
Then I don't think what you want is possible unfortunately.