@flopay/react 1.2.1 → 1.2.4

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
@@ -324,6 +324,15 @@ interface CheckoutFormRef {
324
324
  interface CheckoutFormProps {
325
325
  /** The checkout session ID (UUID from billing API). */
326
326
  sessionId: string;
327
+ /**
328
+ * Session-bound checkout token returned by session creation
329
+ * (`CheckoutSessionResult.nonce` or `session.clientSecret`). Forwarded as
330
+ * `x-checkout-session-token` on every continuation request — required by
331
+ * post-#640 backends (`TeamFloPay/backend#640`), which 401 the call when the
332
+ * header is missing or does not match the session's stored nonce.
333
+ * `FloPayCheckout` plumbs this prop automatically.
334
+ */
335
+ nonce?: string;
327
336
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
328
337
  billingApiUrl?: string;
329
338
  /** User's email (required for creating payment intents). */
@@ -408,6 +417,13 @@ interface SplitCardFormRef {
408
417
  interface SplitCardFormProps {
409
418
  /** The checkout session ID (UUID from billing API). */
410
419
  sessionId: string;
420
+ /**
421
+ * Session-bound checkout token returned by session creation
422
+ * (`CheckoutSessionResult.nonce` or `session.clientSecret`). Forwarded as
423
+ * `x-checkout-session-token` on every continuation request — required by
424
+ * post-#640 backends. `FloPayCheckout` plumbs this prop automatically.
425
+ */
426
+ nonce?: string;
411
427
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
412
428
  billingApiUrl?: string;
413
429
  /** User's email (required for creating payment intents). */
@@ -620,6 +636,12 @@ declare const SplitCardForm: React.ForwardRefExoticComponent<SplitCardFormProps
620
636
  interface PayPalButtonProps {
621
637
  /** The checkout session ID (UUID from billing API). */
622
638
  sessionId: string;
639
+ /**
640
+ * Session-bound checkout token returned by session creation. Forwarded as
641
+ * `x-checkout-session-token` on continuation requests — required by
642
+ * post-#640 backends.
643
+ */
644
+ nonce?: string;
623
645
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
624
646
  billingApiUrl?: string;
625
647
  /** User's email. */
@@ -664,7 +686,7 @@ interface PayPalButtonProps {
664
686
  * </FloPayProvider>
665
687
  * ```
666
688
  */
667
- declare function PayPalButton({ sessionId, billingApiUrl, email, userId, firstName, lastName, chv, onTokenizedBody, onComplete, onErrorChange, isProcessing, }: PayPalButtonProps): React.ReactElement;
689
+ declare function PayPalButton({ sessionId, nonce, billingApiUrl, email, userId, firstName, lastName, chv, onTokenizedBody, onComplete, onErrorChange, isProcessing, }: PayPalButtonProps): React.ReactElement;
668
690
 
669
691
  /**
670
692
  * Overrides that `SplitCardForm`'s tokenized-body dispatcher uses to apply a
@@ -698,6 +720,12 @@ type DirectPayPalRunBeforeButtonClick = (method: CheckoutButtonMethod) => Promis
698
720
  interface DirectPayPalButtonProps {
699
721
  /** Checkout session ID. */
700
722
  sessionId: string;
723
+ /**
724
+ * Session-bound checkout token returned by session creation. Forwarded as
725
+ * `x-checkout-session-token` on every continuation request — required by
726
+ * post-#640 backends. `FloPayCheckout` plumbs this prop automatically.
727
+ */
728
+ nonce?: string;
701
729
  /** Billing API base URL. */
702
730
  billingApiUrl: string;
703
731
  /** Buyer email. */
@@ -768,7 +796,7 @@ interface DirectPayPalButtonProps {
768
796
  * rendered PayPal happens at the caller site based on whether the session
769
797
  * advertises `gateways.paypal.publishableKey`.
770
798
  */
771
- declare function DirectPayPalButton({ sessionId, billingApiUrl, email, clientId, environment, currency, isSubscription, onTokenizedBody, onComplete, onErrorChange, onDecline, isProcessing, onLoadStateChange, onButtonClick, runBeforeButtonClick, session, existingOrderId, debug, }: DirectPayPalButtonProps): React.ReactElement | null;
799
+ declare function DirectPayPalButton({ sessionId, nonce, billingApiUrl, email, clientId, environment, currency, isSubscription, onTokenizedBody, onComplete, onErrorChange, onDecline, isProcessing, onLoadStateChange, onButtonClick, runBeforeButtonClick, session, existingOrderId, debug, }: DirectPayPalButtonProps): React.ReactElement | null;
772
800
 
773
801
  interface FloPayAutomaticPaymentSuccessEvent {
774
802
  result: PaymentResult;
package/dist/index.d.ts CHANGED
@@ -324,6 +324,15 @@ interface CheckoutFormRef {
324
324
  interface CheckoutFormProps {
325
325
  /** The checkout session ID (UUID from billing API). */
326
326
  sessionId: string;
327
+ /**
328
+ * Session-bound checkout token returned by session creation
329
+ * (`CheckoutSessionResult.nonce` or `session.clientSecret`). Forwarded as
330
+ * `x-checkout-session-token` on every continuation request — required by
331
+ * post-#640 backends (`TeamFloPay/backend#640`), which 401 the call when the
332
+ * header is missing or does not match the session's stored nonce.
333
+ * `FloPayCheckout` plumbs this prop automatically.
334
+ */
335
+ nonce?: string;
327
336
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
328
337
  billingApiUrl?: string;
329
338
  /** User's email (required for creating payment intents). */
@@ -408,6 +417,13 @@ interface SplitCardFormRef {
408
417
  interface SplitCardFormProps {
409
418
  /** The checkout session ID (UUID from billing API). */
410
419
  sessionId: string;
420
+ /**
421
+ * Session-bound checkout token returned by session creation
422
+ * (`CheckoutSessionResult.nonce` or `session.clientSecret`). Forwarded as
423
+ * `x-checkout-session-token` on every continuation request — required by
424
+ * post-#640 backends. `FloPayCheckout` plumbs this prop automatically.
425
+ */
426
+ nonce?: string;
411
427
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
412
428
  billingApiUrl?: string;
413
429
  /** User's email (required for creating payment intents). */
@@ -620,6 +636,12 @@ declare const SplitCardForm: React.ForwardRefExoticComponent<SplitCardFormProps
620
636
  interface PayPalButtonProps {
621
637
  /** The checkout session ID (UUID from billing API). */
622
638
  sessionId: string;
639
+ /**
640
+ * Session-bound checkout token returned by session creation. Forwarded as
641
+ * `x-checkout-session-token` on continuation requests — required by
642
+ * post-#640 backends.
643
+ */
644
+ nonce?: string;
623
645
  /** Billing API base URL. Optional — defaults to the value from FloPayProvider or the shared constant. */
624
646
  billingApiUrl?: string;
625
647
  /** User's email. */
@@ -664,7 +686,7 @@ interface PayPalButtonProps {
664
686
  * </FloPayProvider>
665
687
  * ```
666
688
  */
667
- declare function PayPalButton({ sessionId, billingApiUrl, email, userId, firstName, lastName, chv, onTokenizedBody, onComplete, onErrorChange, isProcessing, }: PayPalButtonProps): React.ReactElement;
689
+ declare function PayPalButton({ sessionId, nonce, billingApiUrl, email, userId, firstName, lastName, chv, onTokenizedBody, onComplete, onErrorChange, isProcessing, }: PayPalButtonProps): React.ReactElement;
668
690
 
669
691
  /**
670
692
  * Overrides that `SplitCardForm`'s tokenized-body dispatcher uses to apply a
@@ -698,6 +720,12 @@ type DirectPayPalRunBeforeButtonClick = (method: CheckoutButtonMethod) => Promis
698
720
  interface DirectPayPalButtonProps {
699
721
  /** Checkout session ID. */
700
722
  sessionId: string;
723
+ /**
724
+ * Session-bound checkout token returned by session creation. Forwarded as
725
+ * `x-checkout-session-token` on every continuation request — required by
726
+ * post-#640 backends. `FloPayCheckout` plumbs this prop automatically.
727
+ */
728
+ nonce?: string;
701
729
  /** Billing API base URL. */
702
730
  billingApiUrl: string;
703
731
  /** Buyer email. */
@@ -768,7 +796,7 @@ interface DirectPayPalButtonProps {
768
796
  * rendered PayPal happens at the caller site based on whether the session
769
797
  * advertises `gateways.paypal.publishableKey`.
770
798
  */
771
- declare function DirectPayPalButton({ sessionId, billingApiUrl, email, clientId, environment, currency, isSubscription, onTokenizedBody, onComplete, onErrorChange, onDecline, isProcessing, onLoadStateChange, onButtonClick, runBeforeButtonClick, session, existingOrderId, debug, }: DirectPayPalButtonProps): React.ReactElement | null;
799
+ declare function DirectPayPalButton({ sessionId, nonce, billingApiUrl, email, clientId, environment, currency, isSubscription, onTokenizedBody, onComplete, onErrorChange, onDecline, isProcessing, onLoadStateChange, onButtonClick, runBeforeButtonClick, session, existingOrderId, debug, }: DirectPayPalButtonProps): React.ReactElement | null;
772
800
 
773
801
  interface FloPayAutomaticPaymentSuccessEvent {
774
802
  result: PaymentResult;