#mkkumawat3333

1 messages · Page 1 of 1 (latest)

hexed violetBOT
torn stone
#

Hi! Let me help you with this.

#

What do you currently see?

finite inlet
torn stone
#

Could you please share the Checkout Session ID? cs_xxx

#

And please include the full screenshot.

finite inlet
#

cs_test_a1yJVrUoq01W1EO9tP4AFq2s2fwxmccDb5mX6ex9XXbYSZkmuIf1YnTZYb

torn stone
finite inlet
#

Okay, Thanks:)

torn stone
#

Happy to help. Please, let me know if you have any other questions.

finite inlet
#

I have create tax rates object now what to pass line_items.tax_rates? tax_rate object id?

torn stone
#

Yes

finite inlet
#

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'),
]

torn stone
#

What's the error?

finite inlet
#

Invalid error

torn stone
#

Could you please share the whole error?

cerulean timber
#

Hi 👋 it looks like that is happening because you're passing a string to tax_rates but it is expecting an array of strings.

finite inlet
#

Works, Thanks:)

cerulean timber
#

Any time!