#emng_api

1 messages ยท Page 1 of 1 (latest)

subtle axleBOT
#

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

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

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.

storm schooner
#

Hi ๐Ÿ‘‹

Yes, if you are using Stripe Tax with the Payment Intent API then you would follow the approach you outlined. We document this here
https://docs.stripe.com/tax/custom

fallen sun
#

Ok, thanks!

storm schooner
#

Happy to help ๐Ÿ™‚

fallen sun
#

Is there an api call to retrieve a previusly created tax calculation that has not been recorded as a transaction yet? so if I call stripe.tax.calculations.create, is there a call I can make immediately afterwards to get the info from stripe?

subtle axleBOT
storm schooner
#

Is there an api call to retrieve a previusly created tax calculation that has not been recorded as a transaction yet?
We only have the Create and Retrieve APIs currently

so if I call stripe.tax.calculations.create, is there a call I can make immediately afterwards to get the info from stripe?
You can use the Retrieve API using the ID you got when you created the tax calcuation
https://docs.stripe.com/api/tax/calculations/retrieve

fallen sun
#

ok, thanks, has this method been around for a while? it's not showing up as an available method in typescript

sterile storm
#

Yes it has. I'm unsure what you mean by it's not showing up. Can you share more context?

fallen sun
#

Property 'retrieve' does not exist on type 'CalculationsResource'.ts(2339)

#
  class CalculationsResource {
        /**
         * Calculates tax based on input and returns a Tax Calculation object.
         */
        create(
          params: CalculationCreateParams,
          options?: RequestOptions
        ): Promise<Stripe.Response<Stripe.Tax.Calculation>>;

        /**
         * Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired.
         */
        listLineItems(
          id: string,
          params?: CalculationListLineItemsParams,
          options?: RequestOptions
        ): ApiListPromise<Stripe.Tax.CalculationLineItem>;
        listLineItems(
          id: string,
          options?: RequestOptions
        ): ApiListPromise<Stripe.Tax.CalculationLineItem>;
      }
    }
#

"version": "15.12.0",

sterile storm
#

I suspect it is related to versioning here but trying to confirm this.

#

Can you actually share the request id for this request, I would like to look at something on my end?

fallen sun
#

sure, where do I find that?

sterile storm
fallen sun
#

which api request are you looking for? I haven't actually executed the retrieve call yet, just pointing out that typescript is saying the method is not there

sterile storm
#

Ah, Sorry I'm not too familiar with .ts so let me confirm with a teammate here. I suspect it's a versioning issue.

subtle axleBOT
sterile storm
#

Yeah, I was able to confirm it is a versioning issue. This was first introduced in 16.7.0, so you would need to upgrade to a major version.

fallen sun
#

Great, thanks!