#justwatch_api

1 messages ¡ Page 1 of 1 (latest)

heavy iceBOT
#

👋 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/1296549377967521895

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

crimson coralBOT
quick basin
#

hi

brazen tendon
#

Want to tell me more?

quick basin
#

It was time, it was supposed to receive the payment. but it still hasn't received it and hasn't sent the webhook with event type. The subscription on my site expired because it was overdue. I don't understand why

brazen tendon
#

What was time? What was supposed to receive payment? What Event types are you referring to? What Subscription and Invoice, what are their IDs?

From the (heavily cropped) screenshot it looks like you're talking about an Invoice that is still in a draft state. Invoices don't trigger an attempt to pay them before they're finalized.

quick basin
#

sub_1QAcRnIiftwDS9H96CvG4slZ

#

You have a very strange timezone. I don't understand anything.
On my site, the timing was fine-tuned. I had to get a webhook when I was charged a subscription fee by Stripe.
The 24 hours had completely expired but now it is talking about the draft. and the subscription on my site is expiring because the payment webhook has not arrived

brazen tendon
#

Timestamps in our ecosystem are in UTC.

quick basin
#

the payment had to be completed. The 24 hours were up.

#

The 24 hour subscription set up on my site has expired as it still hasn't sent a webhook.

#

So what do I do?

brazen tendon
#

I'm not sure, I still am not really grasping what you're trying to say.

#

Oh, I think I see.

quick basin
#

It is very simple.
A subscription was created on my site with Stripe.
Duration: 24 hours.

today the 24 hours ended and now I had to get the webhook and stripe had to receive the payment from the subscriber.
Just talking about creating a draft stripe

brazen tendon
#

You created a Subscription using a Price that has a recurring interval of daily? And expected the payment to happen as soon as the billing period ended? That's not how Subscriptions work. They generate the next Invoice at the end of the billing period. Then the Invoice remains in a draft state for about an hour, then it's finalzied and a payment is attempted.

#

Did you try to get this working in testmode before creating Subscriptions in livemode?

quick basin
#

Well, my site doesn't allow that unfortunately. if the subscription has started, it ends after 24 hours. so +1 hour can't wait for the draft.
What solution do you suggest?

brazen tendon
#

It's hard to say without understanding your business requirements, but it sounds like you need to adjust your logic.

I'd suggest adjusting the timing on your site to account for the behavior of Subscriptions. Or adjust the logic on your site so that it only expires the subscription on your site if the Subscription in Stripe stops having a status of active.

quick basin
#

Unfortunately, the subscription system on my site will not be compatible with this. So is it possible to set the current_period_start for stripe, that is, the subscription start time -1? If it's 10 o'clock in the morning for you right now, it's like making 9 for stripe. start behind. So even if it's 1 hour for the stripe, it will still be in my 24-hour period because it started an hour ago. We will be equal to 25 hours

brazen tendon
#

What's coming to mind for that, is combining backdate_start_date with billing_cycle_anchor, but I'm not sure I'm grasping what you mean by "we will be equal to 25 hours" so I'm not exaclty sure this is what you're after:
https://docs.stripe.com/billing/subscriptions/backdating?dashboard-or-api=api#backdating-billing-cycle

You can use test clocks to see exactly how a Subscription will behave using those parameters quickly in testmode:
https://docs.stripe.com/billing/testing/test-clocks

Learn how to move Billing objects through time in test mode.

Learn about backdating subscriptions.

quick basin
#

let me check

quick basin
brazen tendon
#

It's not a firm one-hour, it's more of a ballpark. You shouldn't anticipate it being exactly 25 hours. It's why we typically recommend integrations react to Events we send to webhooks.