@flopay/shared 0.3.20 → 0.4.0

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/README.md CHANGED
@@ -79,7 +79,7 @@ throw validationError('Email is required', 'email');
79
79
  | `ButtonsLayoutStyles` | Style overrides for the `buttons` layout: `cardButton`, `cardButtonFontSize`, `cardFormContainer`, `cardInputBorder`, `cardInputColor`, `cardInputPlaceholderColor`, `cardInputFontSize`, `cardInputBackground`, `nameInput`, `backButton`, `backButtonFontSize`, `backButtonIcon`, `submitButton`, `submitButtonFontSize`, `title`, `titleFontSize`, `errorBanner` |
80
80
  | `ButtonsLayoutTheme` | Theme preset name: `'default'` / `'minimal'` / `'rounded'` / `'dark'` |
81
81
  | `CheckoutMode` | Checkout mode: `'full'` / `'auto'` / `'confirm'` |
82
- | `CheckoutSession` | Session object: `id`, `clientSecret`, `mode`, `status`, `amount`, `currency`, `customer?`, `checkoutMode?`, `items?`, `subscriptions?`, `successUrl?`, `cancelUrl?`, `coupons?`, `gateway?`, `accountData?`, `tagsData?` |
82
+ | `CheckoutSession` | Session object: `id`, `clientSecret`, `mode`, `status`, `amount`, `currency`, `customer?`, `checkoutMode?`, `items?`, `subscriptions?`, `successUrl?`, `cancelUrl?`, `coupons?`, `gateway?`, `gatewayData?` (includes `publishableKey?` + `paypalPublishableKey?` — null disables PayPal), `accountData?`, `tagsData?` |
83
83
  | `CheckoutSessionItem` | Session item from billing API: `uuid`, `providerItemId`, `providerItemName`, `quantity`, `totalAmount`, `overrideAmount`, `currency` |
84
84
  | `CheckoutSessionSubscription` | Session subscription from billing API: `uuid`, `providerPlanId`, `providerPlanName`, `quantity`, `totalAmount`, `overrideAmount`, `currency` |
85
85
  | `PaymentResult` | Payment outcome: `status` (`'succeeded'`/`'processing'`/`'requires_action'`/`'failed'`), `paymentIntentId?`, `error?` |
package/dist/index.d.cts CHANGED
@@ -174,6 +174,12 @@ interface CheckoutSession {
174
174
  gateway?: BillingProvider;
175
175
  gatewayData?: {
176
176
  publishableKey?: string | null;
177
+ /**
178
+ * Dedicated Stripe publishable key for PayPal. When set, PayPal uses a
179
+ * separate Stripe account from the primary `publishableKey`. When `null`
180
+ * or missing, PayPal is disabled — there is no fallback to `publishableKey`.
181
+ */
182
+ paypalPublishableKey?: string | null;
177
183
  };
178
184
  accountData?: {
179
185
  userId: string;
@@ -378,6 +384,8 @@ interface NormalizedCheckoutSession {
378
384
  stripe?: {
379
385
  clientSecret?: string;
380
386
  publishableKey?: string;
387
+ /** Dedicated PayPal publishable key. `undefined` means PayPal is disabled. */
388
+ paypalPublishableKey?: string;
381
389
  };
382
390
  };
383
391
  raw?: unknown;
package/dist/index.d.ts CHANGED
@@ -174,6 +174,12 @@ interface CheckoutSession {
174
174
  gateway?: BillingProvider;
175
175
  gatewayData?: {
176
176
  publishableKey?: string | null;
177
+ /**
178
+ * Dedicated Stripe publishable key for PayPal. When set, PayPal uses a
179
+ * separate Stripe account from the primary `publishableKey`. When `null`
180
+ * or missing, PayPal is disabled — there is no fallback to `publishableKey`.
181
+ */
182
+ paypalPublishableKey?: string | null;
177
183
  };
178
184
  accountData?: {
179
185
  userId: string;
@@ -378,6 +384,8 @@ interface NormalizedCheckoutSession {
378
384
  stripe?: {
379
385
  clientSecret?: string;
380
386
  publishableKey?: string;
387
+ /** Dedicated PayPal publishable key. `undefined` means PayPal is disabled. */
388
+ paypalPublishableKey?: string;
381
389
  };
382
390
  };
383
391
  raw?: unknown;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flopay/shared",
3
- "version": "0.3.20",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",