Skip to main content

AddressBasedTaxZoneStrategy

AddressBasedTaxZoneStrategy

Address based TaxZoneStrategy which tries to find the applicable Zone based on the country of the billing address, or else the country of the shipping address of the Order.

Returns the default Channel's default tax zone if no applicable zone is found.

info

This is configured via taxOptions.taxZoneStrategy = new AddressBasedTaxZoneStrategy() in your VendureConfig.

Example

import { VendureConfig, AddressBasedTaxZoneStrategy } from '@vendure/core';

export const config: VendureConfig = {
// other options...
taxOptions: {
taxZoneStrategy: new AddressBasedTaxZoneStrategy(),
},
};
Signature
class AddressBasedTaxZoneStrategy implements TaxZoneStrategy {
determineTaxZone(ctx: RequestContext, zones: Zone[], channel: Channel, order?: Order) => Zone;
}

determineTaxZone

method
(ctx: RequestContext, zones: Zone[], channel: Channel, order?: Order) => Zone