@flopay/react 1.8.2 → 1.8.3

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
@@ -55,6 +55,25 @@ function CheckoutPage() {
55
55
 
56
56
  `FloPayCheckout` automatically fetches the session, initializes the correct payment providers, and renders a `SplitCardForm` with the hosted vault card widget plus the session's supported wallets, APMs, and PayPal. Customer data (email, userId, name) is injected from the session.
57
57
 
58
+ #### Buyer identity collection
59
+
60
+ For inline checkout creation, `createSession.account.userId` remains required,
61
+ but `email`, `firstName`, and `lastName` may be omitted. `FloPayCheckout`
62
+ creates a mountable session shell first, then collects and attaches the missing
63
+ identity before payment can continue:
64
+
65
+ - Hosted card checkout renders a required email field first, above name, AVS,
66
+ and the hosted card widget. Submit stays gated until the email passes the
67
+ shared `isValidEmail()` validator and a name is present.
68
+ - Apple Pay, Google Pay, other Stripe wallets, and PayPal use provider-returned
69
+ email/name automatically when available.
70
+ - A wallet, PayPal, or APM that does not return the missing fields opens a
71
+ required second pane for email/name before the SDK creates an intent or
72
+ processes payment.
73
+
74
+ The SDK never attaches a blank email. The merchant-supplied `userId` is not
75
+ replaced by provider data.
76
+
58
77
  #### Merchant instrument feed
59
78
 
60
79
  Use `onInstrument` on `FloPayCheckout` or `FloPayProvider` to forward a stable,
@@ -443,7 +462,7 @@ Skip the backend API route — create the session directly in the component:
443
462
  clientId: 'your-client-id',
444
463
  currency: 'EUR',
445
464
  items: [{ providerItemId: 'product-1', providerItemName: 'Widget', totalAmount: 29.99 }],
446
- account: { userId: 'user_1', email: 'user@example.com', firstName: 'Jane', lastName: 'Doe' },
465
+ account: { userId: 'user_1' }, // email and name are collected in checkout
447
466
  successUrl: '/success',
448
467
  cancelUrl: '/cancel',
449
468
  }}
@@ -451,7 +470,8 @@ Skip the backend API route — create the session directly in the component:
451
470
  />
452
471
  ```
453
472
 
454
- The component POSTs to the billing API, gets the full session back, and renders the form — zero backend code needed.
473
+ The component creates a lightweight shell, renders the form, and claims the
474
+ session after buyer identity is available — zero merchant backend code needed.
455
475
 
456
476
  #### Authorisation-only checkout
457
477