#tyson
1 messages ยท Page 1 of 1 (latest)
I think you could create the Subscription and specify and cancel_at (to reflect the duration)
And you'd pass proration_behavior: 'always' to get a prorated Invoice for ~3 weeks on a monthly Price, for example
Nice what are proration behavours and hwo do they work
It'll generate an Invoice to reflect the actual time of the Subscription (3 weeks) as opposed to the standard 1 month (assuming a monthly Price)
I can't find the cancel_at date what are the paras is it date and never for the possible options
Does this all work the same for one off payments?
Would it be easier to just do weekly on the subscription with the end date spesifyed?
for a 4 week sub
https://stripe.com/docs/api/subscriptions/create#create_subscription-cancel_at
You'd pass a timestamp that reflects the date you want to cancel
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You wouldn't need to prorate then I guess
Not sure what you mean?
So my connect accounts are football clubs and they have a 4 weeks course happening every weekend. they want their customers to be able to come say 3 weeks in and only pay for those 3 weeks. Would it be easier to jsut create a subscritpion that charges every week with a end date for the end of the course?
Hi! I'm taking over this thread.
If you create a weekly subscription, then the customer will be charged every week. Is this what you want?
Would i then make a product with it set to week, with a end date. kinda
This will get you up to speed!
Yes I already saw this message. That's why I said:
If you create a weekly subscription, then the customer will be charged every week. Is this what you want?
If charging the customer weekly is what you want, then yes that's a good option.
nice ok and is the para week for the default_price_data[recurring][interval]
Sorry I don't understand your question. Can you try to rephrase? I have no idea what "para week" is.
So for the default_price_data[recurring][interval] on the product for the subcritpion i will set that to week
not weekly
Yes, this is explained here https://stripe.com/docs/api/subscriptions/create#create_subscription-items-price_data-recurring-interval
Sweet, thanks for you time, one last question, i have to set up a the moment that we create a product and then use a checkout session set to subscription for the payment, this does all the heavy lifting on the creation process, am i able to set the cancel_at when creating the checkout session.
Yes we recommend using Checkout Session to create subscriptions. This is covered here: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout
What exactly is your question?
able to set the cancel_at via the checkout session call?
can't see it in postman or docs
Indeed I cannot find this either. But you can always update the subscription after it was created to set the cancel_at.
using the {{baseUrl}}/v1/subscriptions/:subscription_exposed_id Would the ID be the sub_ID i am guessing
Correct. For example you listen to the checkout.session.completed event, which will contain the subscription ID, and then you update the subscription with the cancel_at property.
I can only see the cancel_at_period_end in postman does the cancel_at para still work
yess i see in docs
I really appreciate your help thank you!
Happy to help ๐