metadata
The metadata prop is an open-ended bag forwarded to the iframe. It has one reserved key with special handling, plus an index signature that lets you pass any other partner-defined keys.
interface TaxKitMetadata {
promoCode?: string;
[key: string]: unknown;
}
Reserved keys
promoCode
metadata.promoCodestringPromo code applied to the user's CoinTracker subscription. Replaces the legacy top-level userPromoCode prop.
- Must be a string. Non-string values are ignored by the iframe.
- Pass
null(rather than omitting) to explicitly clear a value — this prevents fall-through to the legacyuserPromoCodeprop if both are present.
<TaxKitProvider
fetchAccessToken={fetchAccessToken}
metadata={{ promoCode: 'PARTNER_2026' }}
>
<YourApp />
</TaxKitProvider>
Arbitrary partner keys
Anything that isn't a reserved key passes through opaquely to the iframe and is available to internal CoinTracker logic that knows to look for it. Coordinate with your CoinTracker integration contact before relying on a partner-specific key — there's no public schema for these.
<TaxKitProvider
fetchAccessToken={fetchAccessToken}
metadata={{
promoCode: 'PARTNER_2026',
sourcePage: 'tax-center',
customerSegment: 'pro',
referralId: '8c91d',
}}
>
<YourApp />
</TaxKitProvider>
Cost-basis information
If you need to pass cost-basis method information to the iframe, use the costBasisMethodInfo key (consumed by the iframe's CostBasisMethodMismatchWarningOverlay). Coordinate with your CoinTracker contact on the exact shape — this is a partner-specific surface, not a public schema.
The previously documented costBasisMethodsByYear reserved key was removed in 2.2.0. The dedicated pipe had been built speculatively but no UI component ever consumed it. Use metadata.costBasisMethodInfo instead.
Connection warnings
You can attach per-integration warning messages via metadata.connectionWarnings. These render alongside the matching connected integration in the kit. Keys are lowercase connection names (e.g. 'coinbase', 'coinbase pro', 'ethereum').
<TaxKitProvider
fetchAccessToken={fetchAccessToken}
metadata={{
connectionWarnings: {
coinbase: {
message: 'If you have Coinbase DEX transactions, download your history and upload it manually.',
learnMoreUrl: 'https://support.cointracker.io/...',
},
'coinbase pro': {
message: 'Coinbase Pro users may need to manually upload their transaction history.',
},
},
}}
>
<YourApp />
</TaxKitProvider>
Each warning is a ConnectionWarning:
interface ConnectionWarning {
message: string;
learnMoreUrl?: string;
}
URL-parameter metadata
The SDK also picks up metadata from a query parameter on your page URL. Add a cointracker-tax-kit-param query parameter to the parent URL, and the SDK will include it in the metadata bag automatically under the key cointracker_tax_kit_param:
https://your-partner-site.com/tax-center?cointracker-tax-kit-param=my-value
Use this for deep-linking shorthand when you can't easily set props on the parent component.
Receiving metadata from the iframe
The iframe can send metadata back to your parent app via the onReceivedAdditionalMetadata callback. See the callbacks reference for details.