#emng_code

1 messages · Page 1 of 1 (latest)

thin hamletBOT
#

👋 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/1289067041931788320

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

warm dust
daring pilot
#

with this call

const subscription = await stripe.subscriptions.create({
  automatic_tax: {
    enabled: true,
  },
  customer: '{{CUSTOMER_ID}}',
  items: [
    {
      price: '{{PRICE_ID}}',
    },
  ],
  payment_settings: {
    save_default_payment_method: 'on_subscription',
  },
  expand: ['latest_invoice.payment_intent'],
});

how is the tax determined? Is it by the address associated with the customer?

#

This is for a connect account integration, so I"m collecting payments on someone elses behalf

thin hamletBOT
knotty yoke
#

Hi @daring pilot I'm taking over this thread

daring pilot
#

It seems like it uses the info attached to the customer object, is that correct?

knotty yoke
#

The location of the seller
The location of the customer
The type of the product sold
Whether the transaction involves a reverse charge
The status of the customer (for example, whether they’re a VAT-registered business, private person or an exempt organization)```
daring pilot
#

basically, I don't have any address information attached to my customers. But I am collecting a billing address during checkout. What' I'm doing is something like this

  1. create payment method on the client and pass the payment method id to my server
  2. create a subscription and set the payment method id as the default. Also, enable automatic_tax.

This transaction is me collecting payments from an enduser on behalf of a seller on the platform. Can you fill in the gaps on how to ensure I'm properly collecting taxes? Do I need to attach the billing address to the customer? Can I somehow pass the address in when I'm creating the subscription?

knotty yoke
daring pilot
#

ok, thanks!

#

what happens if the customer does not have an address associated with them?

knotty yoke
#

Then Stripe Tax won't be able to calculate the tax correctly.