@solvapay/server 2.2.1 → 2.2.2-preview-55843c4d7bb67bbe89bfcdabbbe0e3a679eb2805

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.
@@ -331,12 +331,6 @@ interface components {
331
331
  /** @enum {string} */
332
332
  onEnd: 'convert' | 'cancel' | 'downgrade';
333
333
  requireCard?: boolean;
334
- } | {
335
- /** @enum {string} */
336
- kind: 'prepaid';
337
- label?: string;
338
- lowBalanceUnits?: number;
339
- minTopUpMinor?: number;
340
334
  } | {
341
335
  /** @enum {string} */
342
336
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -534,12 +528,6 @@ interface components {
534
528
  /** @enum {string} */
535
529
  onEnd: 'convert' | 'cancel' | 'downgrade';
536
530
  requireCard?: boolean;
537
- } | {
538
- /** @enum {string} */
539
- kind: 'prepaid';
540
- label?: string;
541
- lowBalanceUnits?: number;
542
- minTopUpMinor?: number;
543
531
  } | {
544
532
  /** @enum {string} */
545
533
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -630,7 +618,7 @@ interface components {
630
618
  * @example duplicate
631
619
  * @enum {string}
632
620
  */
633
- reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based';
621
+ reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based' | 'plan_billed_at_period_end';
634
622
  };
635
623
  CreditDebitSuccessResponse: {
636
624
  /**
@@ -679,7 +667,7 @@ interface components {
679
667
  * @example parity
680
668
  * @enum {string}
681
669
  */
682
- rateSource: 'parity' | 'db' | 'fallback';
670
+ rateSource: 'parity' | 'db' | 'fallback' | 'funding';
683
671
  };
684
672
  CustomerBalanceResponse: {
685
673
  /**
@@ -736,11 +724,10 @@ interface components {
736
724
  };
737
725
  DisableAutoRechargeResponse: {
738
726
  /**
739
- * Always true on success
727
+ * Whether auto-recharge was disabled
740
728
  * @example true
741
- * @enum {number}
742
729
  */
743
- success: true;
730
+ success: boolean;
744
731
  };
745
732
  GetCustomerSessionResponse: {
746
733
  /**
@@ -966,12 +953,6 @@ interface components {
966
953
  /** @enum {string} */
967
954
  onEnd: 'convert' | 'cancel' | 'downgrade';
968
955
  requireCard?: boolean;
969
- } | {
970
- /** @enum {string} */
971
- kind: 'prepaid';
972
- label?: string;
973
- lowBalanceUnits?: number;
974
- minTopUpMinor?: number;
975
956
  } | {
976
957
  /** @enum {string} */
977
958
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -1552,7 +1533,7 @@ interface components {
1552
1533
  [key: string]: unknown;
1553
1534
  } | null;
1554
1535
  /**
1555
- * Whether the frozen plan meters usage
1536
+ * Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
1556
1537
  * @example true
1557
1538
  */
1558
1539
  isMetered?: boolean;
@@ -1874,12 +1855,6 @@ interface components {
1874
1855
  /** @enum {string} */
1875
1856
  onEnd: 'convert' | 'cancel' | 'downgrade';
1876
1857
  requireCard?: boolean;
1877
- } | {
1878
- /** @enum {string} */
1879
- kind: 'prepaid';
1880
- label?: string;
1881
- lowBalanceUnits?: number;
1882
- minTopUpMinor?: number;
1883
1858
  } | {
1884
1859
  /** @enum {string} */
1885
1860
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -2208,9 +2208,7 @@ function createSolvaPay(config) {
2208
2208
  },
2209
2209
  attachBusinessDetails(params) {
2210
2210
  if (!apiClient.attachBusinessDetails) {
2211
- throw new SolvaPayError4(
2212
- "attachBusinessDetails is not available on this API client"
2213
- );
2211
+ throw new SolvaPayError4("attachBusinessDetails is not available on this API client");
2214
2212
  }
2215
2213
  return apiClient.attachBusinessDetails(params);
2216
2214
  },
package/dist/index.cjs CHANGED
@@ -2151,9 +2151,7 @@ function createSolvaPay(config) {
2151
2151
  },
2152
2152
  attachBusinessDetails(params) {
2153
2153
  if (!apiClient.attachBusinessDetails) {
2154
- throw new import_core3.SolvaPayError(
2155
- "attachBusinessDetails is not available on this API client"
2156
- );
2154
+ throw new import_core3.SolvaPayError("attachBusinessDetails is not available on this API client");
2157
2155
  }
2158
2156
  return apiClient.attachBusinessDetails(params);
2159
2157
  },
package/dist/index.d.cts CHANGED
@@ -1,4 +1,3 @@
1
- import * as _solvapay_core from '@solvapay/core';
2
1
  import { BusinessDetailsInput, TaxBreakdown } from '@solvapay/core';
3
2
 
4
3
  interface components {
@@ -334,12 +333,6 @@ interface components {
334
333
  /** @enum {string} */
335
334
  onEnd: 'convert' | 'cancel' | 'downgrade';
336
335
  requireCard?: boolean;
337
- } | {
338
- /** @enum {string} */
339
- kind: 'prepaid';
340
- label?: string;
341
- lowBalanceUnits?: number;
342
- minTopUpMinor?: number;
343
336
  } | {
344
337
  /** @enum {string} */
345
338
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -537,12 +530,6 @@ interface components {
537
530
  /** @enum {string} */
538
531
  onEnd: 'convert' | 'cancel' | 'downgrade';
539
532
  requireCard?: boolean;
540
- } | {
541
- /** @enum {string} */
542
- kind: 'prepaid';
543
- label?: string;
544
- lowBalanceUnits?: number;
545
- minTopUpMinor?: number;
546
533
  } | {
547
534
  /** @enum {string} */
548
535
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -633,7 +620,7 @@ interface components {
633
620
  * @example duplicate
634
621
  * @enum {string}
635
622
  */
636
- reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based';
623
+ reason: 'duplicate' | 'no_product_ref' | 'customer_not_found' | 'no_active_purchase' | 'plan_not_credit_based' | 'plan_billed_at_period_end';
637
624
  };
638
625
  CreditDebitSuccessResponse: {
639
626
  /**
@@ -682,7 +669,7 @@ interface components {
682
669
  * @example parity
683
670
  * @enum {string}
684
671
  */
685
- rateSource: 'parity' | 'db' | 'fallback';
672
+ rateSource: 'parity' | 'db' | 'fallback' | 'funding';
686
673
  };
687
674
  CustomerBalanceResponse: {
688
675
  /**
@@ -739,11 +726,10 @@ interface components {
739
726
  };
740
727
  DisableAutoRechargeResponse: {
741
728
  /**
742
- * Always true on success
729
+ * Whether auto-recharge was disabled
743
730
  * @example true
744
- * @enum {number}
745
731
  */
746
- success: true;
732
+ success: boolean;
747
733
  };
748
734
  GetCustomerSessionResponse: {
749
735
  /**
@@ -969,12 +955,6 @@ interface components {
969
955
  /** @enum {string} */
970
956
  onEnd: 'convert' | 'cancel' | 'downgrade';
971
957
  requireCard?: boolean;
972
- } | {
973
- /** @enum {string} */
974
- kind: 'prepaid';
975
- label?: string;
976
- lowBalanceUnits?: number;
977
- minTopUpMinor?: number;
978
958
  } | {
979
959
  /** @enum {string} */
980
960
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -1555,7 +1535,7 @@ interface components {
1555
1535
  [key: string]: unknown;
1556
1536
  } | null;
1557
1537
  /**
1558
- * Whether the frozen plan meters usage
1538
+ * Whether the frozen plan counts usage (prices per unit, or has a limit). Shipped clients read this to show an allowance.
1559
1539
  * @example true
1560
1540
  */
1561
1541
  isMetered?: boolean;
@@ -1877,12 +1857,6 @@ interface components {
1877
1857
  /** @enum {string} */
1878
1858
  onEnd: 'convert' | 'cancel' | 'downgrade';
1879
1859
  requireCard?: boolean;
1880
- } | {
1881
- /** @enum {string} */
1882
- kind: 'prepaid';
1883
- label?: string;
1884
- lowBalanceUnits?: number;
1885
- minTopUpMinor?: number;
1886
1860
  } | {
1887
1861
  /** @enum {string} */
1888
1862
  appliesTo?: 'recurring' | 'setup' | 'usage' | 'all';
@@ -3826,29 +3800,9 @@ type WebhookEvent = {
3826
3800
  type PurchaseInfo = components['schemas']['SdkPurchaseResponse'];
3827
3801
  type AttachBusinessDetailsParams = {
3828
3802
  paymentIntentId: string;
3829
- customerRef?: string;
3830
- } & BusinessDetailsInput;
3831
- type AttachBusinessDetailsResult = {
3832
- taxBreakdown: TaxBreakdown;
3833
- };
3834
- type CheckLimitsRequest = components['schemas']['CheckLimitRequest'] & {
3835
- /**
3836
- * When `true`, the backend mints a checkout session (or customer
3837
- * portal session for activation flows) and returns its URL / id on
3838
- * the response. Default `false` so read-only callers like
3839
- * `useLimits` / `checkLimitsCore` stop creating orphan
3840
- * `CheckoutSession` documents and firing spurious
3841
- * `checkout_session.created` webhooks on every refetch.
3842
- *
3843
- * `paywall.decide()` opts in because it bakes the URL into the
3844
- * 402 `PaywallStructuredContent`.
3845
- *
3846
- * NOTE: this intersection is a temporary stand-in until the
3847
- * backend OpenAPI spec is republished and `generated.ts` is
3848
- * regenerated to include the field natively.
3849
- */
3850
- includeCheckoutSession?: boolean;
3851
- };
3803
+ } & components['schemas']['BusinessDetailsDto'];
3804
+ type AttachBusinessDetailsResult = components['schemas']['AttachBusinessDetailsResponse'];
3805
+ type CheckLimitsRequest = components['schemas']['CheckLimitRequest'];
3852
3806
  /**
3853
3807
  * Extended LimitResponse with SDK-added plan field.
3854
3808
  *
@@ -3875,19 +3829,7 @@ type CustomerResponseMapped = {
3875
3829
  plan?: string;
3876
3830
  purchases?: PurchaseInfo[];
3877
3831
  };
3878
- /**
3879
- * One-time purchase information returned from payment processing
3880
- */
3881
- interface OneTimePurchaseInfo {
3882
- reference: string;
3883
- customerRef: string;
3884
- productRef?: string;
3885
- amount: number;
3886
- currency: string;
3887
- creditsAdded?: number;
3888
- completedAt: string;
3889
- createdAt: string;
3890
- }
3832
+ type OneTimePurchaseInfo = components['schemas']['OneTimePurchaseInfo'];
3891
3833
  /**
3892
3834
  * Result from processing a payment intent.
3893
3835
  *
@@ -3972,71 +3914,21 @@ type ActivatePlanResult = components['schemas']['ActivatePlanResponseDto'];
3972
3914
  * `{ kind: 'card', ... } | { kind: 'none' }` discriminated union here.
3973
3915
  */
3974
3916
  type PaymentMethodInfo = operations['PaymentMethodSdkController_getPaymentMethod']['responses']['200']['content']['application/json'];
3975
- type AutoRechargeStatus = 'active' | 'disabled' | 'failed' | 'pending_setup';
3976
- type AutoRechargeConfig = {
3977
- enabled: boolean;
3978
- trigger: {
3979
- type: 'balance';
3980
- thresholdAmountMinor: number;
3981
- };
3982
- topup: {
3983
- mode: 'fixed';
3984
- amountMinor: number;
3985
- currency: string;
3986
- };
3987
- fundingSourceType?: 'saved_card' | 'tokenized_card';
3988
- paymentMethodId?: string;
3989
- status: AutoRechargeStatus;
3990
- failureCount: number;
3991
- maxMonthlySpendMinor?: number;
3992
- monthlySpendMinor: number;
3993
- monthlySpendPeriod?: string;
3994
- lastChargeAt?: string;
3995
- updatedAt?: string;
3996
- /** Backend-computed display values — render verbatim; do not derive from trigger fields. */
3997
- display?: AutoRechargeDisplayBlock;
3998
- };
3999
- type AutoRechargeDisplayBlock = {
4000
- thresholdAmountMajor: number;
4001
- topupAmountMajor: number;
4002
- currency: string;
4003
- formatted: {
4004
- threshold: string;
4005
- topup: string;
4006
- };
4007
- exchangeRate: number;
4008
- rateSource: 'parity' | 'db' | 'fallback';
4009
- };
4010
- type CreditDisplayBlock = {
4011
- amountMajor: number;
4012
- currency: string;
4013
- formatted: string;
4014
- exchangeRate: number;
4015
- rateSource: 'parity' | 'db' | 'fallback';
4016
- };
4017
- type AutoRechargeInput = {
4018
- enabled: boolean;
4019
- triggerType: 'balance';
4020
- thresholdAmountMajor?: number;
4021
- topupAmountMajor?: number;
4022
- maxMonthlySpendMajor?: number;
4023
- currency: string;
3917
+ /**
3918
+ * Stored auto-recharge config. `display` is an SDK-side merge of the
3919
+ * sibling `AutoRechargeGetResponse.display` block so consumers can read
3920
+ * formatted amounts off the config object.
3921
+ */
3922
+ type AutoRechargeConfig = components['schemas']['AutoRechargeConfigDto'] & {
3923
+ display?: components['schemas']['AutoRechargeDisplayDto'];
4024
3924
  };
3925
+ type AutoRechargeDisplayBlock = components['schemas']['AutoRechargeDisplayDto'];
3926
+ type CreditDisplayBlock = components['schemas']['CustomerBalanceDisplayDto'];
3927
+ type AutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName' | 'deferSetupIntent'>;
4025
3928
  /** PUT /sdk/auto-recharge — input plus request-only flags. */
4026
- type SaveAutoRechargeInput = AutoRechargeInput & {
4027
- deferSetupIntent?: boolean;
4028
- };
4029
- type AutoRechargeResponse = {
4030
- config: AutoRechargeConfig | null;
4031
- display?: AutoRechargeDisplayBlock;
4032
- };
4033
- type SaveAutoRechargeResponse = {
4034
- config: AutoRechargeConfig;
4035
- display?: AutoRechargeDisplayBlock;
4036
- setupClientSecret?: string;
4037
- publishableKey?: string;
4038
- stripeAccountId?: string;
4039
- };
3929
+ type SaveAutoRechargeInput = Omit<components['schemas']['PutAutoRechargeSdkDto'], 'customerRef' | 'customerEmail' | 'customerName'>;
3930
+ type AutoRechargeResponse = components['schemas']['AutoRechargeGetResponse'];
3931
+ type SaveAutoRechargeResponse = components['schemas']['SaveAutoRechargeResponse'];
4040
3932
  /**
4041
3933
  * SDK-facing merchant identity (source: GET /v1/sdk/merchant).
4042
3934
  */
@@ -4072,40 +3964,9 @@ type McpBootstrapPlanInput = NonNullable<components['schemas']['McpBootstrapDto'
4072
3964
  type ToolPlanMappingInput = NonNullable<components['schemas']['McpBootstrapDto']['tools']>[number];
4073
3965
  type McpBootstrapRequest = components['schemas']['McpBootstrapDto'];
4074
3966
  type McpToolPlanMappingInput = NonNullable<components['schemas']['ConfigureMcpPlansDto']['toolMapping']>[number];
4075
- interface McpBootstrapResponse {
4076
- product: components['schemas']['SdkProductResponse'];
4077
- mcpServer: {
4078
- reference?: string;
4079
- subdomain?: string;
4080
- mcpProxyUrl?: string;
4081
- url: string;
4082
- defaultPlanRef?: string;
4083
- };
4084
- planMap: Record<string, {
4085
- reference: string;
4086
- name?: string;
4087
- }>;
4088
- toolsAutoMapped?: boolean;
4089
- autoMappedTools?: Array<{
4090
- name: string;
4091
- description?: string;
4092
- }>;
4093
- }
3967
+ type McpBootstrapResponse = components['schemas']['McpBootstrapResult'];
4094
3968
  type ConfigureMcpPlansRequest = components['schemas']['ConfigureMcpPlansDto'];
4095
- interface ConfigureMcpPlansResponse {
4096
- product: components['schemas']['SdkProductResponse'];
4097
- mcpServer: {
4098
- reference?: string;
4099
- subdomain?: string;
4100
- mcpProxyUrl?: string;
4101
- url: string;
4102
- defaultPlanRef?: string;
4103
- };
4104
- planMap: Record<string, {
4105
- reference: string;
4106
- name?: string;
4107
- }>;
4108
- }
3969
+ type ConfigureMcpPlansResponse = components['schemas']['ConfigureMcpPlansResult'];
4109
3970
  /**
4110
3971
  * SolvaPay API Client Interface
4111
3972
  *
@@ -4126,13 +3987,7 @@ interface SolvaPayClient {
4126
3987
  * `externalRef` on an existing email-matched customer, and exposed
4127
3988
  * directly for integrators who need it.
4128
3989
  */
4129
- updateCustomer?(customerRef: string, params: {
4130
- email?: string;
4131
- name?: string;
4132
- telephone?: string;
4133
- metadata?: Record<string, unknown>;
4134
- externalRef?: string;
4135
- }): Promise<{
3990
+ updateCustomer?(customerRef: string, params: components['schemas']['UpdateCustomerRequest']): Promise<{
4136
3991
  customerRef: string;
4137
3992
  }>;
4138
3993
  getCustomer(params: {
@@ -4156,75 +4011,37 @@ interface SolvaPayClient {
4156
4011
  */
4157
4012
  getPlatformConfig?(): Promise<SdkPlatformConfigResponse>;
4158
4013
  getProduct?(productRef: string): Promise<SdkProductResponse>;
4159
- listProducts?(): Promise<Array<{
4160
- reference: string;
4161
- name: string;
4162
- description?: string;
4163
- }>>;
4164
- createProduct?(params: components['schemas']['CreateProductRequest']): Promise<{
4165
- reference: string;
4166
- name: string;
4167
- }>;
4014
+ listProducts?(): Promise<components['schemas']['SdkProductResponse'][]>;
4015
+ createProduct?(params: components['schemas']['CreateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4168
4016
  bootstrapMcpProduct?(params: McpBootstrapRequest): Promise<McpBootstrapResponse>;
4169
4017
  configureMcpPlans?(productRef: string, params: ConfigureMcpPlansRequest): Promise<ConfigureMcpPlansResponse>;
4170
4018
  updateProduct?(productRef: string, params: components['schemas']['UpdateProductRequest']): Promise<components['schemas']['SdkProductResponse']>;
4171
4019
  deleteProduct?(productRef: string): Promise<void>;
4172
- cloneProduct?(productRef: string, overrides?: {
4173
- name?: string;
4174
- }): Promise<{
4175
- reference: string;
4176
- name: string;
4177
- }>;
4020
+ cloneProduct?(productRef: string, overrides?: components['schemas']['CloneProductDto']): Promise<components['schemas']['SdkProductResponse']>;
4178
4021
  listPlans?(productRef: string): Promise<components['schemas']['Plan'][]>;
4179
4022
  createPlan?(params: components['schemas']['CreatePlanRequest'] & {
4180
4023
  productRef: string;
4181
4024
  }): Promise<components['schemas']['Plan']>;
4182
4025
  updatePlan?(productRef: string, planRef: string, params: components['schemas']['UpdatePlanRequest']): Promise<components['schemas']['Plan']>;
4183
4026
  deletePlan?(productRef: string, planRef: string): Promise<void>;
4184
- createPaymentIntent?(params: {
4185
- productRef: string;
4186
- planRef: string;
4187
- customerRef: string;
4188
- currency?: string;
4027
+ createPaymentIntent?(params: Omit<components['schemas']['CreatePaymentIntentDto'], 'purpose'> & {
4028
+ purpose?: components['schemas']['CreatePaymentIntentDto']['purpose'];
4189
4029
  idempotencyKey?: string;
4190
- }): Promise<{
4191
- processorPaymentId: string;
4192
- clientSecret: string;
4193
- publishableKey: string;
4194
- accountId?: string;
4195
- /** USD ledger amount in minor units. */
4196
- amount: number;
4197
- /** Presentment amount in minor units (matches `currency`). */
4198
- originalAmount?: number;
4199
- currency?: string;
4200
- exchangeRate?: number;
4201
- status?: string;
4202
- }>;
4203
- createTopupPaymentIntent?(params: {
4204
- customerRef: string;
4205
- amount: number;
4030
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4031
+ createTopupPaymentIntent?(params: Pick<components['schemas']['CreatePaymentIntentDto'], 'customerRef' | 'amount' | 'currency' | 'description' | 'autoRecharge'> & {
4206
4032
  currency: string;
4207
- description?: string;
4033
+ amount: number;
4208
4034
  idempotencyKey?: string;
4209
4035
  autoRecharge?: AutoRechargeInput;
4210
- }): Promise<{
4211
- processorPaymentId: string;
4212
- clientSecret: string;
4213
- publishableKey: string;
4214
- accountId?: string;
4215
- }>;
4216
- cancelPurchase?(params: {
4036
+ }): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4037
+ cancelPurchase?(params: components['schemas']['CancelPurchaseRequest'] & {
4217
4038
  purchaseRef: string;
4218
- reason?: string;
4219
4039
  }): Promise<PurchaseInfo>;
4220
4040
  reactivatePurchase?(params: {
4221
4041
  purchaseRef: string;
4222
4042
  }): Promise<PurchaseInfo>;
4223
- processPaymentIntent?(params: {
4043
+ processPaymentIntent?(params: components['schemas']['ProcessPaymentIntentDto'] & {
4224
4044
  paymentIntentId: string;
4225
- productRef?: string;
4226
- customerRef: string;
4227
- planRef?: string;
4228
4045
  }): Promise<ProcessPaymentResult>;
4229
4046
  attachBusinessDetails?(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
4230
4047
  getUserInfo?(params: {
@@ -4233,14 +4050,7 @@ interface SolvaPayClient {
4233
4050
  }): Promise<components['schemas']['UserInfoResponse']>;
4234
4051
  getCustomerBalance?(params: {
4235
4052
  customerRef: string;
4236
- }): Promise<{
4237
- customerRef: string;
4238
- credits: number;
4239
- displayCurrency: string;
4240
- creditsPerMinorUnit: number;
4241
- displayExchangeRate: number;
4242
- display?: CreditDisplayBlock;
4243
- }>;
4053
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
4244
4054
  createCheckoutSession(params: operations['CheckoutSessionSdkController_createCheckoutSession']['requestBody']['content']['application/json']): Promise<components['schemas']['CreateCheckoutSessionResponse']>;
4245
4055
  createCustomerSession(params: components['schemas']['CreateCustomerSessionRequest']): Promise<components['schemas']['CreateCustomerSessionResponse']>;
4246
4056
  activatePlan?(params: components['schemas']['ActivatePlanDto']): Promise<ActivatePlanResult>;
@@ -4255,9 +4065,7 @@ interface SolvaPayClient {
4255
4065
  }): Promise<SaveAutoRechargeResponse>;
4256
4066
  disableAutoRecharge?(params: {
4257
4067
  customerRef: string;
4258
- }): Promise<{
4259
- success: true;
4260
- }>;
4068
+ }): Promise<components['schemas']['DisableAutoRechargeResponse']>;
4261
4069
  }
4262
4070
 
4263
4071
  /**
@@ -4930,18 +4738,7 @@ interface SolvaPay {
4930
4738
  * // Use intent.clientSecret on the client to confirm payment
4931
4739
  * ```
4932
4740
  */
4933
- createPaymentIntent(params: {
4934
- productRef: string;
4935
- planRef: string;
4936
- customerRef: string;
4937
- currency?: string;
4938
- idempotencyKey?: string;
4939
- }): Promise<{
4940
- processorPaymentId: string;
4941
- clientSecret: string;
4942
- publishableKey: string;
4943
- accountId?: string;
4944
- }>;
4741
+ createPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4945
4742
  /**
4946
4743
  * Create a payment intent for a credit top-up.
4947
4744
  *
@@ -4949,19 +4746,7 @@ interface SolvaPay {
4949
4746
  * Credits are recorded via webhook after payment confirmation — no
4950
4747
  * `processPaymentIntent` call is needed.
4951
4748
  */
4952
- createTopupPaymentIntent(params: {
4953
- customerRef: string;
4954
- amount: number;
4955
- currency: string;
4956
- description?: string;
4957
- idempotencyKey?: string;
4958
- autoRecharge?: AutoRechargeInput;
4959
- }): Promise<{
4960
- processorPaymentId: string;
4961
- clientSecret: string;
4962
- publishableKey: string;
4963
- accountId?: string;
4964
- }>;
4749
+ createTopupPaymentIntent(params: Parameters<NonNullable<SolvaPayClient['createTopupPaymentIntent']>>[0]): Promise<components['schemas']['SdkPaymentIntentResponse']>;
4965
4750
  /**
4966
4751
  * Process a payment intent after client-side payment confirmation.
4967
4752
  *
@@ -5000,17 +4785,7 @@ interface SolvaPay {
5000
4785
  * Attach business purchase details to a payment intent
5001
4786
  * and retrieve the computed tax breakdown.
5002
4787
  */
5003
- attachBusinessDetails(params: {
5004
- paymentIntentId: string;
5005
- customerRef?: string;
5006
- isBusiness: boolean;
5007
- businessName?: string;
5008
- country?: string;
5009
- taxId?: string;
5010
- taxIdType?: _solvapay_core.TaxIdType;
5011
- }): Promise<{
5012
- taxBreakdown: _solvapay_core.TaxBreakdown;
5013
- }>;
4788
+ attachBusinessDetails(params: AttachBusinessDetailsParams): Promise<AttachBusinessDetailsResult>;
5014
4789
  /**
5015
4790
  * Check if customer is within usage limits for a product.
5016
4791
  *
@@ -5151,13 +4926,7 @@ interface SolvaPay {
5151
4926
  */
5152
4927
  getCustomerBalance(params: {
5153
4928
  customerRef: string;
5154
- }): Promise<{
5155
- customerRef: string;
5156
- credits: number;
5157
- displayCurrency: string;
5158
- creditsPerMinorUnit: number;
5159
- displayExchangeRate: number;
5160
- }>;
4929
+ }): Promise<components['schemas']['CustomerBalanceResponse']>;
5161
4930
  /**
5162
4931
  * Create a hosted checkout session for a customer.
5163
4932
  *
@@ -5797,14 +5566,7 @@ declare function getAuthenticatedUserCore(request: Request, options?: {
5797
5566
  * Works with standard Web API Request (works everywhere).
5798
5567
  */
5799
5568
 
5800
- type CustomerBalanceResult = {
5801
- customerRef: string;
5802
- credits: number;
5803
- displayCurrency: string;
5804
- creditsPerMinorUnit: number;
5805
- displayExchangeRate: number;
5806
- display?: CreditDisplayBlock;
5807
- };
5569
+ type CustomerBalanceResult = components['schemas']['CustomerBalanceResponse'];
5808
5570
  /**
5809
5571
  * Sync customer with SolvaPay backend (ensure customer exists).
5810
5572
  *
@@ -6195,9 +5957,7 @@ type HelperOptions = {
6195
5957
  };
6196
5958
  declare function getAutoRechargeCore(request: Request, options?: HelperOptions): Promise<AutoRechargeResponse | ErrorResult>;
6197
5959
  declare function saveAutoRechargeCore(request: Request, input: AutoRechargeInput, options?: HelperOptions): Promise<SaveAutoRechargeResponse | ErrorResult>;
6198
- declare function disableAutoRechargeCore(request: Request, options?: HelperOptions): Promise<{
6199
- success: true;
6200
- } | ErrorResult>;
5960
+ declare function disableAutoRechargeCore(request: Request, options?: HelperOptions): Promise<components['schemas']['DisableAutoRechargeResponse'] | ErrorResult>;
6201
5961
 
6202
5962
  /**
6203
5963
  * Plans Helper (Core)
@@ -6393,4 +6153,4 @@ declare function verifyWebhook({ body, signature, secret, }: {
6393
6153
  secret: string;
6394
6154
  }): WebhookEvent;
6395
6155
 
6396
- export { type ActivatePlanResult, type AssignCreditsRequest, type AssignCreditsResponse, type AuthenticatedUser, type AutoRechargeConfig, type AutoRechargeDisplayBlock, type AutoRechargeInput, type AutoRechargeResponse, BALANCE_RECONCILE_DELAYS_MS, type ConfigureMcpPlansRequest, type ConfigureMcpPlansResponse, type CreateSolvaPayConfig, type CreditDebitResult, type CreditDebitSkipReason, type CreditDisplayBlock, 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 McpServerLike, 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, type ProcessPaymentResult, type ProductConfigurationStatus, type ProtectHandlerContext, type PurchaseCheckResult, type PurchaseInfo, type RegisterVirtualToolsMcpOptions, type RetryOptions, type SaveAutoRechargeInput, type SaveAutoRechargeResponse, type SdkMerchantResponse, type SdkProductResponse, type ServerClientOptions, type SolvaPay, type SolvaPayClient, TOPUP_BALANCE_POLL_DELAYS_MS, type ToolPlanMappingInput, type TopupProcessResult, type TrackUsageBulkRequest, type TrackUsageBulkResponse, type TrackUsageRequest, type TrackUsageResponse, VIRTUAL_TOOL_DEFINITIONS, type VerifyProductConfigurationOptions, type VirtualToolDefinition, type VirtualToolsOptions, 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, createVirtualTools, disableAutoRechargeCore, getAuthenticatedUserCore, getAutoRechargeCore, getCustomerBalanceCore, getMerchantCore, getPaymentMethodCore, getProductCore, getUsageCore, handleRouteError, isErrorResult, isPaywallStructuredContent, jsonSchemaToZodRawShape, listPlansCore, paywallErrorToClientPayload, pollBalanceUntilIncreased, processPaymentIntentCore, processTopupPaymentIntentCore, reactivatePurchaseCore, registerVirtualToolsMcpImpl, saveAutoRechargeCore, syncCustomerCore, trackUsageCore, verifyProductConfiguration, verifyWebhook, withRetry };
6156
+ export { type ActivatePlanResult, type AssignCreditsRequest, type AssignCreditsResponse, type AttachBusinessDetailsParams, type AttachBusinessDetailsResult, type AuthenticatedUser, type AutoRechargeConfig, type AutoRechargeDisplayBlock, type AutoRechargeInput, type AutoRechargeResponse, BALANCE_RECONCILE_DELAYS_MS, type ConfigureMcpPlansRequest, type ConfigureMcpPlansResponse, type CreateSolvaPayConfig, type CreditDebitResult, type CreditDebitSkipReason, type CreditDisplayBlock, 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 McpServerLike, 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, type ProcessPaymentResult, type ProductConfigurationStatus, type ProtectHandlerContext, type PurchaseCheckResult, type PurchaseInfo, type RegisterVirtualToolsMcpOptions, type RetryOptions, type SaveAutoRechargeInput, type SaveAutoRechargeResponse, type SdkMerchantResponse, type SdkProductResponse, type ServerClientOptions, type SolvaPay, type SolvaPayClient, TOPUP_BALANCE_POLL_DELAYS_MS, type ToolPlanMappingInput, type TopupProcessResult, type TrackUsageBulkRequest, type TrackUsageBulkResponse, type TrackUsageRequest, type TrackUsageResponse, VIRTUAL_TOOL_DEFINITIONS, type VerifyProductConfigurationOptions, type VirtualToolDefinition, type VirtualToolsOptions, 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, createVirtualTools, disableAutoRechargeCore, getAuthenticatedUserCore, getAutoRechargeCore, getCustomerBalanceCore, getMerchantCore, getPaymentMethodCore, getProductCore, getUsageCore, handleRouteError, isErrorResult, isPaywallStructuredContent, jsonSchemaToZodRawShape, listPlansCore, paywallErrorToClientPayload, pollBalanceUntilIncreased, processPaymentIntentCore, processTopupPaymentIntentCore, reactivatePurchaseCore, registerVirtualToolsMcpImpl, saveAutoRechargeCore, syncCustomerCore, trackUsageCore, verifyProductConfiguration, verifyWebhook, withRetry };