#rorrona
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- rorrona, 16 minutes ago, 35 messages
Basically, i was asking about some problems regarding the subscription cycle payment and its behaviours. The last chat was that I gave a screenshot of the relevant codes for checking
Because it might seem that i might be tracking subscription wrongly
can you share all relevant details/screenshots in this thread with your exact question?
so what's your question?
So basically I am now asking if the code above is correct if i am trying to track a subscription
please can you write a 1-2 sentence summary with your question and also include the relevant object IDs?
I don't have time to read all test in the screenshot, and I can't check the object IDs in screenshots.
The chat is too long for me to summarize....and I dont know why I got ignore and my thread is closed in the end
But I guess the priority now is to check whether is this correct or not
So please see if this is the correct usage of subscription list if i want to track if a customer has a subscription or not
Hey! Taking over for my colleague. Let me catch up.
What part exactly you want us to check ? I think you are asking a bit of a broad question! Is there a specific use case you're trying to account for?
So I am tracking a subscription based on the number of subscribtion items a customer has. If the number is bigger than 0, then the customer 'has' a subscription.
The code is actually currently working, but for some reason the subscription cannot be tracked when it is pastdue
And since it cannot be tracked, our program allows the user to start a new subscription (even though old one is running but waiting for payment)
So I am tracking a subscription based on the number of subscribtion items a customer has. If the number is bigger than 0, then the customer 'has' a subscription.
Why you are trakcing like this ?
You can make an API call:
https://docs.stripe.com/api/subscriptions/list#list_subscriptions-customer
And see if the customer has a Subscription or not.
Because i need the subscription info as well (how many running subscription items and next billing date etc)
Yeah, like the code is fine, but if the subscription is past due, it seems to behave weirdly
You have it all in the response of that API
You don't need to track subscription items by your own
This is a bit unavoidable since we have our own subscription system, and we are trying to sync them both...
But i guess maybe it is easier if i can test with past due case
Is it possible to simulate a past due subscription?
You can create a test simulation using Stripe test clock:
https://docs.stripe.com/billing/testing/test-clocks
And reproduce the same actions you had previously on a past_due Subscription
Okay, thank you very much. I will be trying with this first and will follow up if I need any more help