#damenz - subscription auto-renew
1 messages ยท Page 1 of 1 (latest)
"renewal_behavior": "release",
"renewal_interval": null,
Hi ๐
What do you mean by "end of the term"? Is that the end of your billing cycle?
is the config at the moment (Default I think)
Yes correct
I just want to make sure that
req_grJDf2kTfD1nfe
the way I create it at the moment is fine
Do you have an ID for an example Subscription?
and that it will auto-renew (no end to the subscription)
Unless explicitly canceled
Oh, Subscription Schedule. And what is the behavior you want to implement?
I just want to make sure that a subscription of lets say 30$ per month will "never end"
unless canceled
So there is no "duration" or end of the subscription untill canceled
That you can configure with just the end_behavior parameter
https://stripe.com/docs/api/subscription_schedules/create?lang=node#create_subscription_schedule-end_behavior
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so release is actually the default behaviour, which is what i want ?
Yup, that will persist the subscription until actively canceled
Good !
Other question
I am trying to unlock commission for my sales rep everytime there is a payment done for a given subscription
What would be the right webhook for this ?
Also, since the subscription_scheduled is release, after it is release, it won't be linked to the underlying subscription ?
I am keeping the subscription_schedule ID in DB. I am afraid that after its been released and I receive webhook of a payment (or any webhook you will tell me to use for that scenario), I wont be able to match it to what I have in my DB
And I cannot persist the subscription ID because thats the point of using subscription_schedule : the subscription does not exist yet..
@spiral forge whenever a payment succeeds related to that subscription, save the commission in your DB
Payment is linked to the subscription, not the subscription_schedule right ?
I think the webhook is payment_intent.succeeded
You need to check if the payment intent is related to the subscription
I dont have subscription ID in my DB, only subscription schedule id
I can see that the subscription has a "schedule": "sub_sched_1KjTsmLiVV9UQF8g5F57sPjH", field
But my worry is that after its been released, that it won't be associated to a schedule anymore, therefore I wont be able to map them / match the payment in my db
or the subscription "schedule" will always be linked to the schedule no matter what happen ?
You can test this out yourself using our new Test Clocks feature: https://stripe.com/docs/billing/testing/test-clocks