#kyle-w_api

1 messages ยท Page 1 of 1 (latest)

meager spadeBOT
#

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

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

molten drift
#

Like it suggests

params := &stripe.PaymentIntentParams{
  Amount: stripe.Int64(1000),
  Currency: stripe.String(stripe.CurrencyUSD),
  AutomaticPaymentMethods: &stripe.PaymentIntentAutomaticPaymentMethodsParams{
    Enabled: stripe.Bool(true),
  },
  Hooks: &stripe.PaymentIntentHooksParams{
    Inputs: &stripe.PaymentIntentHooksInputsParams{
      Tax: &stripe.PaymentIntentHooksInputsTaxParams{
        Calculation: stripe.String("{{CALCULATION_ID}}"),
      },
    },
  },
};
result, err := paymentintent.New(params);

But i do not see the hooks at all in the sdk

distant panther
#

Hi there ๐Ÿ‘‹ are you using a beta version of our SDK as that doc mentions?

molten drift
#

Hi - im using v82 but im not sure what beta version i'd need, it doesnt seem clear to me unless im blind

distant panther
#

I'm not sure if later beta releases kept that feature or not

molten drift
#

With this being a public preview, does that mean it could be subject to change?

distant panther
#

Yeah, potentially

molten drift
#

Maybe its better to explain my issue, i currently have a ltd business, we make a payment intent and charge users using saved card details.

We have recently become vat registered and so i need to start calculating tax, it doesnt seem possible to me to do this otherwise?

#

I dont particularly want to use a preview endpoint for something our business relies on

distant panther
#

Correct, if you need to associate the Payment Intent with the Tax Transaction object within Stripe, you will need to use this flow.

If your goal is to just calculate tax, and you don't necessarily need to tie everything together within Stripe, then you could just create the Tax Calculation and use it's result to influence the amount you create the Payment Intent for.

molten drift
#

so we have already increased our prices by 20% , my hope was to be able to report in stripe VAT amounts etc for customers where they are eligble. Essentially right now we have increased prices by 20% - for customers in the UK we will pay their VAT and the rest we pocket. But yeah this seems fairly complex, i had hoped it'd be a simple flag i could pass to the payment intent ๐Ÿ˜„

distant panther
#

Yeah, allowing Stripe Tax to tightly integrate with Payment Intents is still something that we're actively working on improving. When Stripe Tax was first released the focus was making it work well with our more automated flows (Subscriptions and Invoices).

molten drift
#

gotcha

#

sounds like my evening quick fix is gonna be a weekend of fun ๐Ÿ˜„ thanks for the help anyway

meager spadeBOT
distant panther
#

Any time! (even if it wasn't the answer you were hoping for this time ๐Ÿ˜… )

molten drift
#

I would like to say that i love that i can message you guys, is very helpful and hope you keep it up, i remember i was one of the first people who implemented the new checkout when that came out and the docs were basically non existent and got help through the IRC chat, i love it and you dont see it much nowadays.