@funnelfox/payments-sdk 0.1.2-beta.6 → 0.1.2-beta.7

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/index.cjs CHANGED
@@ -92,7 +92,8 @@ var StripeCheckoutService = class extends HttpService {
92
92
  return_url: params.returnUrl,
93
93
  ...params.allowPromoCodes && { allow_promotion_codes: params.allowPromoCodes },
94
94
  ...params.coupon && { coupon: params.coupon },
95
- ...params.trialPeriodDays && { trial: { period_days: params.trialPeriodDays } }
95
+ ...params.trialPeriodDays && { trial: { period_days: params.trialPeriodDays } },
96
+ ...params.upgrade && { upgrade: params.upgrade }
96
97
  });
97
98
  if (!data.client_secret) {
98
99
  throw new CheckoutError("Backend returned no client_secret");
package/dist/index.d.cts CHANGED
@@ -29,6 +29,8 @@ interface StripeConfig {
29
29
  coupon?: string;
30
30
  /** Free trial period in days before billing starts */
31
31
  trialPeriodDays?: number;
32
+ /** When true, treats this as a subscription upgrade — requires customerId to be set */
33
+ upgrade?: boolean;
32
34
  }
33
35
 
34
36
  interface FastSpringConfig {
package/dist/index.d.ts CHANGED
@@ -29,6 +29,8 @@ interface StripeConfig {
29
29
  coupon?: string;
30
30
  /** Free trial period in days before billing starts */
31
31
  trialPeriodDays?: number;
32
+ /** When true, treats this as a subscription upgrade — requires customerId to be set */
33
+ upgrade?: boolean;
32
34
  }
33
35
 
34
36
  interface FastSpringConfig {
package/dist/index.js CHANGED
@@ -65,7 +65,8 @@ var StripeCheckoutService = class extends HttpService {
65
65
  return_url: params.returnUrl,
66
66
  ...params.allowPromoCodes && { allow_promotion_codes: params.allowPromoCodes },
67
67
  ...params.coupon && { coupon: params.coupon },
68
- ...params.trialPeriodDays && { trial: { period_days: params.trialPeriodDays } }
68
+ ...params.trialPeriodDays && { trial: { period_days: params.trialPeriodDays } },
69
+ ...params.upgrade && { upgrade: params.upgrade }
69
70
  });
70
71
  if (!data.client_secret) {
71
72
  throw new CheckoutError("Backend returned no client_secret");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funnelfox/payments-sdk",
3
- "version": "0.1.2-beta.6",
3
+ "version": "0.1.2-beta.7",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",