#.buddhaha
1 messages · Page 1 of 1 (latest)
Hello .buddhaha, we'll be with you shortly! 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.
• .buddhaha, 1 day ago, 10 messages
• .buddhaha, 1 day ago, 11 messages
• .buddhaha, 2 days ago, 47 messages
• .buddhaha, 3 days ago, 17 messages
Cool. Thanks!
Could you please share the Subscipriton id ?
The price currency used is USD
Could you share the link to the dashboard page showing SEK ?
In the customers' portal it also says SEK (which it should, its good, but I want it when fetching the subscription programatically too)
Ok, so the default currency of the price is USD.
yeah
The Subscription currency is SEK.
yes
So when fetching the price via the API, you need to refer to the SEX currency option
And refer to the SEK option
I'm not fetching the price object per se, I'm fetching the subscription
I just want to summarize and present the total price for the subscription
something in the lines of:
customer: customerId,
});
let totalPrice = 0;
subscriptions.data.forEach((subscription) => {
subscription.items.data.forEach((item) => {
totalPrice += item.plan.amount * item.quantity;
});
});```
Is there a better way to do this then? Otherwise I guess I'll have to fetch each price individually, expand currency_options, and refer to currency_options per price. But it seems like a long route to just fetch the total amount.