#velkamhell_unexpected
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1247196043985289366
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
Hello
So to clarify you have your settings set so that after 1 failed retry it should be mark as "unpaid" but that isn't happening?
Do you have an example I can look at?
Okay can you share the Subscription ID?
The subscription starts on June and i stop payments collection after creating the subscription, now 2 months has been passed in the simulator and the subscription status remains in "active"
Can you share that ID from the top right so I can take a look?
The sub_xxxx
Also did you update your settings after you created the Subscription or beforehand?
sub_1PNWCUGTdPdEZ8k1JCfHrFh1
Yeah, i reload the page and the changes were applied
So the reason is you set: "pause_collection": { "behavior": "keep_as_draft" }
see: https://dashboard.stripe.com/test/logs/req_rPR9hLrOkyrqSf
So the Subscription is currently in a pause collection state so the retries aren't going to occur at all since the Invoices are not going to finalize
Oh, i see, probably that option was activated by the "Collection paused" option ?
Yes
I see, but do yo know how i can simulate when the user fails the retry policy ? some way to stop collecting payments to trigger this events ?
You use the 4000000000000341 test card (see: https://docs.stripe.com/testing#declined-payments) which will allow you to attach the Card to the Customer but then it will decline on payment and do the exact same thing you just did without pausing the Subscription
Ohhh i hadn't read that far, my fault. i will try with this credit card. Thanks a lot
Can i ask you one last question
Sure
I am using webhooks to handle this events, and i see that the update_subscription event is triggered for several reasons, i want to capture the event when the client updates their subscription, that is, when the charge to the card is success. To differentiate this case of any other update case, i am using the property previous_attributes to validate that the previous end period is different that the current end period. I would like to know if this is a good approach or maybe if there is another way to do it.
Yep that is the correct approach
You basically want to see if the status changes or not
If there is no status change (it stays active ) and the billing period changes, then you know the customer successfully renewed the Subscription
Perfect i hadn't include the status active validation, thanks a lot for you faster response
Sure thing
Oh sorry i just remember another question ๐
No worries
I read in the docs that the fee for the subscription plans is 0.5%, that means that if my subscription value is 11 dollars, every month (in my case) i will have a charge of 11 * 0.5% ?
Of course for every subscription active
I believe that's correct but really we don't know anything about Pricing/Fees here -- we just focus on the API. If you have Pricing questions then you are better off asking our Support team via https://support.stripe.com/contact/login
Oh i see, i will contact support for more information, Thanks for your help ๐