#justwatch_update-sub-bca

1 messages ยท Page 1 of 1 (latest)

thin starBOT
#

๐Ÿ‘‹ 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.

pastel notch
#

Hello

lunar beacon
#

Hi ๐Ÿ‘‹

How are you creating your Subscriptions?

pastel notch
#

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?

lunar beacon
#

What is a day late? what is "he" in this scenario?

pastel notch
#

"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.

lunar beacon
#

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

pastel notch
#

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.

lunar beacon
#

That is how you created this subscription (10/2 - 11/2)

pastel notch
#

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

lunar beacon
#

YOu didn't specify 30 days in the Price object though

#

You specified a recurring inteval of 1 month

pastel notch
#

true

lunar beacon
#

You can create recurring prices that bill in 30 days if you want

pastel notch
#

How?

#

Is it possible to set the date directly?

lunar beacon
#

No

#

You will keep having this problem

#

You will need to do 2 things

pastel notch
#

Hmm

lunar beacon
#

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

pastel notch
#

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.

lunar beacon
#

You can specify the billing_cycle_anchor to 11/1.

pastel notch
#
{
    "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"
    }
}
lunar beacon
#

Oh right

pastel notch
#

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?

lunar beacon
#

I don't know what you are trying to do here.

pastel notch
#

Noc 2 to Nov 1

lunar beacon
#

Oh, using the BCA Config param. You can use that when you create a Subscription but only if you are using the Subscription API

pastel notch
#

what I want is to update this

pastel notch
lunar beacon
#

Sorry you are not providing full sentences so no, I don't get it.

pastel notch
#

End: Nov 2

#

I want to update it to Nov 1

#

with api

lunar beacon
#

Can't do it, I thouth we just covered that