#justwatch_update-sub-bca
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/1295783666391191633
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
Hi ๐
How are you creating your Subscriptions?
Proxy Day, week, Month
sub_1Q5TZQIiftwDS9H9yzDc3fuX
"current_period_end": 1730557828,
My date: ('2024-11-01')
02 for your stripe api but 01 for me
so he's a day late. What should I do?
What is a day late? what is "he" in this scenario?
"current_period_end": 1730557828,
Sat Nov 02 2024 14:30:28
So there are 31 days between the start date and the end date. It will probably receive the money from the user on November 02 and send me the webhook api.
This subscription was created on 10/2/2024
Using a Price object that has a monthly recurring cycle
So it will set the billing period to the same day in the next month
But for the subscription that occurs on my site, it will expire on November 01, that is, after 30 days, but the subscription will not be renewed because Stripe will send me a late webhook response on this issue.
That is how you created this subscription (10/2 - 11/2)
30 day
My site does not work as the day of the same month as yours. It always continues by adding 30 days.
10/2 - 11/1 = 30 day
YOu didn't specify 30 days in the Price object though
In this request https://dashboard.stripe.com/logs/req_RdGa0JIqRCixRn
You specified a recurring inteval of 1 month
true
You can create recurring prices that bill in 30 days if you want
Hmm
First, create a Price that bills every 30 days. https://docs.stripe.com/api/prices/create#create_price-recurring
Specify interval as day and interval count as 30
Then, if you are creating a subscription later than the first of the month but you want the subscription to start then, you need to backdate the start date. The customer will be prorated for the reduced billing period
Sorry, not backdate, but specify the billing cycle anchor as the future date you want to bill the customer. Since you use Checkout Sessions, you would specify the subscription_data.billing_cycle_anchor parameter here: https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-subscription_data-billing_cycle_anchor
hmm
But is it possible to change the cycle date for a pre-built subscription?
Yes, it started 10/2 and ends 11/2. Is there any way to make it 11/01 via api?
if have one, that might work too.
You can specify the billing_cycle_anchor to 11/1.
{
"error": {
"message": "When updating an existing subscription, billing_cycle_anchor must be either unset, 'now', or 'unchanged'",
"param": "billing_cycle_anchor",
"request_log_url": "https://dashboard.stripe.com/logs/req_8zpqXHnUYamjCA?t=1729008063",
"type": "invalid_request_error"
}
}
Oh right
That is covered here: https://docs.stripe.com/billing/subscriptions/billing-cycle
If there is something to edit the invoice end cycle date, this would be something more useful. Because I can set a 100% accurate date and never have a problem
curl https://api.stripe.com/v1/subscriptions \
-u "sk_test_51NyKvhIiftwDS9H98B9y8TTZJHjZQAu2Sebv3O4SG7Qm0tcPyNr9qPg7XA4k7mN2Yo3AZv47Ynry43u02pldBFIs00rVGb0eUe:" \
-d customer="{{CUSTOMER_ID}}" \
-d "items[0][price]"="{{PRICE_ID}}" \
-d "billing_cycle_anchor_config[day_of_month]"=15 \
-d "billing_cycle_anchor_config[hour]"=12 \
-d "billing_cycle_anchor_config[minute]"=30 \
-d "billing_cycle_anchor_config[second]"=0
this, right?
I don't know what you are trying to do here.
Oh, using the BCA Config param. You can use that when you create a Subscription but only if you are using the Subscription API
what I want is to update this
You got it?
Sorry you are not providing full sentences so no, I don't get it.
Can't do it, I thouth we just covered that
We do have an entire section of our docs on how you can modify existing subscriptions. https://docs.stripe.com/billing/subscriptions/change
We have specific recommendations for updating billing cycles of existing subscriptions but I'm afraid they don't exactly get you to where you are trying to go. https://docs.stripe.com/billing/subscriptions/billing-cycle#changing