@flopay/react 1.9.11 → 1.9.14

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.d.cts CHANGED
@@ -374,6 +374,20 @@ interface FloPayCheckoutProps {
374
374
  cardPreFormSlot?: React.ReactNode;
375
375
  /** Layout for AVS fields: 'row' (side-by-side, default) or 'column' (stacked). */
376
376
  avsLayout?: 'row' | 'column';
377
+ /**
378
+ * Final wording for the hosted card form's submit button in full checkout
379
+ * (billing API v1.9.35+), e.g. `'Pay $10'`. Pass final, already-localized
380
+ * plain text from your own order summary — the SDK does not format amounts
381
+ * or translate. Updates apply live without remounting the card form or
382
+ * clearing entered card details; omitting or clearing it (or passing `null`
383
+ * or blank text) shows the hosted default, `CONFIRM PAYMENT`. Direct
384
+ * custom-layout children receive it unless they set their own `submitLabel`.
385
+ *
386
+ * Only the hosted card submit button changes: `confirmLabel` still owns the
387
+ * saved-payment confirm button, `cardButtonContent` the buttons-layout card
388
+ * tile, and wallet, PayPal, processing, and retry wording is unchanged.
389
+ */
390
+ submitLabel?: string | null;
377
391
  /** Additional CSS class for the wrapper. */
378
392
  className?: string;
379
393
  /** Seed an initial checkout error message for the rendered payment form. */
@@ -390,7 +404,11 @@ interface FloPayCheckoutProps {
390
404
  * - `'auto'` — auto-submit with saved PM, falls back to `'full'` on failure
391
405
  */
392
406
  checkoutMode?: CheckoutMode;
393
- /** Label for the confirm button in `confirm` mode. Default: `'Confirm Purchase'`. */
407
+ /**
408
+ * Label for the saved-payment confirm button in `confirm` mode. Default:
409
+ * `'Confirm Purchase'`. Full checkout's hosted card button uses
410
+ * {@link FloPayCheckoutProps.submitLabel} instead.
411
+ */
394
412
  confirmLabel?: string;
395
413
  /** Custom confirm button renderer for `confirm` mode. */
396
414
  renderConfirmButton?: (props: {
@@ -423,7 +441,7 @@ interface FloPayCheckoutProps {
423
441
  * />
424
442
  * ```
425
443
  */
426
- declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, className, initialErrorMessage, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
444
+ declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, submitLabel, className, initialErrorMessage, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
427
445
 
428
446
  /**
429
447
  * Returns the current `FloPay` instance, or `null` if the provider
@@ -532,6 +550,21 @@ interface SplitCardFormProps {
532
550
  chv?: string;
533
551
  /** Additional CSS class for the form wrapper. */
534
552
  className?: string;
553
+ /**
554
+ * Final wording for the hosted card form's submit button — the control that
555
+ * starts the card payment — e.g. `'Pay $10'` (billing API v1.9.35+). Pass
556
+ * the final, already-localized plain text from your own order summary; the
557
+ * SDK does not format amounts or translate.
558
+ *
559
+ * Changes apply live without remounting the card form, so buyer-entered
560
+ * card details, focus, and caret are kept. Omitting it, passing `null`, or
561
+ * clearing it after a label was shown restores the hosted default
562
+ * (`CONFIRM PAYMENT`); blank, oversized, or invalid text also shows the
563
+ * default. It does not change wallet, PayPal, processing, or retry wording,
564
+ * the buttons-layout card tile (`cardButtonContent`), or the saved-payment
565
+ * confirm button (`FloPayCheckout`'s `confirmLabel`).
566
+ */
567
+ submitLabel?: string | null;
535
568
  /** External processing state. */
536
569
  isProcessing?: boolean;
537
570
  /** External error message. */
@@ -789,6 +822,15 @@ interface VaultCardFieldsProps {
789
822
  * `null` from the start) leaves the widget's own defaults untouched.
790
823
  */
791
824
  theme?: VaultCardThemeColors | null;
825
+ /**
826
+ * Final, already-localized wording for the hosted card form's submit button
827
+ * (e.g. `'Pay $10'`), billing API v1.9.35+. Applied live on change (no
828
+ * remount, buyer-entered card data kept). `null` is the same as omitting it:
829
+ * omitting or clearing it after a label was shown restores the session
830
+ * default (`CONFIRM PAYMENT`, or `ADD CARD` for card setup); blank text also
831
+ * shows the default.
832
+ */
833
+ submitLabel?: string | null;
792
834
  /**
793
835
  * Inline styles for the container the widget mounts into. Applied as a
794
836
  * whole declaration list in key order on every change (not diffed property
@@ -821,6 +863,6 @@ interface VaultCardFieldsProps {
821
863
  * {@link CardCaptureAdapter} and bridges its `ready` / `error` lifecycle events
822
864
  * back to the surrounding card form.
823
865
  */
824
- declare function VaultCardFields({ capture, html, messageToken, expectedOrigin, theme, containerStyle, onReady, onError, onValidation, }: VaultCardFieldsProps): React.ReactElement;
866
+ declare function VaultCardFields({ capture, html, messageToken, expectedOrigin, theme, submitLabel, containerStyle, onReady, onError, onValidation, }: VaultCardFieldsProps): React.ReactElement;
825
867
 
826
868
  export { type CheckoutState, DirectPayPalButton, type DirectPayPalButtonProps, type DirectPayPalInitializationState, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, SplitCardForm, type SplitCardFormProps, VaultCardFields, type VaultCardFieldsProps, useCheckout, useFloPay, usePayPalFloPay };
package/dist/index.d.ts CHANGED
@@ -374,6 +374,20 @@ interface FloPayCheckoutProps {
374
374
  cardPreFormSlot?: React.ReactNode;
375
375
  /** Layout for AVS fields: 'row' (side-by-side, default) or 'column' (stacked). */
376
376
  avsLayout?: 'row' | 'column';
377
+ /**
378
+ * Final wording for the hosted card form's submit button in full checkout
379
+ * (billing API v1.9.35+), e.g. `'Pay $10'`. Pass final, already-localized
380
+ * plain text from your own order summary — the SDK does not format amounts
381
+ * or translate. Updates apply live without remounting the card form or
382
+ * clearing entered card details; omitting or clearing it (or passing `null`
383
+ * or blank text) shows the hosted default, `CONFIRM PAYMENT`. Direct
384
+ * custom-layout children receive it unless they set their own `submitLabel`.
385
+ *
386
+ * Only the hosted card submit button changes: `confirmLabel` still owns the
387
+ * saved-payment confirm button, `cardButtonContent` the buttons-layout card
388
+ * tile, and wallet, PayPal, processing, and retry wording is unchanged.
389
+ */
390
+ submitLabel?: string | null;
377
391
  /** Additional CSS class for the wrapper. */
378
392
  className?: string;
379
393
  /** Seed an initial checkout error message for the rendered payment form. */
@@ -390,7 +404,11 @@ interface FloPayCheckoutProps {
390
404
  * - `'auto'` — auto-submit with saved PM, falls back to `'full'` on failure
391
405
  */
392
406
  checkoutMode?: CheckoutMode;
393
- /** Label for the confirm button in `confirm` mode. Default: `'Confirm Purchase'`. */
407
+ /**
408
+ * Label for the saved-payment confirm button in `confirm` mode. Default:
409
+ * `'Confirm Purchase'`. Full checkout's hosted card button uses
410
+ * {@link FloPayCheckoutProps.submitLabel} instead.
411
+ */
394
412
  confirmLabel?: string;
395
413
  /** Custom confirm button renderer for `confirm` mode. */
396
414
  renderConfirmButton?: (props: {
@@ -423,7 +441,7 @@ interface FloPayCheckoutProps {
423
441
  * />
424
442
  * ```
425
443
  */
426
- declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, className, initialErrorMessage, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
444
+ declare function FloPayCheckout({ sessionId: sessionIdProp, nonce: nonceProp, createSession: createSessionParams, billingApiUrl, telemetry, appearance: appearanceOverride, locale, loading: loadingNode, error: errorNode, onComplete, onError, onInstrument, onDecline, onCountryChange, onZipChange, showPayPal, showStripe, enabledPaymentMethods: enabledPaymentMethodsProp, showApplePay, showGooglePay, debug, layout, theme, buttonsTheme, buttonsStyles, cardButtonContent, cardBackButtonContent, cardTitleContent, showSecurityFooter: _showSecurityFooter, onButtonClick, onBeforeButtonClick, enableAVS, cardFieldOrder, cardPreFormSlot, avsLayout, submitLabel, className, initialErrorMessage, children, checkoutMode: checkoutModeProp, confirmLabel, renderConfirmButton, onSessionCompleted, }: FloPayCheckoutProps): React.ReactElement;
427
445
 
428
446
  /**
429
447
  * Returns the current `FloPay` instance, or `null` if the provider
@@ -532,6 +550,21 @@ interface SplitCardFormProps {
532
550
  chv?: string;
533
551
  /** Additional CSS class for the form wrapper. */
534
552
  className?: string;
553
+ /**
554
+ * Final wording for the hosted card form's submit button — the control that
555
+ * starts the card payment — e.g. `'Pay $10'` (billing API v1.9.35+). Pass
556
+ * the final, already-localized plain text from your own order summary; the
557
+ * SDK does not format amounts or translate.
558
+ *
559
+ * Changes apply live without remounting the card form, so buyer-entered
560
+ * card details, focus, and caret are kept. Omitting it, passing `null`, or
561
+ * clearing it after a label was shown restores the hosted default
562
+ * (`CONFIRM PAYMENT`); blank, oversized, or invalid text also shows the
563
+ * default. It does not change wallet, PayPal, processing, or retry wording,
564
+ * the buttons-layout card tile (`cardButtonContent`), or the saved-payment
565
+ * confirm button (`FloPayCheckout`'s `confirmLabel`).
566
+ */
567
+ submitLabel?: string | null;
535
568
  /** External processing state. */
536
569
  isProcessing?: boolean;
537
570
  /** External error message. */
@@ -789,6 +822,15 @@ interface VaultCardFieldsProps {
789
822
  * `null` from the start) leaves the widget's own defaults untouched.
790
823
  */
791
824
  theme?: VaultCardThemeColors | null;
825
+ /**
826
+ * Final, already-localized wording for the hosted card form's submit button
827
+ * (e.g. `'Pay $10'`), billing API v1.9.35+. Applied live on change (no
828
+ * remount, buyer-entered card data kept). `null` is the same as omitting it:
829
+ * omitting or clearing it after a label was shown restores the session
830
+ * default (`CONFIRM PAYMENT`, or `ADD CARD` for card setup); blank text also
831
+ * shows the default.
832
+ */
833
+ submitLabel?: string | null;
792
834
  /**
793
835
  * Inline styles for the container the widget mounts into. Applied as a
794
836
  * whole declaration list in key order on every change (not diffed property
@@ -821,6 +863,6 @@ interface VaultCardFieldsProps {
821
863
  * {@link CardCaptureAdapter} and bridges its `ready` / `error` lifecycle events
822
864
  * back to the surrounding card form.
823
865
  */
824
- declare function VaultCardFields({ capture, html, messageToken, expectedOrigin, theme, containerStyle, onReady, onError, onValidation, }: VaultCardFieldsProps): React.ReactElement;
866
+ declare function VaultCardFields({ capture, html, messageToken, expectedOrigin, theme, submitLabel, containerStyle, onReady, onError, onValidation, }: VaultCardFieldsProps): React.ReactElement;
825
867
 
826
868
  export { type CheckoutState, DirectPayPalButton, type DirectPayPalButtonProps, type DirectPayPalInitializationState, FloPayAutomaticPaymentButton, type FloPayAutomaticPaymentButtonProps, type FloPayAutomaticPaymentSuccessEvent, FloPayCheckout, type FloPayCheckoutProps, FloPayProvider, type FloPayProviderProps, SplitCardForm, type SplitCardFormProps, VaultCardFields, type VaultCardFieldsProps, useCheckout, useFloPay, usePayPalFloPay };