#soumya
1 messages · Page 1 of 1 (latest)
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?
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
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?
Yes, that sounds right to me
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
You can use List Subscription API with status='canceled' to find the subscriptions that have been canceled: https://stripe.com/docs/api/subscriptions/list#list_subscriptions-status
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?
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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
?
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
Hi when ever i create a setup intent for the customer am not getting setuo intent succeeded
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
which event will give us the payment menthid added
You will have to collect the payment method details on the Setup Intent in order to get setup_intent.succeeded event: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
Without collecting the payment method details, there will not be any payment method
If you wish to get setup_intent.succeeded event, then you should use Setup Intent integration to collect payment method, not via Dashboard: https://stripe.com/docs/payments/save-and-reuse
Dashboard uses different flow
will their be a delya in webhook events from stripe?
It is possible