#gunwant_dev-orders-tax
1 messages · Page 1 of 1 (latest)
Hey, can you clarify what you mean by:
How can I apply one TAX on all product line items total?
I don't think that's possible, you need to apply a rate per line item and a total is computed
In the orders API, we can add multiple line_items like
const order = await stripe.orders.create({
currency: 'usd',
line_items: [
{product: 'prod_Lo4g3M5YKF8AoB', quantity: 10}, // 5 * 10 = 50
{product: 'prod_Lo4g3M5YKF8XYZ', quantity: 5}, // 7 * 5 = 35
], // 50 + 35 = 85
payment: {
settings: {payment_method_types: ['card']},
},
expand: ['line_items'],
});
How can apply TAX on product total, not in a single product?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You can't, as I explained. You'd add tax_rates on a per line item basis
Do you mean it's not possible ?
Correct
Okay
How can I used it?
ref: https://stripe.com/docs/api/orders_v2/create#create_order_v2-tax_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What do you mean?
Those are tax IDs relating to your customer (for invoicing/receipts), not tax rates for the products
Np!