#mkkumawat3333
1 messages · Page 1 of 1 (latest)
Could you please share the Checkout Session ID? cs_xxx
And please include the full screenshot.
cs_test_a1yJVrUoq01W1EO9tP4AFq2s2fwxmccDb5mX6ex9XXbYSZkmuIf1YnTZYb
I see. You can add Tax Rates when you create your Checkout Session: https://stripe.com/docs/billing/taxes/tax-rates
This one is more relevant to Checkout: https://stripe.com/docs/payments/checkout/taxes
Okay, Thanks:)
Happy to help. Please, let me know if you have any other questions.
I have create tax rates object now what to pass line_items.tax_rates? tax_rate object id?
Yes
I am getting Invalid array error
[
'line_items' => [
[
'price_data' => [
'product_data' => [
'name' => $payment_data['subscription_type'],
],
'unit_amount_decimal' => $amount, // It accepts amount in paisa
'currency' => $payment_data['currency'],
],
'quantity' => 1,
'tax_rates' => 'tax_rate_id',
],
],
'mode' => 'payment',
'success_url' => $payment_data['redirect_url'] . '?session_id={CHECKOUT_SESSION_ID}',
'cancel_url' => $payment_data['cancel_url'] . '?session_id={CHECKOUT_SESSION_ID}',
'customer_email' => $payment_data['billing_email'],
'client_reference_id' => $payment_data['order_id'],
'expires_at' => strtotime('+ 60 minutes'),
]
What's the error?
Invalid error
Could you please share the whole error?
Hi 👋 it looks like that is happening because you're passing a string to tax_rates but it is expecting an array of strings.
Works, Thanks:)
Any time!