#JohnTheFrog
1 messages · Page 1 of 1 (latest)
I'm not quite clear on the behavior you are describing. Can you explain it a bit further? So it sounds like you are updating your subscription, and the invoice item from that proration is showing up on two invoices?
I am getting a response from API that shows position "Remaining time on XXX after 07 Nov 2022" - this is fine, this is what I want for my customer to pay
But I also see a position named
"1 × XXX (at 45.00 zł / month)"
where its period start and end is 2 months in future
this is invalid imho
"period" => array:2 [
"end" => 1673093194
"start" => 1670414794
]
These periods are for like 2023
We are on the beggining of november
Thanks for the clarification. Do you have the ID of the invoice that this happened for?
not really, upcoming endpoint does not create any kind of ID for the preview
Right, good point. Will test this myself and see what I can find
$upcomingInvoice = \Stripe\Invoice::upcoming([
'customer' => 'cus_Ml063ZStz4CiV6',
'subscription' => 'sub_1M1U62GoLmBCnzj7krcf9PeP',
'subscription_items' => [
[
'price' => 'price_1M1Wr8GoLmBCnzj7QrkUrOUB',
]
],
])
This outputs an extra position that ranges into 2023, no idea why
Upcoming endpoint should return similar validation errors to update endpoint, especially Cannot add multiple subscription items with the same plan
👋 jumping in as Pompey needs to step away. Give me a couple minutes to take a look
Can you run that invoice preview again and dump the entire payload here?
I'm not sure why you would be seeing a 45.00 zł / month line item... would need to look more into that, but seeing a period for Dec 7 - Jan 7 is expected here since Dec 7 is the next time the Sub will cycle and the next natural time an upcoming invoice would occur.