@flopay/react 1.9.28 → 1.9.30

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
@@ -487,7 +487,7 @@ export function ComposedCheckout({ session, nonce }: { session: CheckoutSession;
487
487
  | `children` | `ReactNode?` | Custom layout rendered instead of the default `SplitCardForm` |
488
488
  | `telemetry` | `boolean?` | Set `false` to opt out of operational telemetry |
489
489
  | `onComplete` | `(result: PaymentResult) => void` | Payment succeeded or was authorized |
490
- | `onDecline` | `(decline: DeclineEvent) => void` | A payment was declined or authentication failed |
490
+ | `onDecline` | `(decline: DeclineEvent) => void` | A payment was declined or authentication failed. The event carries `sessionId` when a session exists |
491
491
  | `onError` | `(error: FloPayError) => void` | A checkout error occurred |
492
492
  | `onSessionCompleted` | `(successUrl: string) => void` | The session was already completed |
493
493
  | `onButtonClick` | `(method: CheckoutButtonMethod) => void` | A payment method button was clicked |
@@ -543,8 +543,8 @@ Also accepts every standard `button` attribute, such as `onClick`, `disabled`, a
543
543
  | `theme` | `ThemeId?` | Theme for the button and its fallback checkout |
544
544
  | `appearance` / `buttonsStyles` | objects | Appearance overrides |
545
545
  | `onSuccess` | `(event: FloPayAutomaticPaymentSuccessEvent) => void` | Payment completed |
546
- | `onDecline` | `(decline: DeclineEvent) => void` | Payment declined |
547
- | `onError` | `(error: FloPayError) => void` | Payment or setup error |
546
+ | `onDecline` | `(decline: DeclineEvent) => void` | Payment declined. Carries the failed session's `sessionId` |
547
+ | `onError` | `(error: FloPayError) => void` | Payment or setup error. Carries `sessionId` when the failure happened after the session was created |
548
548
  | `children` | `ReactNode?` | Button content |
549
549
 
550
550
  ### SplitCardFormProps
@@ -628,6 +628,7 @@ Checkout errors reach `onError` (and the `error` render prop) as `FloPayError` v
628
628
  | `external_payment_method_failed` | `api_error` | A wallet, PayPal, or alternative method failed technically after the buyer clicked it. The chooser offers a retry. |
629
629
  | `InvalidCardSetupSurface` | `validation_error` | `FloPayCheckout` was given a card-setup session; use `FloPayCardSetup`. |
630
630
  | `three_ds_aborted` / `three_ds_timeout` | `api_error` | The buyer cancelled, or did not finish, the authentication challenge for a saved card in confirm or auto mode. |
631
+ | `checkout_processing_timeout` | `api_error` | The payment's outcome is not known yet: the SDK could not confirm it in time and it may still complete. Do not resubmit; reconcile from `payment.*` webhooks. `FloPayAutomaticPaymentButton` reports it through `onError`, not `onDecline`, shows a "don't pay again" notice under the button, and opens no fallback checkout. |
631
632
  | `stored_payment_method_unsupported` | `api_error` | The backend-selected saved method cannot be used for this transaction. Show the supplied buyer-safe instruction and let the buyer choose another method. |
632
633
  | `InvalidPaymentProcessResponse` | `api_error` | Saved-payment processing returned a response the SDK could not use. |
633
634