#uzu_api
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/1370144552064651295
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello
In your request body, you're also passing subscription_proration_date which is I think resetting your billing cycle anchor
you can't prorate starting that date unless you also reset the billing cycle to that date.
mm ok i will try
im getting the same period on the new price is from 20 may 2025 to 20 may 2026
req_YVRpbMNzv3CApq
Can you share the exact response you're seeing? We don't store GET request responses so I can't see what you're seeing
๐งโ๐ป How to format code on Discord
Inline code: wrap in single backticks (`)
This:
The variable `foo` contains the value `bar`.
Will turn into this:
The variable
foocontains the valuebar.
Code blocks: wrap in three backticks (```)
Also, you can specify the language after the first three backticks to get syntax highlighting.
This:
```javascript
function foo() {
return 'bar';
}
```
Will turn into this:
function foo() {
return 'bar';
}```
Notes about **code blocks**:
- Specifying the language is optional (e.g., you can omit `javascript` in the example above)
- If you don't specify the language you won't get syntax highlighting
- When you're inside a code block (after you type \`\`\`) the `Return`/`Enter` key will add a new line instead of sending your message
- Once you end the code block `Return`/`Enter` works normally again
You can [read more about message formatting on Discord's website.](https://support.discord.com/hc/en-us/articles/210298617)
the period on the last item (the new yearly price) is from 20 may 2025 to 20 may 2026
{
"id": "il_tmp_16e9f7FDzWEzE3i91c746952",
"object": "line_item",
"amount": 237492000,
"amount_excluding_tax": 237492000,
"currency": "cop",
"description": "1 ร Plan Pro COL WEB (at $2,374,920.00 / year)",
"discount_amounts": [
{
"amount": 59373000,
"discount": "di_1RLm2JFDzWEzE3i90HhRxLSO"
}
],
"discountable": true,
"discounts": [],
"invoice": null,
"livemode": false,
"metadata": {
"principal": "price_1QgtfyFDzWEzE3i9Z5R8KE20"
},
"parent": {
"invoice_item_details": null,
"subscription_item_details": {
"invoice_item": null,
"proration": false,
"proration_details": {
"credited_items": null
},
"subscription": "sub_1RLm2JFDzWEzE3i9JMzlHTWT",
"subscription_item": "si_SHA5bHgvskGtpe"
},
"type": "subscription_item_details"
},
"period": {
"end": 1779317760,
"start": 1747781760
}
}
This is the item im talking about, i think there sould be 2 lines as response instead of this, 1 with a negative amount from 6 may (start of subscription) to 20 may and 1 more from 20 may to 6 may 2026
at least this works on monthly frequencies, but i dont know why this change of recurring interval change this behavior
Give me a few minutes to review this information. I'll respond as soon as I can
thanks
oh wait, you can't have a subscription with items that have two different intervals
All the items in a subscription needs to have the same interval (monthly, yearly etc)
This is a known limitation of the Subscriptions
but im removing all the old monthly items, my upcoming preview request have 3 items, 2 deleted (monthly) and the new is yearly
i know that limitation thats why im removing all the monthly items
but there's still proration that happens on the monthly prices right?
yep but the period start 6 may 2025 is moving to 20 may 2025 (the day im making the change on testclock)
and i dont want this because now the customer next invoice will be on 20 may 2026, and it should be 6 may 2026
is that possible?
Can you try setting subscription_proration_behavior to none and see if that removes those proration items?
It might be easier to just create a new Subscription with yearly price when the customer wants to upgrade
Just to clarify, what's the current time on the test clock?
its 20 may
You can't backdate the new subscription item as far as I know
can you check that pls i thought there was a backdate start parameter on creation
On creation there is, but there isn't one for update. double checking though
Yeah I don't see it for subscription update.
This is why creating a new yearly sub would be easier
mmm ok my idea was to create a new subscription with the yearly price, but i want to still make the prorate for the time old price wasnt used
is there a way to do that? i was trying to get the lines from preview and use it to discount the prorations
is there a way to do that? i was trying to get the lines from preview and use it to discount the prorations
That might work? Were you not seeing the prorated amount in the preview?
nope i just see the prorate from old plan, but for the new the preview just show the price from 20 may 2025 to 20 may 2026 and i dont want that
You don't need the new subscription item to calculate the discount though?
What were you seeing if you only passed the two monthly subscription items with deleted: true?
Ah the current test clock is already on 20 may so you likely won't get the correct amount anyway
Can you create a new test subscription with a diff test clock & see if you're seeing correct amount returned?
ok let me try but i was expecting to see something like "discount for the new price from 6 may to 20 may (not used)" and not total of the new price (yearly) from 20 may to 20 may 2026
Yeah first try omitting the yearly item from the upcoming invoice request. If that doesn't work try creating a new subscription
ok i will try