#dragon.frost
1 messages · Page 1 of 1 (latest)
I'm on the process of migrating my old codebase to payment intent flow and my cypress tests somewhere is setting a test subscription's status to incomplete_expired. And I was curious if it can be triggered by calling any stripe APIs like cancel invoice or something like that.
Oh it's for testing purposes then?
The only way to get to that status is to create a Subscription and wait 24 hours for it to expire.
only incomplete subscription's status can be incomplete_expired right?
Yes. You can learn more about Subscriptions status here: https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses
So, doesn't this line mean that you can manually expire the subscription invoice?
"If the subscription is incomplete and you void the first invoice that’s generated, the subscription updates to incomplete_expired."
https://stripe.com/docs/billing/subscriptions/overview#voiding-invoice
oh wow, I didn't know this.
Looks like your correct, I recommend to test this in test mode to make sure that's accurate.
@cyan mesa what's up
Hey @soft swan , I was curious, was there a possibility a subscription could have status incomplete_expired before the payment Intent implementation?
what does "payment intent implementation" refer to in that context?
@cyan mesa are you there?
Sorry, I'm here
by " before payment intent implementation" i meant the time when stripe had no payment intent integration
not sure why you ask, we are in 2023 now
but incomplete was added in 2018/2019 as part of the migration to PaymentIntents yes, but you can opt in to use it on any API version by passing payment_behavior:default_incomplete If you don't do that we would not create incomplete subscriptions, we would just decline if 3DS is required and the call to create the Subscription fails(which was the legacy behaviour), we don't generally just add new things or change existing behaviour without you opting in or moving to a new API version where the defaults change
but again I don't think it really matters unless you have a question behind the question, do you?