#soumya

1 messages · Page 1 of 1 (latest)

edgy arrowBOT
native nova
#

The possible way what i can think is first i shd get the list of subscription which is cancelled but here which filter will work for me fetch the canceled subscription whose expiry is done yet?

crystal shale
#

Subscription schedule is for creating a subscription in a known future date

#

You can listen to customer.susbscription.deleted events

#

When a subscription is cancelled, customer.subscription.deleted event will be sent. Your system will then create a new subscription after the old subscription is cancelled

native nova
#

New subscription is not created sutomatically it is done only if user wants

#

Here to add schedule to this new subscription i need previous subscriptions expiry date

#

Before i create this new subscription i need to check if user has any previous cancelled subscription whose expiry is not done and then use that expiry date in the schedule

#

is this flow correct?

crystal shale
#

Yes, that sounds right to me

native nova
#

how can i get this value Before i create this new subscription i need to check if user has any previous cancelled subscription whose expiry is not done can u please suggest?

#

How can i get previous scubscription which is cancelled and expiry is not done

crystal shale
native nova
#

but this filter will list out all subscription which is cancelled

#

is their a way where i can get only which is canceled and whose expiry date is in future?

crystal shale
#

If the subscription hasn't been canceled yet, but will be canceled in the future date, the status won't be in canceled.

I'm afraid there is no API to retrieve such a scenario. I'd recommend listening to customer.subscription.updated event, then check and save cancel_at in your database, so that you can keep track the subscriptions that will be canceled in this specific timestamp: https://stripe.com/docs/api/subscriptions/object#subscription_object-cancel_at

native nova
#

My query is we call cancel subscription api but it is not a immerdiate cancel basically it will cancel at the next billing cycle .Here i want a filter to get these type if subscriptions which is canceled but actually cancels at next billing cycle not a immediate cancel

#

With list subscription api what filter will wprk form me

#

?

crystal shale
#

We don't have an API to search the subscriptions that will be canceled in the future or next billing cycle. This has to be done in your system to keep track the timestamp using cancel_at field after receiving customer.subscription.updated event

native nova
#

Hi when ever i create a setup intent for the customer am not getting setuo intent succeeded

#

which event will give us the payment menthid added

crystal shale
#

Without collecting the payment method details, there will not be any payment method

native nova
#

i did not get thie wehook event

#

card is added in dasboard

#

but event not triggered

crystal shale
#

Dashboard uses different flow

native nova
#

will their be a delya in webhook events from stripe?

crystal shale
#

It is possible