@flopay/react 1.20.4 → 1.20.5

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.
@@ -1,4 +1,5 @@
1
1
  import type { CheckoutRuntimeEvent } from '@flopay/js';
2
+ import type { PaymentMethodLayoutRules } from '@flopay/shared';
2
3
  import { FloPayError } from '@flopay/shared';
3
4
  import type { ReactElement } from 'react';
4
5
  export interface FloPayRuntimeCheckoutProps {
@@ -14,6 +15,12 @@ export interface FloPayRuntimeCheckoutProps {
14
15
  appearance?: Record<string, unknown>;
15
16
  /** Merchant wording overrides, applied by the runtime over the strings the API returns. */
16
17
  strings?: Record<string, string>;
18
+ /**
19
+ * The merchant's payment method layout rules. The runtime has the billing API resolve them
20
+ * for the buyer and lays out the payment method groups in that order, with the groups behind
21
+ * "More payment options"; without them the checkout keeps the 1.x default layout.
22
+ */
23
+ paymentMethodLayout?: PaymentMethodLayoutRules;
17
24
  /** The Flo-origin runtime script. */
18
25
  runtimeUrl: string;
19
26
  /** How long the runtime has to load before `onError` fires. Defaults to 10 seconds. */
@@ -26,6 +33,7 @@ export interface FloPayRuntimeCheckoutProps {
26
33
  * logic: it loads the runtime, mounts it in a container, passes its props through, relays the
27
34
  * runtime's events to `onEvent`, and reports a runtime that cannot load to `onError`.
28
35
  * A change to the session (`sessionId`, `nonce`, `createSession`), the key or the runtime
29
- * mounts the checkout again; `appearance` and `strings` update the mounted checkout.
36
+ * mounts the checkout again; `appearance`, `strings` and `paymentMethodLayout` update the
37
+ * mounted checkout.
30
38
  */
31
39
  export declare function FloPayRuntimeCheckout(props: FloPayRuntimeCheckoutProps): ReactElement;