#emng_code
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/1289067041931788320
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Those APIs are for incorporating Tax to custom payment flow. With Subscription, you have native support for Stripe Tax: https://docs.stripe.com/tax/subscriptions
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
Hi @daring pilot I'm taking over this thread
https://docs.stripe.com/tax/calculating tax calculation is complicated, you can find out more here
It seems like it uses the info attached to the customer object, is that correct?
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)```
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
- create payment method on the client and pass the payment method id to my server
- 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?
Before creating a subscription, you should call the update Customer API to set the address https://docs.stripe.com/api/customers/update#update_customer-address
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, thanks!
what happens if the customer does not have an address associated with them?
Then Stripe Tax won't be able to calculate the tax correctly.