NodeRailsCRYPTO PAYMENT INFRASTRUCTURE
DocumentationAPI Reference
Dashboard

Tax Rates

Create and manage tax rates to apply to invoices and checkout sessions.

Create a tax rate

Createtypescript
const taxRate = await noderails.taxRates.create({
        displayName: 'VAT',
  percentage: 20,
  description: 'Value Added Tax',
  inclusive: false,
});

console.log(taxRate.id);         // Tax rate ID
console.log(taxRate.percentage); // 20

Retrieve a tax rate

Retrievetypescript
const taxRate = await noderails.taxRates.retrieve('tax-rate-id');
    console.log(taxRate.displayName, taxRate.percentage);

Update a tax rate

Updatetypescript
await noderails.taxRates.update('tax-rate-id', {
  description: 'Updated VAT rate',
});

List tax rates

Listtypescript
const taxRates = await noderails.taxRates.list();

for (const rate of taxRates) {
          console.log(rate.displayName, rate.percentage + '%');
}

Delete a tax rate

Deletetypescript
await noderails.taxRates.delete('tax-rate-id');

Methods reference

MethodDescription
create(params)Create a new tax rate
retrieve(id)Retrieve a tax rate by ID
list(params?)List all tax rates
update(id, params)Update a tax rate
delete(id)Delete a tax rate

TypeScript types

Type importstypescript
import type {
  TaxRate,
  TaxRateCreateParams,
  TaxRateUpdateParams,
  TaxRateListParams,
} from '@noderails/sdk';

Response body reference

All responses are wrapped in { success: true, data: ... }. The fields below describe what's inside data.

All endpoints return the same shape

create(), retrieve(), update(), and each item in list()all return the full TaxRate object:

TaxRate

idstringUnique tax rate ID (UUID)
merchantIdstringYour merchant ID
displayNamestringDisplay name, e.g. "VAT" or "GST"
percentagestringTax percentage (Decimal as string, e.g. "20.00")
inclusivebooleanWhether tax is included in the price (true) or added on top (false)
jurisdictionstring | nullTax jurisdiction, e.g. "US-CA"
descriptionstring | nullAdditional description
isActivebooleanWhether the tax rate is active
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp

list() response

Returns a flat array (not paginated): { success: true, data: TaxRate[] }

delete() response

Returns 204 No Content (no response body).