#kyle-w_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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
Hi there ๐ are you using a beta version of our SDK as that doc mentions?
Hi - im using v82 but im not sure what beta version i'd need, it doesnt seem clear to me unless im blind
Looks like it's v82.3.0-beta.1:
https://github.com/stripe/stripe-go/releases/tag/v82.3.0-beta.1
I see it mentioned in the other changes section that support for Hooks is included there.
I'm not sure if later beta releases kept that feature or not
With this being a public preview, does that mean it could be subject to change?
Yeah, potentially
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
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.
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 ๐
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).
gotcha
sounds like my evening quick fix is gonna be a weekend of fun ๐ thanks for the help anyway
Any time! (even if it wasn't the answer you were hoping for this time ๐ )
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.