#alexesch_code
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/1428749564004794440
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
code used
// Calculate tax using Stripe Tax Calculations API
$calculation = $stripe->tax->calculations->create([
'currency' => 'usd',
'line_items' => [
[
'amount' => (int) $tax_base_amount,
'reference' => 'order_' . $order->order_id,
],
],
'customer_details' => [
'address' => [
'line1' => $billing_address['thoroughfare'] ?? '',
'city' => $billing_address['locality'] ?? '',
'state' => $billing_address['administrative_area'] ?? '',
'postal_code' => $billing_address['postal_code'] ?? '',
'country' => $billing_address['country'] ?? 'US',
],
'address_source' => 'shipping',
],
]);
$paymentintent_params['hooks'] = [
'inputs' => [
'tax' => [
'calculation' => $order->data['taxes']['calculation_id'],
],
],
];
Hi there! Would you be able to share the request IDs for the tax calculation and PaymentIntent creation?
tax calculation: tax_1SJ6NEJaf89hC41Ie8M8Nm9j
payment intent: pi_3SJ6C5Jaf89hC41I0Mp1rsW7
pi request id: evt_3SJ6C5Jaf89hC41I055QhOTL
for tax, i'm not sure about how to find it
No worries, this will be enough to start investigating
so, we want to calculate taxes using $stripe->tax->calculations->create, only on enabled states, on this page tax/registrations
Just letting you know that I'm still looking into this, appreciate your patience
ok
From my side, I'm seeing that tax_1SJ6NEJaf89hC41Ie8M8Nm9j is calculating 0% tax for country, state, and county. Can you let me know specifcally where you are seeing the non-zero tax?
let me double check, you can close this thread for now, once i'll get the actual data, i'll open a new one
thank you