@solvapay/server 2.4.1 → 2.5.0-preview-4e9e88853847575b5dbe7c2d36163333a2364b7a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/edge.d.ts CHANGED
@@ -817,6 +817,12 @@ interface components {
817
817
  /** @description Whether the grant was recorded */
818
818
  success: boolean;
819
819
  };
820
+ LimitAutoRechargeDto: {
821
+ /** @description Whether auto-recharge is enabled for this provider */
822
+ enabled: boolean;
823
+ /** @description Stored auto-recharge status when a config exists */
824
+ status?: string;
825
+ };
820
826
  LimitBalanceDto: {
821
827
  /** @description Credit balance in credits (100 credits = 1 minor currency unit) */
822
828
  creditBalance: number;
@@ -829,6 +835,8 @@ interface components {
829
835
  LimitPlanItemDto: {
830
836
  /** @description Derived billing cycle */
831
837
  billingCycle?: string;
838
+ /** @description Deep link that opens hosted checkout with this plan preselected. Present only when a checkout session was minted for this response. */
839
+ checkoutUrl?: string;
832
840
  /**
833
841
  * @deprecated
834
842
  * @description Deprecated alias of perUnitChargeMinor. Same minor-units value — not credits. Prefer perUnitChargeMinor.
@@ -858,6 +866,8 @@ interface components {
858
866
  LimitResponse: {
859
867
  /** @description True when the customer must activate a priced default plan before usage is allowed */
860
868
  activationRequired?: boolean;
869
+ /** @description Per-provider auto-recharge snapshot read off the customer document. Omitted when no config exists. */
870
+ autoRecharge?: components['schemas']['LimitAutoRechargeDto'];
861
871
  /** @description Prepaid usage balance context when the default plan is usage-based */
862
872
  balance?: components['schemas']['LimitBalanceDto'];
863
873
  /**
@@ -878,9 +888,7 @@ interface components {
878
888
  creditsPerUnit?: number;
879
889
  /** @description ISO 4217 currency code for credit fields */
880
890
  currency?: string;
881
- /**
882
- * The effective finite cap for this meter. Present only when the backend measured a finite cap.
883
- */
891
+ /** @description The effective finite cap for this meter. Present only when the backend measured a finite cap. */
884
892
  limit?: number;
885
893
  /**
886
894
  * The meter name to use when tracking usage events
@@ -893,10 +901,21 @@ interface components {
893
901
  needsUpgrade?: boolean;
894
902
  /** @description Access is granted and usage beyond the included cap accrues an overage charge — `onExceed: charge`. */
895
903
  overage?: boolean;
904
+ /**
905
+ * Authoritative paywall classification shared with Managed MCP. Present on denial responses only.
906
+ * @enum {string}
907
+ */
908
+ paywallReason?: 'activation_required' | 'topup_required' | 'payment_required';
909
+ /** @description Display name of the active or default plan */
910
+ planName?: string;
911
+ /** @description Active plan reference when the customer already holds a purchase */
912
+ planRef?: string;
896
913
  /** @description Active plans on the product available for activation or checkout */
897
914
  plans?: components['schemas']['LimitPlanItemDto'][];
898
915
  /** @description Product the limit check applies to */
899
916
  product?: components['schemas']['LimitProductBriefDto'];
917
+ /** @description Active purchase reference when the customer already holds a purchase */
918
+ purchaseRef?: string;
900
919
  /**
901
920
  * Remaining usage units before hitting the limit. `-1` means unlimited (no finite cap).
902
921
  * @example 997
@@ -906,9 +925,7 @@ interface components {
906
925
  throttled?: boolean;
907
926
  /** @description The customer was auto-upgraded to the target pricing to restore access — `onExceed: auto_upgrade` succeeded. */
908
927
  upgraded?: boolean;
909
- /**
910
- * Consumed usage units this period. Present only when the backend measured a finite cap.
911
- */
928
+ /** @description Consumed usage units this period. Present only when the backend measured a finite cap. */
912
929
  used?: number;
913
930
  /**
914
931
  * Whether the customer is within their usage limits
@@ -3899,7 +3916,7 @@ type AttachBusinessDetailsParams = {
3899
3916
  type AttachBusinessDetailsResult = components['schemas']['AttachBusinessDetailsResponse'];
3900
3917
  type CheckLimitsRequest = components['schemas']['CheckLimitRequest'];
3901
3918
  /**
3902
- * Extended LimitResponse with SDK-added plan field.
3919
+ * `LimitResponse` plus a deprecated SDK-only `plan` alias.
3903
3920
  *
3904
3921
  * The backend `LimitResponse` now natively carries the `onExceed` outcome flags
3905
3922
  * (`throttled` / `overage` / `needsTopUp` / `needsUpgrade` / `upgraded`, resolved
@@ -3907,9 +3924,13 @@ type CheckLimitsRequest = components['schemas']['CheckLimitRequest'];
3907
3924
  * `overage` ride the allow path (`withinLimits: true`) so a protected handler
3908
3925
  * can read them from `decision.limits` and degrade service or note overage; the
3909
3926
  * others accompany a gate outcome.
3927
+ *
3928
+ * Read `planRef` for the active plan. `plan` is never populated by the
3929
+ * backend — it remains optional so older fixtures and callers still type-check.
3910
3930
  */
3911
3931
  type LimitResponseWithPlan = components['schemas']['LimitResponse'] & {
3912
- plan: string;
3932
+ /** @deprecated Never populated by the backend. Read `planRef` instead. */
3933
+ plan?: string;
3913
3934
  };
3914
3935
  /**
3915
3936
  * Extended CustomerResponse with proper field mapping
@@ -4182,6 +4203,16 @@ interface SolvaPayClient {
4182
4203
  type LimitPlanSummary = components['schemas']['LimitPlanItemDto'];
4183
4204
  type LimitActivationBalance = components['schemas']['LimitBalanceDto'];
4184
4205
  type LimitActivationProduct = components['schemas']['LimitProductBriefDto'];
4206
+ type LimitAutoRechargeDto = components['schemas']['LimitAutoRechargeDto'];
4207
+ /**
4208
+ * All paywall reasons the SDK recognises: every backend `paywallReason`
4209
+ * plus the three SDK-only classifier kinds. Derived from a shared tuple
4210
+ * so the Zod mirror in `paywall-schema.ts` cannot drift.
4211
+ */
4212
+ declare const PAYWALL_REASONS: readonly ["activation_required", "topup_required", "payment_required", "upgrade_required", "limit_reached", "reactivation_required"];
4213
+ type PaywallReason = (typeof PAYWALL_REASONS)[number];
4214
+ declare const PAYWALL_NEXT_ACTIONS: readonly ["topup", "checkout", "activate", "account"];
4215
+ type PaywallNextAction = (typeof PAYWALL_NEXT_ACTIONS)[number];
4185
4216
  /**
4186
4217
  * Arguments passed to protected handlers
4187
4218
  */
@@ -4218,8 +4249,10 @@ interface PaywallMetadata {
4218
4249
  * when the backend did not send it — never defaulted.
4219
4250
  */
4220
4251
  type PaywallGateRecoveryFields = {
4221
- /** Active plan reference from `limits.plan`. */
4252
+ /** Active plan reference from `limits.planRef` (falls back to deprecated `plan`). */
4222
4253
  planRef?: string;
4254
+ /** Display name of the active or default plan. */
4255
+ planName?: string;
4223
4256
  /** Product plans from `checkLimits` (activation already had this). */
4224
4257
  plans?: LimitPlanSummary[];
4225
4258
  /** Meter the gated call was charged against. */
@@ -4239,6 +4272,37 @@ type PaywallGateRecoveryFields = {
4239
4272
  };
4240
4273
  /** Prepaid credit balance, coalesced from nested or top-level fields. */
4241
4274
  creditBalance?: number;
4275
+ /**
4276
+ * `PaywallState.kind` — same vocabulary as the classifier, not a third enum.
4277
+ * `upgrade_required` / `limit_reached` / `reactivation_required` are
4278
+ * SDK-only; the backend's `paywallReason` is a smaller set
4279
+ * (`activation_required` / `topup_required` / `payment_required`).
4280
+ */
4281
+ reason?: PaywallReason;
4282
+ /** Single primary recovery the agent should take. */
4283
+ nextAction?: PaywallNextAction;
4284
+ /**
4285
+ * Credits deducted per call. Named `creditsPerCall` on purpose:
4286
+ * `balance.creditsPerUnit` is credits, but `plans[].creditsPerUnit`
4287
+ * is a deprecated alias for `perUnitChargeMinor` (minor currency units).
4288
+ */
4289
+ creditsPerCall?: number;
4290
+ /** `max(0, creditsPerCall - creditBalance)` when both are known. */
4291
+ shortfallCredits?: number;
4292
+ /** How many calls the current allowance or wallet still covers. */
4293
+ remainingCalls?: number;
4294
+ /** Active purchase reference when the customer already holds a purchase. */
4295
+ purchaseRef?: string;
4296
+ /** Purchase/plan status when the backend sent one. */
4297
+ planStatus?: string;
4298
+ /** Per-provider auto-recharge snapshot. Omitted when unknown. */
4299
+ autoRecharge?: LimitAutoRechargeDto;
4300
+ /** Global destinations. Per-plan URLs stay on `plans[].checkoutUrl`. */
4301
+ links?: {
4302
+ topup?: string;
4303
+ checkout?: string;
4304
+ manage?: string;
4305
+ };
4242
4306
  };
4243
4307
  type PaywallStructuredContent = ({
4244
4308
  kind: 'payment_required';
@@ -5181,6 +5245,7 @@ interface SolvaPay {
5181
5245
  customerRef: string;
5182
5246
  planRef?: string;
5183
5247
  returnUrl?: string;
5248
+ purpose?: 'credit_topup';
5184
5249
  }): Promise<{
5185
5250
  sessionId: string;
5186
5251
  checkoutUrl: string;
@@ -5431,6 +5496,7 @@ declare function paywallErrorToClientPayload(error: PaywallError): Record<string
5431
5496
 
5432
5497
  declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
5433
5498
  planRef: z.ZodOptional<z.ZodString>;
5499
+ planName: z.ZodOptional<z.ZodString>;
5434
5500
  plans: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
5435
5501
  meterName: z.ZodOptional<z.ZodString>;
5436
5502
  unitPriceMinor: z.ZodOptional<z.ZodNumber>;
@@ -5443,12 +5509,41 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
5443
5509
  creditBalance: z.ZodOptional<z.ZodNumber>;
5444
5510
  balance: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5445
5511
  productDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5512
+ reason: z.ZodOptional<z.ZodEnum<{
5513
+ topup_required: "topup_required";
5514
+ payment_required: "payment_required";
5515
+ activation_required: "activation_required";
5516
+ upgrade_required: "upgrade_required";
5517
+ limit_reached: "limit_reached";
5518
+ reactivation_required: "reactivation_required";
5519
+ }>>;
5520
+ nextAction: z.ZodOptional<z.ZodEnum<{
5521
+ topup: "topup";
5522
+ checkout: "checkout";
5523
+ activate: "activate";
5524
+ account: "account";
5525
+ }>>;
5526
+ creditsPerCall: z.ZodOptional<z.ZodNumber>;
5527
+ shortfallCredits: z.ZodOptional<z.ZodNumber>;
5528
+ remainingCalls: z.ZodOptional<z.ZodNumber>;
5529
+ purchaseRef: z.ZodOptional<z.ZodString>;
5530
+ planStatus: z.ZodOptional<z.ZodString>;
5531
+ autoRecharge: z.ZodOptional<z.ZodObject<{
5532
+ enabled: z.ZodBoolean;
5533
+ status: z.ZodOptional<z.ZodString>;
5534
+ }, z.core.$strip>>;
5535
+ links: z.ZodOptional<z.ZodObject<{
5536
+ topup: z.ZodOptional<z.ZodString>;
5537
+ checkout: z.ZodOptional<z.ZodString>;
5538
+ manage: z.ZodOptional<z.ZodString>;
5539
+ }, z.core.$strip>>;
5446
5540
  kind: z.ZodLiteral<"payment_required">;
5447
5541
  product: z.ZodString;
5448
5542
  checkoutUrl: z.ZodString;
5449
5543
  message: z.ZodString;
5450
5544
  }, z.core.$strip>, z.ZodObject<{
5451
5545
  planRef: z.ZodOptional<z.ZodString>;
5546
+ planName: z.ZodOptional<z.ZodString>;
5452
5547
  plans: z.ZodOptional<z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
5453
5548
  meterName: z.ZodOptional<z.ZodString>;
5454
5549
  unitPriceMinor: z.ZodOptional<z.ZodNumber>;
@@ -5461,6 +5556,34 @@ declare const PaywallStructuredContentSchema: z.ZodDiscriminatedUnion<[z.ZodObje
5461
5556
  creditBalance: z.ZodOptional<z.ZodNumber>;
5462
5557
  balance: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5463
5558
  productDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5559
+ reason: z.ZodOptional<z.ZodEnum<{
5560
+ topup_required: "topup_required";
5561
+ payment_required: "payment_required";
5562
+ activation_required: "activation_required";
5563
+ upgrade_required: "upgrade_required";
5564
+ limit_reached: "limit_reached";
5565
+ reactivation_required: "reactivation_required";
5566
+ }>>;
5567
+ nextAction: z.ZodOptional<z.ZodEnum<{
5568
+ topup: "topup";
5569
+ checkout: "checkout";
5570
+ activate: "activate";
5571
+ account: "account";
5572
+ }>>;
5573
+ creditsPerCall: z.ZodOptional<z.ZodNumber>;
5574
+ shortfallCredits: z.ZodOptional<z.ZodNumber>;
5575
+ remainingCalls: z.ZodOptional<z.ZodNumber>;
5576
+ purchaseRef: z.ZodOptional<z.ZodString>;
5577
+ planStatus: z.ZodOptional<z.ZodString>;
5578
+ autoRecharge: z.ZodOptional<z.ZodObject<{
5579
+ enabled: z.ZodBoolean;
5580
+ status: z.ZodOptional<z.ZodString>;
5581
+ }, z.core.$strip>>;
5582
+ links: z.ZodOptional<z.ZodObject<{
5583
+ topup: z.ZodOptional<z.ZodString>;
5584
+ checkout: z.ZodOptional<z.ZodString>;
5585
+ manage: z.ZodOptional<z.ZodString>;
5586
+ }, z.core.$strip>>;
5464
5587
  kind: z.ZodLiteral<"activation_required">;
5465
5588
  product: z.ZodString;
5466
5589
  checkoutUrl: z.ZodString;
@@ -5498,38 +5621,41 @@ type PaywallState = {
5498
5621
  } | {
5499
5622
  kind: 'reactivation_required';
5500
5623
  };
5624
+ type CreditSignals = {
5625
+ creditBalance?: number;
5626
+ creditsPerCall?: number;
5627
+ shortfallCredits?: number;
5628
+ remainingCalls?: number;
5629
+ isCreditBased: boolean;
5630
+ };
5631
+ /**
5632
+ * Coalesce the two credit-balance channels and derive shortfall /
5633
+ * remaining-call counts. Nested `balance` wins when present.
5634
+ */
5635
+ declare function creditSignals(limits: LimitResponseWithPlan | null): CreditSignals;
5636
+ declare function nextActionFor(state: PaywallState): PaywallNextAction;
5501
5637
  /**
5502
5638
  * Classify a `LimitResponseWithPlan` (or `null` on degraded paths) into
5503
5639
  * a `PaywallState`. Pure — safe to call multiple times per request.
5504
5640
  *
5505
5641
  * Precedence:
5506
- * 1. `activationRequired === true` — trumps everything else; the
5507
- * backend explicitly flagged that no plan is live yet.
5508
- * 2. Authoritative `needsTopUp` / `needsUpgrade` flags from
5509
- * `decideLimit`, when the backend sent them. Prefer these over
5510
- * the credit-balance heuristic so a top-up deny and an
5511
- * auto-upgrade deny are not re-derived from plan type.
5512
- * 3. Usage-based plan out of credits — the customer has a plan but
5513
- * ran out, so a topup is the right action. "Out of credits" is
5514
- * determined from (in order): the nested
5515
- * `balance.creditBalance === 0` block, the top-level
5516
- * `creditBalance === 0` field, or `remaining === 0` as a
5517
- * fallback for older backend responses that omit both credit
5518
- * fields on usage-based plans.
5519
- * 4. Active plan at included cap (`plan` is a non-empty ref and
5520
- * `remaining <= 0`) → `limit_reached`. This is the "on Free, used
5521
- * 3 of 3" case — not "no plan".
5522
- * 5. Everything else → `upgrade_required`, including:
5523
- * - `limits === null` (defensive),
5524
- * - no active plan on the product.
5642
+ * 1. `activationRequired` / `paywallReason === 'activation_required'`.
5643
+ * 2. `paywallReason === 'topup_required'` — backend stays authoritative
5644
+ * for credit-based denials (same rule as Managed MCP).
5645
+ * 3. Authoritative `needsTopUp` / `needsUpgrade` flags from `decideLimit`.
5646
+ * 4. Credit-field presence + a real shortfall (`balance < cost`).
5647
+ * 5. Active purchase / plan at included cap → `limit_reached`.
5648
+ * 6. Floor: never `upgrade_required` when credit fields or a purchase
5649
+ * are present. Everything else → `upgrade_required`.
5525
5650
  *
5526
5651
  * `reactivation_required` is deferred — it needs a distinct backend
5527
- * signal (future `LimitResponse.inactivePurchaseRef`) which isn't
5528
- * emitted yet. Kept in the type so downstream code compiles against
5529
- * the full discriminated union; `classifyPaywallState` will never
5530
- * return it under current backend behaviour.
5652
+ * signal which isn't emitted yet. Kept in the type so downstream code
5653
+ * compiles against the full discriminated union.
5531
5654
  */
5532
5655
  declare function classifyPaywallState(limits: LimitResponseWithPlan | null): PaywallState;
5656
+ /** Escape markdown link-label delimiters — plan names are provider-authored. */
5657
+ declare function linkLabel(name: string): string;
5658
+ declare function planLadder(gate: PaywallStructuredContent): string | null;
5533
5659
  /**
5534
5660
  * Produce the terminal-friendly gate message. Names the `account`
5535
5661
  * viewer (with a `view` hint when the landing screen matters) or
@@ -5574,13 +5700,10 @@ declare function buildNudgeMessage(state: PaywallState, limits: LimitResponseWit
5574
5700
  */
5575
5701
 
5576
5702
  /**
5577
- * Subset of `LimitResponseWithPlan` the helper actually reads. Keeps the
5578
- * signature flexible — callers can pass the raw `apiClient.checkLimits`
5579
- * result without first asserting the `plan` field.
5703
+ * `LimitResponseWithPlan` as returned by `apiClient.checkLimits`.
5704
+ * `plan` is optional and deprecated — the backend never sends it.
5580
5705
  */
5581
- type LimitsLike = Omit<LimitResponseWithPlan, 'plan'> & {
5582
- plan?: LimitResponseWithPlan['plan'];
5583
- };
5706
+ type LimitsLike = LimitResponseWithPlan;
5584
5707
  declare function buildPaywallGate(productRef: string, limits: LimitsLike): PaywallStructuredContent;
5585
5708
 
5586
5709
  /**
@@ -6022,6 +6145,7 @@ declare function createCheckoutSessionCore(request: Request, body: {
6022
6145
  productRef: string;
6023
6146
  planRef?: string;
6024
6147
  returnUrl?: string;
6148
+ purpose?: 'credit_topup';
6025
6149
  }, options?: {
6026
6150
  solvaPay?: SolvaPay;
6027
6151
  includeEmail?: boolean;
@@ -6309,4 +6433,4 @@ declare function verifyWebhook({ body, signature, secret, }: {
6309
6433
  secret: string;
6310
6434
  }): Promise<WebhookEvent>;
6311
6435
 
6312
- export { type ActivatePlanResult, type AuthenticatedUser, type ConfigureMcpPlansRequest, type ConfigureMcpPlansResponse, type CreateSolvaPayConfig, type CustomerBalanceResult, type CustomerResponseMapped, type CustomerWebhookObject, type ErrorResult, type GetUsageResult, type HttpAdapterOptions, type LimitActivationBalance, type LimitActivationProduct, type LimitPlanSummary, type LimitResponseWithPlan, type McpBootstrapPlanInput, type McpBootstrapRequest, type McpBootstrapResponse, type McpToolPlanMappingInput, type NextAdapterOptions, type OneTimePurchaseInfo, type PayableAllowResult, type PayableFunction, type PayableGateOptions, type PayableGateResult, type PayableOptions, type PayablePaywallResult, type PaymentMethodInfo, type PaywallArgs, type PaywallDecision, PaywallError, type PaywallMetadata, type PaywallState, type PaywallStructuredContent, PaywallStructuredContentSchema, type ProcessPaymentResult, type ProductConfigurationStatus, type PurchaseCheckResult, type RetryOptions, type SdkMerchantResponse, type SdkProductResponse, type ServerClientOptions, type SolvaPay, type SolvaPayClient, type ToolPlanMappingInput, type TopupProcessResult, type VerifyProductConfigurationOptions, type WebhookEvent, type WebhookEventForType, type WebhookEventObjectMap, type WebhookEventType, type WebhookProduct, activatePlanCore, attachBusinessDetailsCore, buildGateMessage, buildNudgeMessage, buildPaywallGate, cancelPurchaseCore, checkLimitsCore, checkPurchaseCore, classifyPaywallState, type components, createCheckoutSessionCore, createCustomerSessionCore, createPaymentIntentCore, createSolvaPay, createSolvaPayClient, createTopupPaymentIntentCore, deriveUsageSnapshot, disableAutoRechargeCore, getAuthenticatedUserCore, getAutoRechargeCore, getCustomerBalanceCore, getHistoryCore, getMerchantCore, getPaymentMethodCore, getProductCore, getUsageCore, handleRouteError, isErrorResult, isPaywallStructuredContent, listPlansCore, paywallErrorToClientPayload, processPaymentIntentCore, processTopupPaymentIntentCore, reactivatePurchaseCore, saveAutoRechargeCore, syncCustomerCore, trackUsageCore, verifyProductConfiguration, verifyWebhook, withRetry };
6436
+ export { type ActivatePlanResult, type AuthenticatedUser, type ConfigureMcpPlansRequest, type ConfigureMcpPlansResponse, type CreateSolvaPayConfig, type CreditSignals, type CustomerBalanceResult, type CustomerResponseMapped, type CustomerWebhookObject, type ErrorResult, type GetUsageResult, type HttpAdapterOptions, type LimitActivationBalance, type LimitActivationProduct, type LimitPlanSummary, type LimitResponseWithPlan, type McpBootstrapPlanInput, type McpBootstrapRequest, type McpBootstrapResponse, type McpToolPlanMappingInput, type NextAdapterOptions, type OneTimePurchaseInfo, type PayableAllowResult, type PayableFunction, type PayableGateOptions, type PayableGateResult, type PayableOptions, type PayablePaywallResult, type PaymentMethodInfo, type PaywallArgs, type PaywallDecision, PaywallError, type PaywallMetadata, type PaywallState, type PaywallStructuredContent, PaywallStructuredContentSchema, type ProcessPaymentResult, type ProductConfigurationStatus, type PurchaseCheckResult, type RetryOptions, type SdkMerchantResponse, type SdkProductResponse, type ServerClientOptions, type SolvaPay, type SolvaPayClient, type ToolPlanMappingInput, type TopupProcessResult, type VerifyProductConfigurationOptions, type WebhookEvent, type WebhookEventForType, type WebhookEventObjectMap, type WebhookEventType, type WebhookProduct, activatePlanCore, attachBusinessDetailsCore, buildGateMessage, buildNudgeMessage, buildPaywallGate, cancelPurchaseCore, checkLimitsCore, checkPurchaseCore, classifyPaywallState, type components, createCheckoutSessionCore, createCustomerSessionCore, createPaymentIntentCore, createSolvaPay, createSolvaPayClient, createTopupPaymentIntentCore, creditSignals, deriveUsageSnapshot, disableAutoRechargeCore, getAuthenticatedUserCore, getAutoRechargeCore, getCustomerBalanceCore, getHistoryCore, getMerchantCore, getPaymentMethodCore, getProductCore, getUsageCore, handleRouteError, isErrorResult, isPaywallStructuredContent, linkLabel, listPlansCore, nextActionFor, paywallErrorToClientPayload, planLadder, processPaymentIntentCore, processTopupPaymentIntentCore, reactivatePurchaseCore, saveAutoRechargeCore, syncCustomerCore, trackUsageCore, verifyProductConfiguration, verifyWebhook, withRetry };