Advanced Features
Multi-currency regions, localization, Automatic Persisted Queries, ID Rabbit verification, and order transfers
Advanced Features
1. Multi-Region & Multi-Currency Pricing
xclade supports 135+ currencies and multi-region tax rules natively. Query available regions once at startup (cached for 30 minutes in Redis):
query StoreRegions {
regions {
regions {
id
name
currency_code
countries {
iso_2
display_name
}
}
}
}Pass the selected region_id when creating carts (createCart(input: { region_id })) and querying catalog prices (pricing_context: { region_id }). For authenticated B2B company buyers, customer-group override price lists automatically layer on top of base region pricing.
2. Localized Storefronts (X-Xclade-Locale)
Fetch active store locales (cached for 60 minutes):
query ActiveLocales {
locales {
code
name
}
}Send X-Xclade-Locale: fr-FR (or call xclade.setLocale('fr-FR') in @xclade/sdk). Redis response cache keys automatically partition by locale so localized responses never collide.
3. Automatic Persisted Queries (APQ)
/graphql enables gqlgen's APQ extension (512-entry LRU hash cache) alongside GET transport:
- Client sends a
GET /graphqlrequest withextensions={"persistedQuery":{"version":1,"sha256Hash":"..."}}andX-Xclade-Request: true. - If the hash is warm on the pod, the query executes immediately without transmitting the query string.
- On a cache miss (
PersistedQueryNotFound), the client retries once with bothqueryandsha256Hashto register it.
4. ID Rabbit Age (21+) & Identity Verification
Stores selling age-restricted or high-fraud goods can enforce pre-checkout verification via ID Rabbit:
- Query
cartIdrabbitStatus(cart_id)before allowing checkout submission. - When
required === trueandcheckout_decision !== "allow", invokecreateCartIdrabbitSession(cart_id, redirect_url)and redirect the shopper toidrabbit.verification_url. - When ID Rabbit posts the signed webhook to
POST /webhooks/idrabbit, the cart's verification state updates automatically andcompleteCart(cart_id)succeeds. - Attempting
completeCartbefore verification completes safely returnsIDRABBIT_VERIFICATION_REQUIRED.
5. Order Ownership Transfers
Support B2B team handoffs or gift/account merges with built-in order transfer mutations:
requestOrderTransfer(order_id, description)— Generates a secure transfer token.acceptOrderTransfer(order_id, token)ordeclineOrderTransfer(order_id, token)— Recipient accepts or declines.cancelOrderTransfer(order_id)— Original requester or Store Admin cancels before acceptance.