AddressBasedTaxZoneStrategy
AddressBasedTaxZoneStrategy
Address based TaxZoneStrategy which tries to find the applicable Zone based on the country of the shipping address of the Order. This is useful for shops that do cross-border B2C orders and use the One-Stop-Shop (OSS) VAT scheme.
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;
}
- Implements:
TaxZoneStrategy