@solvapay/react 1.3.0 → 1.4.0-preview-ecd61384a4e849717e13d47ab2daa086cdcd91c5

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.
@@ -842,6 +842,14 @@ interface components {
842
842
  * @example 99
843
843
  */
844
844
  unitsRemaining: number;
845
+ autoRecharge?: components["schemas"]["AutoRechargeTriggeredResponse"];
846
+ };
847
+ AutoRechargeTriggeredResponse: {
848
+ /**
849
+ * Whether the server initiated an auto-recharge charge after this debit
850
+ * @example true
851
+ */
852
+ triggered: boolean;
845
853
  };
846
854
  CreditDebitSkippedResponse: {
847
855
  /** @enum {number} */
@@ -3036,6 +3044,68 @@ type ActivatePlanResult = components['schemas']['ActivatePlanResponseDto'];
3036
3044
  * `{ kind: 'card', ... } | { kind: 'none' }` discriminated union here.
3037
3045
  */
3038
3046
  type PaymentMethodInfo = operations['PaymentMethodSdkController_getPaymentMethod']['responses']['200']['content']['application/json'];
3047
+ type AutoRechargeStatus = 'active' | 'disabled' | 'failed' | 'pending_setup';
3048
+ type AutoRechargeConfig = {
3049
+ enabled: boolean;
3050
+ trigger: {
3051
+ type: 'balance';
3052
+ thresholdAmountMinor: number;
3053
+ };
3054
+ topup: {
3055
+ mode: 'fixed';
3056
+ amountMinor: number;
3057
+ currency: string;
3058
+ };
3059
+ fundingSourceType?: 'saved_card' | 'tokenized_card';
3060
+ paymentMethodId?: string;
3061
+ status: AutoRechargeStatus;
3062
+ failureCount: number;
3063
+ lastChargeAt?: string;
3064
+ updatedAt?: string;
3065
+ /** Backend-computed display values — render verbatim; do not derive from trigger fields. */
3066
+ display?: AutoRechargeDisplayBlock;
3067
+ };
3068
+ type AutoRechargeDisplayBlock = {
3069
+ thresholdAmountMajor: number;
3070
+ topupAmountMajor: number;
3071
+ currency: string;
3072
+ formatted: {
3073
+ threshold: string;
3074
+ topup: string;
3075
+ };
3076
+ exchangeRate: number;
3077
+ rateSource: 'parity' | 'db' | 'fallback';
3078
+ };
3079
+ type CreditDisplayBlock$1 = {
3080
+ amountMajor: number;
3081
+ currency: string;
3082
+ formatted: string;
3083
+ exchangeRate: number;
3084
+ rateSource: 'parity' | 'db' | 'fallback';
3085
+ };
3086
+ type AutoRechargeInput = {
3087
+ enabled: boolean;
3088
+ triggerType: 'balance';
3089
+ thresholdAmountMajor?: number;
3090
+ topupAmountMajor?: number;
3091
+ maxRecharges?: number;
3092
+ currency: string;
3093
+ };
3094
+ /** PUT /sdk/auto-recharge — input plus request-only flags. */
3095
+ type SaveAutoRechargeInput = AutoRechargeInput & {
3096
+ deferSetupIntent?: boolean;
3097
+ };
3098
+ type AutoRechargeResponse = {
3099
+ config: AutoRechargeConfig | null;
3100
+ display?: AutoRechargeDisplayBlock;
3101
+ };
3102
+ type SaveAutoRechargeResponse = {
3103
+ config: AutoRechargeConfig;
3104
+ display?: AutoRechargeDisplayBlock;
3105
+ setupClientSecret?: string;
3106
+ publishableKey?: string;
3107
+ stripeAccountId?: string;
3108
+ };
3039
3109
 
3040
3110
  /**
3041
3111
  * Customer Helper (Core)
@@ -3050,6 +3120,7 @@ type CustomerBalanceResult = {
3050
3120
  displayCurrency: string;
3051
3121
  creditsPerMinorUnit: number;
3052
3122
  displayExchangeRate: number;
3123
+ display?: CreditDisplayBlock$1;
3053
3124
  };
3054
3125
 
3055
3126
  interface PurchaseCheckResult {
@@ -3198,6 +3269,42 @@ interface SolvaPayCopy {
3198
3269
  creditEstimateExact: string;
3199
3270
  creditEstimateApprox: string;
3200
3271
  };
3272
+ autoRecharge: {
3273
+ heading: string;
3274
+ description: string;
3275
+ settingsHeading: string;
3276
+ setupTriggerLabel: string;
3277
+ modifyTriggerLabel: string;
3278
+ notConfiguredHint: string;
3279
+ enableLabel: string;
3280
+ enableQuestion: string;
3281
+ enableSentence: string;
3282
+ thresholdLabel: string;
3283
+ thresholdAriaLabel: string;
3284
+ fixedAmountLabel: string;
3285
+ fixedAmountAriaLabel: string;
3286
+ saveButton: string;
3287
+ cancelButton: string;
3288
+ disableButton: string;
3289
+ savedMessage: string;
3290
+ disabledMessage: string;
3291
+ setupRequiredMessage: string;
3292
+ setupHeading: string;
3293
+ setupDescription: string;
3294
+ setupSubmit: string;
3295
+ setupProcessing: string;
3296
+ setupAwaitingConfirmation: string;
3297
+ setupAuthFailed: string;
3298
+ invalidThreshold: string;
3299
+ thresholdTooLow: string;
3300
+ minTopupAmount: string;
3301
+ topupBelowThreshold: string;
3302
+ creditsPerRecharge: string;
3303
+ creditsPerRechargeApprox: string;
3304
+ currencyPerRecharge: string;
3305
+ currencyPerRechargeApprox: string;
3306
+ statusFailed: string;
3307
+ };
3201
3308
  activationFlow: {
3202
3309
  heading: string;
3203
3310
  activateButton: string;
@@ -3430,22 +3537,20 @@ type PartialSolvaPayCopy = {
3430
3537
  [K in keyof SolvaPayCopy]?: Partial<SolvaPayCopy[K]>;
3431
3538
  };
3432
3539
 
3433
- /**
3434
- * Unified data-access surface for `@solvapay/react`.
3435
- *
3436
- * By default, `SolvaPayProvider` builds an HTTP transport from `config.api` +
3437
- * `config.fetch`. Integrators who need to route those calls somewhere else
3438
- * (e.g. an MCP host tunnelling through `app.callServerTool`) pass a
3439
- * `transport` on the provider config, replacing every call at once.
3440
- *
3441
- * See `@solvapay/react/mcp` for the canonical non-HTTP implementation.
3442
- */
3443
-
3540
+ type CreditDisplayBlock = {
3541
+ amountMajor: number;
3542
+ currency: string;
3543
+ formatted: string;
3544
+ exchangeRate: number;
3545
+ rateSource: 'parity' | 'db' | 'fallback';
3546
+ };
3444
3547
  interface TransportBalanceResult {
3445
3548
  credits: number;
3446
3549
  displayCurrency: string;
3447
3550
  creditsPerMinorUnit: number;
3448
3551
  displayExchangeRate: number;
3552
+ /** Backend-computed display values — render verbatim, do not reconvert. */
3553
+ display?: CreditDisplayBlock;
3449
3554
  }
3450
3555
  /**
3451
3556
  * Runtime allowance projection consumed by `useLimits`. Mirrors the
@@ -3506,6 +3611,11 @@ interface SolvaPayTransport {
3506
3611
  * adapters omit (the field is on the bootstrap customer snapshot).
3507
3612
  */
3508
3613
  getPaymentMethod?: () => Promise<PaymentMethodInfo>;
3614
+ getAutoRecharge?: () => Promise<AutoRechargeResponse>;
3615
+ saveAutoRecharge?: (input: SaveAutoRechargeInput) => Promise<SaveAutoRechargeResponse>;
3616
+ disableAutoRecharge?: () => Promise<{
3617
+ success: true;
3618
+ }>;
3509
3619
  /**
3510
3620
  * Optional: fetch the authenticated customer's usage snapshot for the
3511
3621
  * active usage-based plan. When omitted, `useUsage()` falls back to
@@ -3539,6 +3649,7 @@ interface SolvaPayTransport {
3539
3649
  createTopupPayment: (params: {
3540
3650
  amount: number;
3541
3651
  currency?: string;
3652
+ autoRecharge?: AutoRechargeInput;
3542
3653
  }) => Promise<TopupPaymentResult>;
3543
3654
  /**
3544
3655
  * Process a credit-topup payment intent after Stripe's `confirmPayment`
@@ -3725,6 +3836,7 @@ interface TopupPaymentResult {
3725
3836
  interface UseTopupOptions {
3726
3837
  amount: number;
3727
3838
  currency?: string;
3839
+ autoRecharge?: AutoRechargeInput;
3728
3840
  }
3729
3841
  interface UseTopupReturn {
3730
3842
  loading: boolean;
@@ -3748,6 +3860,7 @@ interface TopupFormSuccessExtras {
3748
3860
  interface TopupFormProps {
3749
3861
  amount: number;
3750
3862
  currency?: string;
3863
+ autoRecharge?: AutoRechargeInput;
3751
3864
  /**
3752
3865
  * Fires once the customer is fully credited. `extras.creditsAdded`
3753
3866
  * carries the wallet delta observed by the backend helper's
@@ -3808,8 +3921,24 @@ interface BalanceStatus {
3808
3921
  displayCurrency: string | null;
3809
3922
  creditsPerMinorUnit: number | null;
3810
3923
  displayExchangeRate: number | null;
3924
+ /** Backend-computed display block — render verbatim when present. */
3925
+ display: CreditDisplayBlock | null;
3811
3926
  refetch: () => Promise<void>;
3927
+ /**
3928
+ * Optimistically adjusts the in-memory balance. Does not start auto-recharge
3929
+ * reconcile polling — call {@link reconcileAfterUsageDebit} with the server
3930
+ * signal after a confirmed usage debit when auto-recharge may apply.
3931
+ */
3812
3932
  adjustBalance: (credits: number) => void;
3933
+ /**
3934
+ * Poll for balance increase after a confirmed server-side usage debit when
3935
+ * the server reported `autoRecharge.triggered: true`. The backend is the sole
3936
+ * authority on threshold evaluation; pass `{ expectIncrease: true }` only when
3937
+ * the track-usage response includes that signal.
3938
+ */
3939
+ reconcileAfterUsageDebit: (opts?: {
3940
+ expectIncrease?: boolean;
3941
+ }) => void;
3813
3942
  }
3814
3943
  /**
3815
3944
  * Hydration seed passed by MCP App hosts so `SolvaPayProvider` can mount
@@ -3849,6 +3978,7 @@ interface SolvaPayConfig {
3849
3978
  createCheckoutSession?: string;
3850
3979
  createCustomerSession?: string;
3851
3980
  getPaymentMethod?: string;
3981
+ autoRecharge?: string;
3852
3982
  getUsage?: string;
3853
3983
  getLimits?: string;
3854
3984
  };
@@ -3978,6 +4108,7 @@ interface SolvaPayContextValue {
3978
4108
  createTopupPayment: (params: {
3979
4109
  amount: number;
3980
4110
  currency?: string;
4111
+ autoRecharge?: AutoRechargeInput;
3981
4112
  }) => Promise<TopupPaymentResult>;
3982
4113
  /**
3983
4114
  * Process a credit-topup payment intent after Stripe's `confirmPayment`
@@ -4323,4 +4454,4 @@ type SuccessMeta = {
4323
4454
  nextRenewalLabel: string | null;
4324
4455
  };
4325
4456
 
4326
- export { type ActivationResult as A, type BalanceStatus as B, type CheckoutResult as C, type MandateTemplate as D, type Merchant as E, type PaymentError as F, type PaymentIntentResult as G, type PaymentMethodInfo as H, type PaymentResult as I, type PurchaseStatusValue as J, type SuccessMeta as K, type TopupPaymentResult as L, type MandateContext as M, type TransportBalanceResult as N, type TransportCheckoutSessionResult as O, type PaymentFormProps as P, type TransportCustomerSessionResult as Q, type ReactivateResult as R, type SolvaPayProviderProps as S, type TopupFormProps as T, type UsePlansOptions as U, type TransportLimitsResult as V, UnsupportedTransportMethodError as W, type SolvaPayProviderInitial as X, type components as Y, type PrefillCustomer as a, type Plan as b, type PurchaseStatus as c, type SolvaPayContextValue as d, type UsePlansReturn as e, type UsePlanOptions as f, type UsePlanReturn as g, type UseProductReturn as h, type UseMerchantReturn as i, type SolvaPayCopy as j, type PurchaseStatusReturn as k, type CancelResult as l, type ActivatePlanResult as m, type UseTopupOptions as n, type UseTopupReturn as o, type UseTopupAmountSelectorOptions as p, type UseTopupAmountSelectorReturn as q, type UsePaymentMethodReturn as r, type SolvaPayTransport as s, type PartialSolvaPayCopy as t, type PurchaseInfo as u, type Product as v, type SolvaPayConfig as w, type BootstrapPlanLike as x, type CheckoutStep as y, type CustomerPurchaseData as z };
4457
+ export { type components as $, type ActivationResult as A, type BalanceStatus as B, type CheckoutResult as C, type BootstrapPlanLike as D, type CheckoutStep as E, type CustomerPurchaseData as F, type MandateTemplate as G, type Merchant as H, type PaymentError as I, type PaymentIntentResult as J, type PaymentMethodInfo as K, type PaymentResult as L, type MandateContext as M, type PurchaseStatusValue as N, type SuccessMeta as O, type PaymentFormProps as P, type TopupPaymentResult as Q, type ReactivateResult as R, type SolvaPayProviderProps as S, type TopupFormProps as T, type UsePlansOptions as U, type TransportBalanceResult as V, type TransportCheckoutSessionResult as W, type TransportCustomerSessionResult as X, type TransportLimitsResult as Y, UnsupportedTransportMethodError as Z, type SolvaPayProviderInitial as _, type PrefillCustomer as a, type AutoRechargeInput as a0, type AutoRechargeDisplayBlock as a1, type Plan as b, type SaveAutoRechargeResponse as c, type PurchaseStatus as d, type SolvaPayContextValue as e, type UsePlansReturn as f, type UsePlanOptions as g, type UsePlanReturn as h, type UseProductReturn as i, type UseMerchantReturn as j, type SolvaPayCopy as k, type PurchaseStatusReturn as l, type CancelResult as m, type ActivatePlanResult as n, type UseTopupOptions as o, type UseTopupReturn as p, type UseTopupAmountSelectorOptions as q, type UseTopupAmountSelectorReturn as r, type UsePaymentMethodReturn as s, type AutoRechargeConfig as t, type SaveAutoRechargeInput as u, type SolvaPayTransport as v, type PartialSolvaPayCopy as w, type PurchaseInfo as x, type Product as y, type SolvaPayConfig as z };
@@ -842,6 +842,14 @@ interface components {
842
842
  * @example 99
843
843
  */
844
844
  unitsRemaining: number;
845
+ autoRecharge?: components["schemas"]["AutoRechargeTriggeredResponse"];
846
+ };
847
+ AutoRechargeTriggeredResponse: {
848
+ /**
849
+ * Whether the server initiated an auto-recharge charge after this debit
850
+ * @example true
851
+ */
852
+ triggered: boolean;
845
853
  };
846
854
  CreditDebitSkippedResponse: {
847
855
  /** @enum {number} */
@@ -3036,6 +3044,68 @@ type ActivatePlanResult = components['schemas']['ActivatePlanResponseDto'];
3036
3044
  * `{ kind: 'card', ... } | { kind: 'none' }` discriminated union here.
3037
3045
  */
3038
3046
  type PaymentMethodInfo = operations['PaymentMethodSdkController_getPaymentMethod']['responses']['200']['content']['application/json'];
3047
+ type AutoRechargeStatus = 'active' | 'disabled' | 'failed' | 'pending_setup';
3048
+ type AutoRechargeConfig = {
3049
+ enabled: boolean;
3050
+ trigger: {
3051
+ type: 'balance';
3052
+ thresholdAmountMinor: number;
3053
+ };
3054
+ topup: {
3055
+ mode: 'fixed';
3056
+ amountMinor: number;
3057
+ currency: string;
3058
+ };
3059
+ fundingSourceType?: 'saved_card' | 'tokenized_card';
3060
+ paymentMethodId?: string;
3061
+ status: AutoRechargeStatus;
3062
+ failureCount: number;
3063
+ lastChargeAt?: string;
3064
+ updatedAt?: string;
3065
+ /** Backend-computed display values — render verbatim; do not derive from trigger fields. */
3066
+ display?: AutoRechargeDisplayBlock;
3067
+ };
3068
+ type AutoRechargeDisplayBlock = {
3069
+ thresholdAmountMajor: number;
3070
+ topupAmountMajor: number;
3071
+ currency: string;
3072
+ formatted: {
3073
+ threshold: string;
3074
+ topup: string;
3075
+ };
3076
+ exchangeRate: number;
3077
+ rateSource: 'parity' | 'db' | 'fallback';
3078
+ };
3079
+ type CreditDisplayBlock$1 = {
3080
+ amountMajor: number;
3081
+ currency: string;
3082
+ formatted: string;
3083
+ exchangeRate: number;
3084
+ rateSource: 'parity' | 'db' | 'fallback';
3085
+ };
3086
+ type AutoRechargeInput = {
3087
+ enabled: boolean;
3088
+ triggerType: 'balance';
3089
+ thresholdAmountMajor?: number;
3090
+ topupAmountMajor?: number;
3091
+ maxRecharges?: number;
3092
+ currency: string;
3093
+ };
3094
+ /** PUT /sdk/auto-recharge — input plus request-only flags. */
3095
+ type SaveAutoRechargeInput = AutoRechargeInput & {
3096
+ deferSetupIntent?: boolean;
3097
+ };
3098
+ type AutoRechargeResponse = {
3099
+ config: AutoRechargeConfig | null;
3100
+ display?: AutoRechargeDisplayBlock;
3101
+ };
3102
+ type SaveAutoRechargeResponse = {
3103
+ config: AutoRechargeConfig;
3104
+ display?: AutoRechargeDisplayBlock;
3105
+ setupClientSecret?: string;
3106
+ publishableKey?: string;
3107
+ stripeAccountId?: string;
3108
+ };
3039
3109
 
3040
3110
  /**
3041
3111
  * Customer Helper (Core)
@@ -3050,6 +3120,7 @@ type CustomerBalanceResult = {
3050
3120
  displayCurrency: string;
3051
3121
  creditsPerMinorUnit: number;
3052
3122
  displayExchangeRate: number;
3123
+ display?: CreditDisplayBlock$1;
3053
3124
  };
3054
3125
 
3055
3126
  interface PurchaseCheckResult {
@@ -3198,6 +3269,42 @@ interface SolvaPayCopy {
3198
3269
  creditEstimateExact: string;
3199
3270
  creditEstimateApprox: string;
3200
3271
  };
3272
+ autoRecharge: {
3273
+ heading: string;
3274
+ description: string;
3275
+ settingsHeading: string;
3276
+ setupTriggerLabel: string;
3277
+ modifyTriggerLabel: string;
3278
+ notConfiguredHint: string;
3279
+ enableLabel: string;
3280
+ enableQuestion: string;
3281
+ enableSentence: string;
3282
+ thresholdLabel: string;
3283
+ thresholdAriaLabel: string;
3284
+ fixedAmountLabel: string;
3285
+ fixedAmountAriaLabel: string;
3286
+ saveButton: string;
3287
+ cancelButton: string;
3288
+ disableButton: string;
3289
+ savedMessage: string;
3290
+ disabledMessage: string;
3291
+ setupRequiredMessage: string;
3292
+ setupHeading: string;
3293
+ setupDescription: string;
3294
+ setupSubmit: string;
3295
+ setupProcessing: string;
3296
+ setupAwaitingConfirmation: string;
3297
+ setupAuthFailed: string;
3298
+ invalidThreshold: string;
3299
+ thresholdTooLow: string;
3300
+ minTopupAmount: string;
3301
+ topupBelowThreshold: string;
3302
+ creditsPerRecharge: string;
3303
+ creditsPerRechargeApprox: string;
3304
+ currencyPerRecharge: string;
3305
+ currencyPerRechargeApprox: string;
3306
+ statusFailed: string;
3307
+ };
3201
3308
  activationFlow: {
3202
3309
  heading: string;
3203
3310
  activateButton: string;
@@ -3430,22 +3537,20 @@ type PartialSolvaPayCopy = {
3430
3537
  [K in keyof SolvaPayCopy]?: Partial<SolvaPayCopy[K]>;
3431
3538
  };
3432
3539
 
3433
- /**
3434
- * Unified data-access surface for `@solvapay/react`.
3435
- *
3436
- * By default, `SolvaPayProvider` builds an HTTP transport from `config.api` +
3437
- * `config.fetch`. Integrators who need to route those calls somewhere else
3438
- * (e.g. an MCP host tunnelling through `app.callServerTool`) pass a
3439
- * `transport` on the provider config, replacing every call at once.
3440
- *
3441
- * See `@solvapay/react/mcp` for the canonical non-HTTP implementation.
3442
- */
3443
-
3540
+ type CreditDisplayBlock = {
3541
+ amountMajor: number;
3542
+ currency: string;
3543
+ formatted: string;
3544
+ exchangeRate: number;
3545
+ rateSource: 'parity' | 'db' | 'fallback';
3546
+ };
3444
3547
  interface TransportBalanceResult {
3445
3548
  credits: number;
3446
3549
  displayCurrency: string;
3447
3550
  creditsPerMinorUnit: number;
3448
3551
  displayExchangeRate: number;
3552
+ /** Backend-computed display values — render verbatim, do not reconvert. */
3553
+ display?: CreditDisplayBlock;
3449
3554
  }
3450
3555
  /**
3451
3556
  * Runtime allowance projection consumed by `useLimits`. Mirrors the
@@ -3506,6 +3611,11 @@ interface SolvaPayTransport {
3506
3611
  * adapters omit (the field is on the bootstrap customer snapshot).
3507
3612
  */
3508
3613
  getPaymentMethod?: () => Promise<PaymentMethodInfo>;
3614
+ getAutoRecharge?: () => Promise<AutoRechargeResponse>;
3615
+ saveAutoRecharge?: (input: SaveAutoRechargeInput) => Promise<SaveAutoRechargeResponse>;
3616
+ disableAutoRecharge?: () => Promise<{
3617
+ success: true;
3618
+ }>;
3509
3619
  /**
3510
3620
  * Optional: fetch the authenticated customer's usage snapshot for the
3511
3621
  * active usage-based plan. When omitted, `useUsage()` falls back to
@@ -3539,6 +3649,7 @@ interface SolvaPayTransport {
3539
3649
  createTopupPayment: (params: {
3540
3650
  amount: number;
3541
3651
  currency?: string;
3652
+ autoRecharge?: AutoRechargeInput;
3542
3653
  }) => Promise<TopupPaymentResult>;
3543
3654
  /**
3544
3655
  * Process a credit-topup payment intent after Stripe's `confirmPayment`
@@ -3725,6 +3836,7 @@ interface TopupPaymentResult {
3725
3836
  interface UseTopupOptions {
3726
3837
  amount: number;
3727
3838
  currency?: string;
3839
+ autoRecharge?: AutoRechargeInput;
3728
3840
  }
3729
3841
  interface UseTopupReturn {
3730
3842
  loading: boolean;
@@ -3748,6 +3860,7 @@ interface TopupFormSuccessExtras {
3748
3860
  interface TopupFormProps {
3749
3861
  amount: number;
3750
3862
  currency?: string;
3863
+ autoRecharge?: AutoRechargeInput;
3751
3864
  /**
3752
3865
  * Fires once the customer is fully credited. `extras.creditsAdded`
3753
3866
  * carries the wallet delta observed by the backend helper's
@@ -3808,8 +3921,24 @@ interface BalanceStatus {
3808
3921
  displayCurrency: string | null;
3809
3922
  creditsPerMinorUnit: number | null;
3810
3923
  displayExchangeRate: number | null;
3924
+ /** Backend-computed display block — render verbatim when present. */
3925
+ display: CreditDisplayBlock | null;
3811
3926
  refetch: () => Promise<void>;
3927
+ /**
3928
+ * Optimistically adjusts the in-memory balance. Does not start auto-recharge
3929
+ * reconcile polling — call {@link reconcileAfterUsageDebit} with the server
3930
+ * signal after a confirmed usage debit when auto-recharge may apply.
3931
+ */
3812
3932
  adjustBalance: (credits: number) => void;
3933
+ /**
3934
+ * Poll for balance increase after a confirmed server-side usage debit when
3935
+ * the server reported `autoRecharge.triggered: true`. The backend is the sole
3936
+ * authority on threshold evaluation; pass `{ expectIncrease: true }` only when
3937
+ * the track-usage response includes that signal.
3938
+ */
3939
+ reconcileAfterUsageDebit: (opts?: {
3940
+ expectIncrease?: boolean;
3941
+ }) => void;
3813
3942
  }
3814
3943
  /**
3815
3944
  * Hydration seed passed by MCP App hosts so `SolvaPayProvider` can mount
@@ -3849,6 +3978,7 @@ interface SolvaPayConfig {
3849
3978
  createCheckoutSession?: string;
3850
3979
  createCustomerSession?: string;
3851
3980
  getPaymentMethod?: string;
3981
+ autoRecharge?: string;
3852
3982
  getUsage?: string;
3853
3983
  getLimits?: string;
3854
3984
  };
@@ -3978,6 +4108,7 @@ interface SolvaPayContextValue {
3978
4108
  createTopupPayment: (params: {
3979
4109
  amount: number;
3980
4110
  currency?: string;
4111
+ autoRecharge?: AutoRechargeInput;
3981
4112
  }) => Promise<TopupPaymentResult>;
3982
4113
  /**
3983
4114
  * Process a credit-topup payment intent after Stripe's `confirmPayment`
@@ -4323,4 +4454,4 @@ type SuccessMeta = {
4323
4454
  nextRenewalLabel: string | null;
4324
4455
  };
4325
4456
 
4326
- export { type ActivationResult as A, type BalanceStatus as B, type CheckoutResult as C, type MandateTemplate as D, type Merchant as E, type PaymentError as F, type PaymentIntentResult as G, type PaymentMethodInfo as H, type PaymentResult as I, type PurchaseStatusValue as J, type SuccessMeta as K, type TopupPaymentResult as L, type MandateContext as M, type TransportBalanceResult as N, type TransportCheckoutSessionResult as O, type PaymentFormProps as P, type TransportCustomerSessionResult as Q, type ReactivateResult as R, type SolvaPayProviderProps as S, type TopupFormProps as T, type UsePlansOptions as U, type TransportLimitsResult as V, UnsupportedTransportMethodError as W, type SolvaPayProviderInitial as X, type components as Y, type PrefillCustomer as a, type Plan as b, type PurchaseStatus as c, type SolvaPayContextValue as d, type UsePlansReturn as e, type UsePlanOptions as f, type UsePlanReturn as g, type UseProductReturn as h, type UseMerchantReturn as i, type SolvaPayCopy as j, type PurchaseStatusReturn as k, type CancelResult as l, type ActivatePlanResult as m, type UseTopupOptions as n, type UseTopupReturn as o, type UseTopupAmountSelectorOptions as p, type UseTopupAmountSelectorReturn as q, type UsePaymentMethodReturn as r, type SolvaPayTransport as s, type PartialSolvaPayCopy as t, type PurchaseInfo as u, type Product as v, type SolvaPayConfig as w, type BootstrapPlanLike as x, type CheckoutStep as y, type CustomerPurchaseData as z };
4457
+ export { type components as $, type ActivationResult as A, type BalanceStatus as B, type CheckoutResult as C, type BootstrapPlanLike as D, type CheckoutStep as E, type CustomerPurchaseData as F, type MandateTemplate as G, type Merchant as H, type PaymentError as I, type PaymentIntentResult as J, type PaymentMethodInfo as K, type PaymentResult as L, type MandateContext as M, type PurchaseStatusValue as N, type SuccessMeta as O, type PaymentFormProps as P, type TopupPaymentResult as Q, type ReactivateResult as R, type SolvaPayProviderProps as S, type TopupFormProps as T, type UsePlansOptions as U, type TransportBalanceResult as V, type TransportCheckoutSessionResult as W, type TransportCustomerSessionResult as X, type TransportLimitsResult as Y, UnsupportedTransportMethodError as Z, type SolvaPayProviderInitial as _, type PrefillCustomer as a, type AutoRechargeInput as a0, type AutoRechargeDisplayBlock as a1, type Plan as b, type SaveAutoRechargeResponse as c, type PurchaseStatus as d, type SolvaPayContextValue as e, type UsePlansReturn as f, type UsePlanOptions as g, type UsePlanReturn as h, type UseProductReturn as i, type UseMerchantReturn as j, type SolvaPayCopy as k, type PurchaseStatusReturn as l, type CancelResult as m, type ActivatePlanResult as n, type UseTopupOptions as o, type UseTopupReturn as p, type UseTopupAmountSelectorOptions as q, type UseTopupAmountSelectorReturn as r, type UsePaymentMethodReturn as s, type AutoRechargeConfig as t, type SaveAutoRechargeInput as u, type SolvaPayTransport as v, type PartialSolvaPayCopy as w, type PurchaseInfo as x, type Product as y, type SolvaPayConfig as z };