@flopay/react 1.4.18 → 1.4.20

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
@@ -356,6 +356,41 @@ Skip the backend API route — create the session directly in the component:
356
356
 
357
357
  The component POSTs to the billing API, gets the full session back, and renders the form — zero backend code needed.
358
358
 
359
+ #### Authorisation-only checkout
360
+
361
+ Set `captureMethod: 'manual'` in the same `createSession` draft for an eligible
362
+ item-only card checkout:
363
+
364
+ ```tsx
365
+ <FloPayCheckout
366
+ createSession={{
367
+ clientId: 'your-client-id',
368
+ captureMethod: 'manual',
369
+ currency: 'EUR',
370
+ items: [{ code: 'order_123', totalAmount: 29.99 }],
371
+ account: { userId: 'user_1', email: 'user@example.com' },
372
+ successUrl: '/success',
373
+ cancelUrl: '/cancel',
374
+ }}
375
+ onComplete={(result) => {
376
+ if (result.status === 'authorized') {
377
+ saveAuthorisation({
378
+ paymentId: result.paymentId,
379
+ sessionId: result.sessionId,
380
+ expiresAt: result.authorizationExpiresAt,
381
+ });
382
+ }
383
+ }}
384
+ onSessionCompleted={(successUrl) => router.push(successUrl)}
385
+ />
386
+ ```
387
+
388
+ The component still releases the buyer to the success experience, but its
389
+ overlay says `PAYMENT AUTHORISED`. `authorized` means funds are held, not paid.
390
+ Capture remains a merchant-authenticated REST operation and is never available
391
+ to browser code. Manual capture is rejected for subscription carts. See the
392
+ repository's [pre-authorisation guide](../../docs/PREAUTHORIZATION.md).
393
+
359
394
  That create POST sends a stable `Idempotency-Key` header automatically whenever a
360
395
  secure RNG is available. `FloPayCheckout` resolves the key once per logical
361
396
  checkout, stores it with the inline-session cache in `sessionStorage`, and reuses
@@ -785,6 +820,16 @@ Stripe and PayPal SDK load/runtime failures emit `provider_runtime`. Inline
785
820
  `validation_rejected` / `payment_declined` outcomes and never carry
786
821
  `failureCategory`.
787
822
 
823
+ The same classification applies to React-owned saved-payment processing in
824
+ `auto` and `confirm` modes. An ordinary saved-payment `400` decline, a
825
+ structured-field `400`, or a `422` still falls back to the usable full checkout
826
+ and emits `operation.fallback`, but reports only the matching
827
+ `payment_declined` or `validation_rejected` outcome. Genuine server,
828
+ transport, malformed-response, and provider-runtime failures remain
829
+ categorized technical errors. This does not change fallback rendering or
830
+ merchant callback behavior, and no response body, provider payload, session
831
+ value, payment data, or raw error message is added to telemetry.
832
+
788
833
  ### SplitCardFormProps
789
834
 
790
835
  Key payment-surface props include: