#mvelychko

1 messages · Page 1 of 1 (latest)

ivory dustBOT
noble jetty
#

Do you have an example Subscription ID I can take a look at?

sonic aurora
#

id: "sub_1MpIgUEcbIV4tW2szRMRSuMO"

ivory dustBOT
noble jetty
#

gbp is one of the currencies included in currency_options so that's what we'll use for the subscription moving forward

sonic aurora
#

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.

vast estuary
#

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

sonic aurora
#

Ok, then I need to relay only on result?.currency, right?

vast estuary
#

Since you've specified gbp as the currency when creating the Subscription, we'll use GBP

#

yep, that's right

sonic aurora
#

Got it, thank you guys!!

#

@vast estuary, I receive the right currency from result?.currency. But, the price?.unit_amount is still for "usd".

vast estuary
#

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

sonic aurora
#

Is it returned along with subscription create response?

#

Trying to figure out how to get the right amount when calling the subscription create.

vast estuary
#

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

sonic aurora
#

payment_intent: null

#

also the next invoice: next_pending_invoice_item_invoice: null

vast estuary
#

yep, the null PaymentIntent for the first invoice of $0 is expected.

#

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

sonic aurora
#

Thanks, checking 1st option

sonic aurora
#

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.