Skip to main content
@ai-billing/polar
@ai-billing/polar / createPolarDestination

Function: createPolarDestination()

createPolarDestination<TTags>(options): Destination<TTags>
Defined in: polar-destination.ts:72 Creates a Destination that ingests billing events into Polar. Identity: When internalId is present, sends EventCreateCustomer with customerId. When only externalId is present, sends EventCreateExternalCustomer with externalCustomerId. When both are missing, logs a warning and skips the event.

Type Parameters

TTags

TTags extends JSONObject = JSONObject The shape of the tags object, extending DefaultTags.

Parameters

options

PolarDestinationOptions<TTags> Destination configuration; see PolarDestinationOptions.

Returns

Destination<TTags> A destination function that sends events to Polar.