#bhaumik1665_api

1 messages ยท Page 1 of 1 (latest)

potent pineBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1254725694806822953

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

pseudo crag
#

๐Ÿ‘‹ happy to help

astral tangle
pseudo crag
astral tangle
pseudo crag
#

yes correct

#

no it's tax_rate not tax_id

#

sorry my bad

astral tangle
#

whats the difference between the two? (tax_id and tax_rate?)

which one would be correct for me?

pseudo crag
#

tax rate is the correct one

#

tax id is for customer Tax IDs

#

or Account IDs (for connected Accounts)

#

it can also be your own tax ID

#

but this is mostly used for invoicing and displaying the Tax on Invoices

astral tangle
#

okay, I want to have 6.5% tax on Connecticut state, can I create a tax rate for the same like below?

$stripe->taxRates->create([
  'display_name' => 'Connecticut Tax',
  'description' => 'Connecticut Tax',
  'percentage' => 6.5,
  'jurisdiction' => 'DE',
  'inclusive' => false,
]);

can you explain me jurisdiction and inclusive?

pseudo crag
#

inclusive means that the price you'll apply this tax rate to already has tax, so for example 10$ inclusive price means that the 6.5$ tax is already included in the 10$

#

whereas when it's false this means that you add the 6.5$ to the price amount

#

jurisdiction = 'the taxation authority that imposes the tax'

astral tangle
#

so if inclusive is false and when I use it in subscription stripe will add some tax amount to the subscription payment (invoice), correct?
(e.g. Gold plan $100 then final invoice will be $100 + $6.5 = $106.5)

if inclusive is true then whatever price/plan amount is chosen for subscription it will stay same (e.g. Gold plan $100) then final invoice will be ($100) only.

#

correct?

pseudo crag
#

correct

astral tangle
pseudo crag
#

Connecticut in the US?

astral tangle
#

yes

pseudo crag
#

then the US

astral tangle
#

okay, let me try it.

#

Thanks, its working fine!

I have created a subscription with tax like below

$allParams = [
    'payment_behavior' => 'default_incomplete',
    'payment_settings' => ['save_default_payment_method' => 'on_subscription'],
    'expand' => ['latest_invoice.payment_intent'],
    'default_tax_rates' => ['txr_1PV9GKHpCCuanh4qRnkbSSX1']
    'items' => [....]
];
$subscription = Subscription::create($allParams);

now If I want to apply multiple taxes to multiple items I can do that like this.

$allParams = [
    'payment_behavior' => 'default_incomplete',
    'payment_settings' => ['save_default_payment_method' => 'on_subscription'],
    'expand' => ['latest_invoice.payment_intent'],
    'default_tax_rates' => ['txr_ccc']
    'items' => [
        ['price' => 'price_aa', 'tax_rates' => 'tax_aaa'],
        ['price' => 'price_bb', 'tax_rates' => 'tax_bbb'],
        ['price' => 'price_cc'],
    ]
];
$subscription = Subscription::create($allParams);

so for the above code, tax applied like below

  • price_aa -> tax_aaa
  • price_bb -> tax_bbb
  • price_cc -> tax_ccc -> Default tax from the main subscription applied because no tax mentioend for this price.
#

correct?

pseudo crag
#

correct