Skip to main content

Tax Rates API

Tax Rates define a tax percentage that can be applied to subscription items, invoice items, and one-time payments.

Create a Tax Rate​

POST /v1/tax_rates

curl https://api.meridian.dev/v1/tax_rates \
-u sk_test_4eC39HqL...: \
-d display_name="Sales Tax" \
-d jurisdiction="CA" \
-d percentage=8.25 \
-d inclusive=false
ParameterTypeDescription
display_name requiredstringLabel shown on invoices (e.g., "VAT", "Sales Tax").
percentage requireddecimalTax rate as a percentage (e.g., 8.25 for 8.25%).
inclusivebooleanIf true, tax is included in the price. If false, tax is added on top.
jurisdictionstringJurisdiction (state, country, etc.) for reference.

Apply to a Subscription​

await meridian.subscriptions.create({
customer: 'cus_Nk3mHXq7ViGwMz',
items: [{
price: 'price_ProMonthly',
tax_rates: ['txr_TaxRateId'],
}],
});

Apply to an Invoice Item​

await meridian.invoiceItems.create({
customer: 'cus_Nk3mHXq7ViGwMz',
amount: 5000,
currency: 'usd',
description: 'Consulting fee',
tax_rates: ['txr_TaxRateId'],
});

Retrieve and List​

curl https://api.meridian.dev/v1/tax_rates/txr_TaxRateId \
-u sk_test_4eC39HqL...:

curl https://api.meridian.dev/v1/tax_rates \
-u sk_test_4eC39HqL...: