#anthonyCruz

1 messages · Page 1 of 1 (latest)

thorn birchBOT
river kernel
#

hello! can you share the subscription id and the request id for the upcoming invoice that you attempted to get?

lost barn
#

Oh, this isn't in production. This is a feature I'm working on in my local environment so the subscription ids change frequently.

river kernel
#

that's fine, i just need an example

lost barn
#

Oh ok: sub_1MoaQAALivADE4JruzgQRanX

river kernel
#

can you share the corresponding request id for the upcoming invoice too?

lost barn
#

I don't have a request id that I know of for the upcoming invoice because I can't create the upcoming invoice. That's the issue that I need help with. When I try to fetch it I get the "Cannot specify proration date outside of current subscription period or current phase. The value should be between 1679525178 and 1711147578" error.

#

When I run this:
invoice = Stripe::Invoice.upcoming(
customer: @policy.stripe_customer_id,
subscription: @policy.stripe_subscription_id,
subscription_items: items,
subscription_proration_date: proration_date,
subscription_proration_behavior: "always_invoice"
)

#

...the subscription_proration_date is before the subscription current_period_start which is why I get the error.

river kernel
#

this should probably be the request id for that request :
req_zEB9Mu0z87LJMq

lost barn
#

Ok. Does my question makes sense? I know it was a lot

river kernel
#

yep, it does, gimme a while to take a look

lost barn
#

Thanks