#mvelychko
1 messages · Page 1 of 1 (latest)
Do you have an example Subscription ID I can take a look at?
id: "sub_1MpIgUEcbIV4tW2szRMRSuMO"
👋 The Subscription is still in GBP, but the price it's subscribed to set a bunch of different currencies when it was created (you can see in the creation request https://dashboard.stripe.com/test/logs/req_tlRqkUvAKZXbFB that currency_options was set)
gbp is one of the currencies included in currency_options so that's what we'll use for the subscription moving forward
Yeah, this product includes the "gbp" currency, but I receive "usd".
So, it looks like stripe always sends the "usd" in result?.items?.data?.[0]?.price.currency. Do I get it right?
I see that in result?.currency I get back the "gbp", which is logical, but not in price.currency.
Just taking over for my teammate! That's correct, result?.items?.data?.[0]?.price.currency reflects the Price's default currency, which is USD in this case
Ok, then I need to relay only on result?.currency, right?
Since you've specified gbp as the currency when creating the Subscription, we'll use GBP
yep, that's right
Got it, thank you guys!!
@vast estuary, I receive the right currency from result?.currency. But, the price?.unit_amount is still for "usd".
right, that's also reflecting the unit_amount for the price's default currency
if you preview the subscription's next invoice, it should reflect the GBP amount of 865
Is it returned along with subscription create response?
Trying to figure out how to get the right amount when calling the subscription create.
I see you're expanding latest_invoice.payment_intent . You could look at the PaymentIntent's amount to determine this
In this case, you've created a trial so that ends on 4/1, so no PaymentIntent is created for this zero payment
payment_intent: null
also the next invoice: next_pending_invoice_item_invoice: null
yep, the null PaymentIntent for the first invoice of $0 is expected.
You can use this endpoint to preview the subscription's next invoice: https://stripe.com/docs/api/invoices/upcoming
Or you can try to test looking at latest_invoice.payment_intent in the creation response by creating another test subscription but omitting any trial periods
Thanks, checking 1st option
1st option is a solution but adds more time to process the data, the 2nd option is not actual, as we have the trial periods.
But thank you for all the details and potential solutions. I'm good to go further.