#caze_api

1 messages ยท Page 1 of 1 (latest)

light quartzBOT
pulsar joltBOT
#

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.

light quartzBOT
#

๐Ÿ‘‹ 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/1243302234675216506

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

split yoke
#

const updatedSubscription = await stripe.subscriptions.update(
purchase?.subscriptionId,
{
items: items,
billing_cycle_anchor: "now",
metadata: { purchaseId: newPurchase.id },
}
);

golden helm
#

hello again ๐Ÿ˜„

split yoke
#

hahahaha

#

hi

#

Thanks for the other issue BTW

golden helm
#

NP!

#

how do I get the difference value right after or right before the difference value?

#

Can you explain a bit more or share an example? I don't understand what you're trying to get here

split yoke
#

like the different values on the image

golden helm
#

What do you mean difference value?

split yoke
#

Faturas = Invoices

golden helm
#

You mean, see what the payment amount will be?

split yoke
split yoke
#

If I pay on the first plan 12 USD, and on the next one 36 USD, the differente will be 24 USD

#

So I would bay 12 USD on the first one and 24 USD on the second one

#

or something like that

golden helm
#

Getting this ahead of time is possible but a bit trickier, I'll explain afterwards first

#

You can use expansion in the Subscription update request to get the full latest_invoice in the response and inspect the latest_invoice.amount_due for example:
https://stripe.com/docs/expand
expand: ['latest_invoice']

split yoke
#

Ooh, thanks! I'll try that, thanks a lot!

light quartzBOT
golden helm
split yoke
#

This amount_due is a number, right? Can this number be negative if the amount of the second subscription is smaller? Is this number the amount in smaller units or the full price of the currency?

old onyx
#

๐Ÿ‘‹ Stepping in for my teammate

#

amount_due is an integer, yes. It won't be negative ,no, but might be less than what it was for the first invoice depending on the items you include in the subscription update.