@ai-billing/polar / createPolarDestination
Function: createPolarDestination()
createPolarDestination<Defined in: polar-destination.ts:72 Creates a Destination that ingests billing events into Polar. Identity: WhenTTags>(options):Destination<TTags>
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.