Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# Description: Example of using custom line item taxes in Stripe & NetSuite
Stripe.api_key = ENV['STRIPE_KEY']
customer = Stripe::Customer.create
Stripe::InvoiceItem.create(
customer: customer.id,
description: 'A great product',
amount: 10_00,
currency: 'usd',
metadata: {
"netsuite_tax_percent": "10.0"
"netsuite_tax_amount": "1"
}
)
Stripe::InvoiceItem.create(
customer: customer.id,
description: '$1.00 Tax',
amount: 1_00,
currency: 'usd',
metadata: {
"netsuite_tax": "true"
}
)
Invoice.create({ customer: customer.id })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment