#RickyU-Subscription
1 messages ยท Page 1 of 1 (latest)
Yes i read that, but it doesn't state that when a subscription goes in to "unpaid" how then does it go in the cancelled , and after what period.
No it won't. It will continue to generate Invoice as normal
right, in this way what i want to do is trigger a webhook and send an email to the user.
previously i set the setting to "cancel" the subscription if it was past_due, and this would cancel it, but now i cahnged it to unpaid... how then i can i create another webhook for cancelled? or will it not trigger one
here is another option in the setting to cancel the subscription after 60 days past due invioce, i wonder if this would work?
is this the chain of events :
- create a subscription (trial)
- 3 days before trail over a webhook is sent
- when trail is over a updated webhook is sent switching the status to "active"
- 1 hour later a invoice is generated and a charge attempt is made.
- if no cc is on file, the webhook
updatedis sent with status : unpaid - based on setting "smart retires" 4 times for 1 month, the subscription can either be marked as unpaid or cancelled..
am i right with the above.
Yes sounds correct
The screenshot's setting can mark the Sub as cancelled yes
I am a bit lost, what event that you want to trigger a webhook?
im not sure if this will trigger :
this is what i am looking for, get webhooks at teh correct time so i can generate emails and update my database.
-
3 days before trail ends [trail_end] DONE
-
when trail_ends i get a
updatehook that changes the status toactivefor a short while - DONE, i dont do anything here -
when an invoice fails to be paid which is abour an 1hr or so after no.2 the sttus is changed to past_due. this indicates to me that the trail is ended. i sent the user an email
-
i then want to send another final email to the user 1 week later , warning them of cancellation -- what hook can i look out here.
-
finally , if 4 attempts are made to charge and no payment method on file, i want to cancel the subscription -- which hook or setting do i need to set here.
everything is okay i just nee no. 4 and 5.
- I think we don't have any event for that. You would want to track by 1 week after the Invoice failed, verify if the Invoice is still unpaid
i though so, okay that is fine for no. 4,, but how abuot for no. 5.. the last screenshot i sent i think will not trigger as that seems to be only for "payments that require confirmation"
For 4. there is an option for 15 days though, on "Manage invoices sent to customers"
i dont want stripe to send invoices, i only want webhooks
our backend will handle the email,.s
Ah okie, nevermind above
Looking for 5
Are you setting retry up to 4 times, using Invoice Plus?
one way is for instead of changing to "unpaid" i can change it to "cancelled' but this will remove the subscription right after 1 month (4 retires) not sure if i want to do that.
im not using invoice plus, im using smart retries 4 times within 1 month.
which webhook will i get here. updated ?
How about invoice.payment_failed ? Did you get them?
will that trigger one time or once for each of the 4 failed attempts?
also when a subscription is cancelled or unpaid will the webhook tell me that it was a trail user or not? thats what i would need to know.
It should be triggered on each of 4 failed attempts.
so this will not trigger for me
Why would you think it will not trigger? It says if a payment failed last through 15 days the Sub will be cancelled
the title of that section is "Manage payments that require confirmation"
hence that would mean only for paymetns that need 3ds or actions.
yes no??
also it clashes with the former smart retires 4 times in 1 month then change the subscription to past_due
Ah right, its' for Invoice's PI that is on require_actions status
so to summarize my question when i retry 4 times on a trial account. and it fails, i have the option to change to "unpaid" or "cancelled'
- will i know in the webhook if it was a trial account that is unpaid or cancelled?
- how do i somehow go from a unpaid to cancelled, or do i need to handle that myself.
Whenever it changed to unpaid or cancelled it's the same webhook event of customer.subscription.updated
Inside it there is a Subscription object
If there is something to distinguish, it should be inside https://stripe.com/docs/api/subscriptions/object
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Am I correct that you want to distinguish between:
- If it is a Subscription retried 4 times and failed, then transited into "unpaid" or "cancelled" based on Setting
- Or if it is a Subscription simply be canceled or unpaid by your own API?
yes i know its all in the updated hooked which i am subscribed to.
i would like to know if the subscription that has been updated to status : unpaid or deleted, weather it was a trial account or not, i have seen the logs and i cant find this information that it was a trial account.. ONLY when the status goes from trailing to active is this data visisble in the updated hook.
the reason is i want to send an email to the user saying " your [trail account ]account is cancelled" or [pro account]
for example this is the updated event.
evt_1L87EOLJFiJSdSFpd9X3Nb3i
this event changes the status from past_due to "unpaid" the subscription is still active, BUT the event object doesn't contain any data telling me this user is a trailing user.
trialing
By trialing user, do you mean the Subscription had a trial? There is no "Trial user" concept, only "Trial Subscription"
evt_1L87EOLJFiJSdSFpd9X3Nb3i -> The Subscription does have trial_end and trial_start, which indicates it is a Sub that had a trial
yes i mean trial subscription.
oh ok yes it does have a trial_end okay i can use that.
one last thing.
i found this setting which may work , but i want you to help me check if this will trigger
will the above trigger after 60 days past due? even if i have customer emails radio button turned off?
It should be. You can test it using Billing Clock I believe. It's virtual clock that simulate times pass for Subscription
๐ I would need to step down for the day. I believe that option should work and you can also test it. If it doesn't please write into Support as a bug report and we are happy to investigate.