#boggerss_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1328432284537196623
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- boggerss_subscription-item-endpoints, 42 minutes ago, 29 messages
- boggerss_api, 3 hours ago, 14 messages
- boggerss_api, 4 hours ago, 21 messages
Hi ๐
How are you creating subscriptions?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Via the API
I see properties like current_period_start and current_period_end but they seem to be immutable (From my end)
And you want your subscription to not be active until you reveive payment?
Yes
Have you tried creating a Subscription with the paymet_behavior of "default_incomplete"?
https://docs.stripe.com/api/subscriptions/create#create_subscription-payment_behavior
Use default_incomplete to create Subscriptions with status=incomplete when the first invoice requires payment, otherwise start as active. Subscriptions transition to status=active when successfully confirming the PaymentIntent on the first invoice.
This would be different for me at the moment because I'm using send_invoice
Can the invoice still be updated when default_incomplete is used on the invoice
For example wanting to use add_invoice_items later on before the due date and before finalisation
You can test this out in test mode to check
Yeah I've just tested this but I realised there is a flaw in the solution you're giving me
days_until_due can only be used with send_invoice
So I can't actually set the start date of the subscription this way using default_incomplete
I'd lose the invoice due date if I were to use that
Can you explain a bit more about how you want this to work overall? Like give an example of how you would prefer this to work for a single subscription?
I'm essentially making a screen that you can add one time or recurring products to
I've got the basic CRUD logic sorted for this.
The screen has a due date field, this works fine for one time products as I can just set days_until_due and then update the invoice until finalised.
With recurring this is a bit more difficult but I've managed to achieve it the only problem is, my due date on my invoices don't match the start date on my subscriptions.
Using my interface I'd select the 15th Jan for due date, the invoice gets created with the right due date using days_until_due but the subscriptions become active straight away
Gotcha, also reading back through the previous messages I think I see some of the confusion: payment_behavior=default_incomplete and collection_behavior=send_invoice should be compatible as far as I am aware. days_until_due is only incompatible with charge_automatically which is a collection_behavior.
I was just going from this sentence in the docs
Oh shoot you are right my apologies
I am not sure if what you want is possible then but I am double checking
I think it might be possible using subscription schedules which I am okay with I'd just thought I'd check if the standard subscription API provides that option