#jan_docs
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/1329089042201051146
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
To understand how are you creating the Checkout Session
Hi, unfortunately not, as the request is not executed. The Stripe SDK does not allow to create the session with the payload, which looks like this:
$payload = [
'mode' => 'subscription',
// ...
'line_items' => [
[
'price' => $priceId,
'quantity' => 1,
],
],
'invoice_creation' => [
'enabled' => true,
'invoice_data' => ['account_tax_ids' => [
'txi_1QNWtNGq8AgVVRbzK0DjoadH',
'txi_1QNWtNGq8AgVVRbz2xneequM',
'txi_1QNWtNGq8AgVVRbzDq3dwxy7'
]]
],
// ...
What you mean by the "Stripe SDK does not allow" ? What error message you are getting ?
Ah I see what you mena sorry, by checking the payload
Stripe\Exception\InvalidRequestException
You can only enable invoice creation when mode is set to payment. Invoices are created automatically when mode is set to subscription, and are unsupported when set to setup. To learn more visit https://stripe.com/docs/payments/checkout/post-payment-invoices.
Does setting the Account Tax Id globally in your Stripe Dashboard work for your use case ?
https://docs.stripe.com/tax/invoicing/tax-ids#managing-tax-ids
Or you need to set a custom tax Id for each Checkout Session ?
The latter, we want to specify the account_tax_ids for each checkout session (individually).
Unfortunately, you can't set the account tax id in the Checkout Session. In this case you'll need to use a more advanced integration (using Elements) https://docs.stripe.com/billing/subscriptions/build-subscriptions?platform=web&ui=elements
Thank you i will look into that.
Welcome!