PolarProviderOptions
Defined in: src/billing/polar.ts:73
Options for createPolarProvider.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
accessToken? |
string |
Organization access token. Required for REST calls (reconcile, checkout, portal, usage). | - | src/billing/polar.ts:75 |
apiBase? |
string |
Override the API base URL (sandbox / mock servers). | ProviderHttpOptions.apiBase |
src/billing/verify.ts:143 |
fetch? |
FetchLike |
fetch implementation (tests, proxies). Default: global fetch. |
ProviderHttpOptions.fetch |
src/billing/verify.ts:141 |
metadataKey? |
string |
Metadata key carrying our customer id (checkout metadata). Default "customerId". |
- | src/billing/polar.ts:83 |
meterProperty? |
string |
Metadata property the Polar meter aggregates (usage export). Default "value". |
- | src/billing/polar.ts:85 |
now? |
() => number |
Clock (unix ms) for the tolerance check. Default Date.now. |
- | src/billing/polar.ts:87 |
server? |
"production" | "sandbox" |
"production" (default) or "sandbox". Ignored when apiBase is set. |
- | src/billing/polar.ts:79 |
tolerance? |
number |
Signature timestamp tolerance in seconds. Default 300. |
- | src/billing/polar.ts:81 |
webhookSecret? |
string | readonly string[] |
Webhook secret(s) (whsec_… / polar_whs_…). Required for webhooks. |
- | src/billing/polar.ts:77 |