TaxRegistration
Source:
src/Stripe/TaxRegistration.ts
A Stripe Tax Registration — records that your business is registered to collect tax in a region so Stripe Tax can calculate and collect it. Stripe does not register with tax authorities on your behalf.
country and countryOptions are immutable and changing them replaces
the registration. activeFrom and expiresAt update in place.
A registration cannot be hard-deleted. Destroying this resource expires
it (expiresAt: "now"). Expiration is permanent; to collect tax in
that location again, create a new registration.
Tax registrations have no metadata field. Identity is the Stripe id
(and, when the id is missing, a matching non-expired country + options
pair). list() returns every non-expired registration on the account.
A head office address must be configured on Tax Settings before a registration can be created.
Creating a Tax Registration
Section titled “Creating a Tax Registration”US state sales tax
const california = yield* Stripe.TaxRegistration("ca-sales-tax", { country: "US", countryOptions: { us: { type: "state_sales_tax", state: "CA" }, },});Simplified registration
const tajikistan = yield* Stripe.TaxRegistration("tj", { country: "TJ", countryOptions: { tj: { type: "simplified" } },});EU OSS Union
const irelandOss = yield* Stripe.TaxRegistration("ie-oss", { country: "IE", countryOptions: { ie: { type: "oss_union" } }, activeFrom: "now",});Updating a Tax Registration
Section titled “Updating a Tax Registration”const california = yield* Stripe.TaxRegistration("ca-sales-tax", { country: "US", countryOptions: { us: { type: "state_sales_tax", state: "CA" }, }, expiresAt: 1893456000,});Expiring a Tax Registration
Section titled “Expiring a Tax Registration”// stack.destroy() / resource removal sets expiresAt to "now"const california = yield* Stripe.TaxRegistration("ca-sales-tax", { country: "US", countryOptions: { us: { type: "state_sales_tax", state: "CA" }, },});