#kostas-sioupoulis_code
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/1225070538095984743
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
The upcoming invoice calls are mutually exclusive. So back to back calls shouldn't really make any difference in the price you're seeing in the latter API calls.
So it wouldn't affect the next one?? Is there maybe something I need to (clear) from the subscription after I callled the invoice.upcoming function?
Not really. Negative amount is usually credits for unused time.
Can you share an example response where you're seeing this along with the request body?
it's a bit long but yes I can
for some reason the interval of the plan is month in the invoice
Although it should be annual for my subscription
Yeah the negative amount is credit for the previous year month I think
"amount_excluding_tax": -323696,
"currency": "eur",
"description": "Unused time on Encrypted Vault after 03 Apr 2024",```
Or maybe that is where the mistake is.
Can you elaborate what you mean by that?
If you loook at the subscription data > price > interval
it's monthly
are you saying it should be a yearly sub?
Subscription object shows current period start date as April 3, 2024 12:19:28 PM GMT and end date as May 3, 2024 12:19:28 PM GMT
So it is a monthly subscription.
Are you trying to update it to a yearly sub?
Seems like it as the second line item is
"active": true,
"billing_scheme": "per_unit",
"created": 1712149201,
"currency": "eur",
"custom_unit_amount": null,
"id": "price_1P1TQ5IqJXTh2k1UgsOfEo5N",
"livemode": false,
"lookup_key": null,
"metadata": {},
"nickname": null,
"object": "price",
"product": "prod_PrB824jlD5Drfb",
"recurring": {
"aggregate_usage": null,
"interval": "year",
"interval_count": 1,
"trial_period_days": null,
"usage_type": "licensed"
},
"tax_behavior": "unspecified",
"tiers_mode": null,
"transform_quantity": null,
"type": "recurring",
"unit_amount": 378000,
"unit_amount_decimal": "378000"
},```
So you have a monthly subscription that you're charging `324000` (in cents) each month and you're updating it to `378000` (in cents) yearly
When I update it I mistakenly change it to a monthly form a yearly subscription
So that's why the problem occurs probably
When I update it I mistakenly change it to a monthly form a yearly subscription
I don't know what you mean by that. I looked up the subscription object and it is currently a monthly subscription
You're trying to update it to a yearly sub no?
It was initially a yearly subscription
Ah I looked at the price object changes on the subscription and looks like this update request switched the subscription to monthly subscription
https://dashboard.stripe.com/test/logs/req_dPWiVwzvkM04dx
It came from your Python backend