export type TaxRegistrationSpec = { /** Two-letter country code, e.g. "IT". */ country: string; /** * Registration type. Defaults to "standard" (domestic). * * For an EU seller shipping digital services across the union, "oss_union" is * the usual companion to a domestic registration — it makes Stripe charge each * buyer's national rate under the One Stop Shop. */ type?: "standard" | "oss_union" | "oss_non_union" | "ioss"; /** Unix seconds, or "now" (default). */ activeFrom?: number | "now"; /** * Raw `country_options[]` when a jurisdiction needs a shape this * helper doesn't model. Wins over `type`. */ countryOptions?: Record; }; export type TaxSetupResult = { settingsStatus: string; /** Countries registered by this run. */ created: string[]; /** Countries that were already active. */ existing: string[]; /** Active registrations NOT in the spec — reported, never removed. */ unmanaged: string[]; }; /** * Idempotently configure Stripe Tax for the environment the secret key points at. * * Safe to run on every deploy: an active registration for a country in the spec * is left alone, and the settings write is a no-op when it already matches. */ export declare function ensureTaxSetup(opts: { /** Where you operate from. Required before Stripe Tax will calculate anything. */ headOffice: { country: string; state?: string; city?: string; line1?: string; line2?: string; postalCode?: string; }; /** The jurisdictions you are registered to collect in. Yours to decide. */ registrations: TaxRegistrationSpec[]; defaults?: { /** Preset tax code, e.g. txcd_10000000 (electronically supplied services). */ taxCode?: string; /** * Whether listed prices exclude tax. Default "exclusive", matching * ensurePlans — and worth setting, because the account default * `inferred_by_currency` reads EUR as INCLUSIVE. */ taxBehavior?: "exclusive" | "inclusive"; }; }): Promise; export interface AccountTaxIdResult { id: string; created: boolean; /** True when it is now the account's invoice default. */ isDefault: boolean; } /** * Put the seller's own tax id on the account, and make it the invoice default. * * Idempotent by VALUE: an existing id with the same number is reused, because creating a * second one would leave Stripe choosing which to print. Safe to call from a deploy step; * it THROWS, unlike the lazy provisioning on a charge path — a missing supplier VAT * number is a defective invoice, not a degraded one, so it should stop a deploy. * * ```ts * // A French micro-entreprise: not VAT-registered, but it holds an intracommunity * // number, which is mandatory on EU B2B invoices from the first euro. * await ensureAccountTaxId({ type: "eu_vat", value: process.env.LEGAL_VAT_INTRA! }); * ``` */ export declare function ensureAccountTaxId(opts: { /** Stripe's tax id type — "eu_vat", "gb_vat", "ch_vat", … */ type: string; /** The number itself, as it must appear on the invoice. */ value: string; /** Also set it as the account's `default_account_tax_ids`. Default true — an id that * exists but is not the default prints on nothing. */ makeDefault?: boolean; }): Promise; /** The account's own tax ids, for the doctor. Never throws — a restricted key that * cannot read them is a different finding from having none. */ export declare function accountTaxIds(): Promise>; //# sourceMappingURL=tax-setup.d.ts.map