@payos-inc/payos-react 1.0.42 → 1.2.0-staging.91
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/LICENSE +96 -0
- package/README.md +160 -0
- package/dist/THIRD_PARTY_NOTICES.txt +549 -0
- package/dist/payos-react.cjs +50 -0
- package/dist/payos-react.css +1 -1
- package/dist/payos-react.esm.js +17 -11
- package/dist/payos-react.min.js +2 -1
- package/dist/payos-react.mjs +50 -0
- package/dist/types/index.d.ts +1 -57
- package/dist/types/payos-passkey-js/src/api/ApiClient.d.ts +48 -0
- package/dist/types/payos-passkey-js/src/core/PayOSPasskey.d.ts +114 -0
- package/dist/types/payos-passkey-js/src/core/types.d.ts +100 -0
- package/dist/types/payos-passkey-js/src/index.d.ts +9 -0
- package/dist/types/payos-passkey-js/src/services/mastercard/MastercardSDKService.d.ts +61 -0
- package/dist/types/payos-passkey-js/src/services/visa/VisaSDKService.d.ts +90 -0
- package/dist/types/payos-passkey-js/src/utils/diagnostics.d.ts +30 -0
- package/dist/types/payos-passkey-js/src/utils/logger.d.ts +36 -0
- package/dist/{components → types/payos-react/src/components}/payos/ActiveCardWidget.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/AgentRegistrationFlow.d.ts +1 -3
- package/dist/{components → types/payos-react/src/components}/payos/ConnectStripeLinkButton.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/IdentityVerificationFlow.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/LinkPaymentFlow.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/LinkSessionContent.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/PayOSFooter.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/PayWithLinkButton.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/PaymentMethodRow.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/PaymentSheet.d.ts +3 -4
- package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetContent.d.ts +6 -4
- package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetPaymentFlow.d.ts +4 -2
- package/dist/{components → types/payos-react/src/components}/payos/PaymentSheetShell.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetStatusViews.d.ts +3 -2
- package/dist/types/{components → payos-react/src/components}/payos/PriceTag.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/ReceiptPanel.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/ViewHeader.d.ts +2 -1
- package/dist/types/{components → payos-react/src/components}/payos/drawer.d.ts +5 -2
- package/dist/{components → types/payos-react/src/components}/payos/order-summary.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/otp-input.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/phone-input.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/themeMode.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetDisplayData.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetLifecycle.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToAuth.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToLink.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/AgentRegistrationView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/CardAddView.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/payos/views/CheckoutView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/IdentityView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/LinkBrand.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/LinkCheckoutView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/LinkConnectView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/LinkDeniedView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/LinkLoadingView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/LinkSuccessView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/ManageThirdPartyView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/MethodListView.d.ts +8 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/OTPView.d.ts +0 -1
- package/dist/types/payos-react/src/components/payos/views/ShareCardsView.d.ts +28 -0
- package/dist/types/{components → payos-react/src/components}/payos/views/SuccessView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/VisaIframeView.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/payos/views/VisaMethodView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/VisaOtpView.d.ts +0 -1
- package/dist/{components → types/payos-react/src/components}/payos/views/WelcomeBackView.d.ts +0 -1
- package/dist/types/payos-react/src/components/ui/CardArt.d.ts +22 -0
- package/dist/types/{components → payos-react/src/components}/ui/CardBrandIcon.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/ui/ConfirmDialog.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/ui/DigitalCard.d.ts +0 -1
- package/dist/types/payos-react/src/components/ui/HelpPopover.d.ts +17 -0
- package/dist/types/{components → payos-react/src/components}/ui/button.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/ui/card.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/ui/input.d.ts +0 -1
- package/dist/types/{components → payos-react/src/components}/ui/label.d.ts +1 -2
- package/dist/types/{components → payos-react/src/components}/ui/separator.d.ts +0 -1
- package/dist/{hooks → types/payos-react/src/hooks}/useBiometricType.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useBodyScrollLock.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useCardElement.d.ts +1 -2
- package/dist/types/{hooks → payos-react/src/hooks}/useLinkAuth.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useLinkDeviceAuthPoll.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useLinkMethods.d.ts +0 -1
- package/dist/{hooks → types/payos-react/src/hooks}/useLinkSession.d.ts +0 -1
- package/dist/{hooks → types/payos-react/src/hooks}/useLinkSpendStatusPoll.d.ts +0 -1
- package/dist/types/{hooks → payos-react/src/hooks}/usePasskeySDK.d.ts +2 -4
- package/dist/{hooks → types/payos-react/src/hooks}/useSession.d.ts +14 -1
- package/dist/types/{hooks → payos-react/src/hooks}/useVisualViewport.d.ts +0 -1
- package/dist/{index.d.ts → types/payos-react/src/index.d.ts} +3 -4
- package/dist/{lib → types/payos-react/src/lib}/utils.d.ts +0 -1
- package/dist/{services → types/payos-react/src/services}/apiService.d.ts +12 -2
- package/dist/{services → types/payos-react/src/services}/linkTokenService.d.ts +0 -1
- package/dist/types/{cardElement.d.ts → payos-react/src/types/cardElement.d.ts} +2 -3
- package/dist/types/{drawer.d.ts → payos-react/src/types/drawer.d.ts} +0 -1
- package/dist/types/{types → payos-react/src/types}/index.d.ts +0 -1
- package/dist/types/{order.d.ts → payos-react/src/types/order.d.ts} +0 -1
- package/dist/types/{types → payos-react/src/types}/payment.d.ts +1 -2
- package/dist/types/{session.d.ts → payos-react/src/types/session.d.ts} +17 -1
- package/dist/types/{utils → payos-react/src/utils}/credentialStatus.d.ts +0 -1
- package/dist/{utils → types/payos-react/src/utils}/deviceFingerprint.d.ts +0 -1
- package/dist/types/{utils → payos-react/src/utils}/environment.d.ts +0 -1
- package/dist/{utils → types/payos-react/src/utils}/formatting.d.ts +0 -1
- package/dist/types/{utils → payos-react/src/utils}/linkPopup.d.ts +0 -1
- package/dist/types/payos-react/src/utils/organizationName.d.ts +8 -0
- package/dist/types/{utils → payos-react/src/utils}/selectCard.d.ts +0 -1
- package/dist/types/{utils → payos-react/src/utils}/text.d.ts +0 -1
- package/dist/{utils → types/payos-react/src/utils}/validation.d.ts +0 -1
- package/package.json +38 -13
- package/dist/components/identity/IdentityBar.d.ts +0 -8
- package/dist/components/identity/IdentityBar.d.ts.map +0 -1
- package/dist/components/order/OrderSummaryAccordion.d.ts +0 -9
- package/dist/components/order/OrderSummaryAccordion.d.ts.map +0 -1
- package/dist/components/order/ShipmentCard.d.ts +0 -8
- package/dist/components/order/ShipmentCard.d.ts.map +0 -1
- package/dist/components/payos/ActiveCardWidget.d.ts.map +0 -1
- package/dist/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
- package/dist/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
- package/dist/components/payos/IdentityVerificationFlow.d.ts +0 -26
- package/dist/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
- package/dist/components/payos/LinkPaymentFlow.d.ts.map +0 -1
- package/dist/components/payos/LinkSessionContent.d.ts.map +0 -1
- package/dist/components/payos/PayOSFooter.d.ts +0 -25
- package/dist/components/payos/PayOSFooter.d.ts.map +0 -1
- package/dist/components/payos/PayWithLinkButton.d.ts +0 -74
- package/dist/components/payos/PayWithLinkButton.d.ts.map +0 -1
- package/dist/components/payos/PaymentMethodRow.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheet.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetContent.d.ts +0 -80
- package/dist/components/payos/PaymentSheetContent.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetPaymentFlow.d.ts +0 -43
- package/dist/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetShell.d.ts.map +0 -1
- package/dist/components/payos/PaymentSheetStatusViews.d.ts +0 -28
- package/dist/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
- package/dist/components/payos/PriceTag.d.ts +0 -64
- package/dist/components/payos/PriceTag.d.ts.map +0 -1
- package/dist/components/payos/ReceiptPanel.d.ts +0 -67
- package/dist/components/payos/ReceiptPanel.d.ts.map +0 -1
- package/dist/components/payos/ViewHeader.d.ts +0 -9
- package/dist/components/payos/ViewHeader.d.ts.map +0 -1
- package/dist/components/payos/drawer.d.ts +0 -107
- package/dist/components/payos/drawer.d.ts.map +0 -1
- package/dist/components/payos/order-summary.d.ts.map +0 -1
- package/dist/components/payos/otp-input.d.ts.map +0 -1
- package/dist/components/payos/phone-input.d.ts +0 -30
- package/dist/components/payos/phone-input.d.ts.map +0 -1
- package/dist/components/payos/themeMode.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetDebug.d.ts +0 -22
- package/dist/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetDisplayData.d.ts +0 -29
- package/dist/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetLifecycle.d.ts +0 -39
- package/dist/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
- package/dist/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
- package/dist/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
- package/dist/components/payos/views/CardAddView.d.ts +0 -101
- package/dist/components/payos/views/CardAddView.d.ts.map +0 -1
- package/dist/components/payos/views/CheckoutView.d.ts +0 -95
- package/dist/components/payos/views/CheckoutView.d.ts.map +0 -1
- package/dist/components/payos/views/IdentityView.d.ts +0 -51
- package/dist/components/payos/views/IdentityView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkBrand.d.ts.map +0 -1
- package/dist/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkConnectView.d.ts +0 -18
- package/dist/components/payos/views/LinkConnectView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkDeniedView.d.ts +0 -13
- package/dist/components/payos/views/LinkDeniedView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkLoadingView.d.ts.map +0 -1
- package/dist/components/payos/views/LinkSuccessView.d.ts +0 -11
- package/dist/components/payos/views/LinkSuccessView.d.ts.map +0 -1
- package/dist/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
- package/dist/components/payos/views/MethodListView.d.ts.map +0 -1
- package/dist/components/payos/views/OTPView.d.ts +0 -69
- package/dist/components/payos/views/OTPView.d.ts.map +0 -1
- package/dist/components/payos/views/SuccessView.d.ts +0 -49
- package/dist/components/payos/views/SuccessView.d.ts.map +0 -1
- package/dist/components/payos/views/VisaIframeView.d.ts.map +0 -1
- package/dist/components/payos/views/VisaMethodView.d.ts +0 -23
- package/dist/components/payos/views/VisaMethodView.d.ts.map +0 -1
- package/dist/components/payos/views/VisaOtpView.d.ts.map +0 -1
- package/dist/components/payos/views/WelcomeBackView.d.ts.map +0 -1
- package/dist/components/ui/CardBrandIcon.d.ts +0 -10
- package/dist/components/ui/CardBrandIcon.d.ts.map +0 -1
- package/dist/components/ui/ConfirmDialog.d.ts +0 -25
- package/dist/components/ui/ConfirmDialog.d.ts.map +0 -1
- package/dist/components/ui/DigitalCard.d.ts +0 -13
- package/dist/components/ui/DigitalCard.d.ts.map +0 -1
- package/dist/components/ui/InfoTooltip.d.ts +0 -8
- package/dist/components/ui/InfoTooltip.d.ts.map +0 -1
- package/dist/components/ui/PinInput.d.ts +0 -12
- package/dist/components/ui/PinInput.d.ts.map +0 -1
- package/dist/components/ui/button.d.ts +0 -14
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/card.d.ts +0 -15
- package/dist/components/ui/card.d.ts.map +0 -1
- package/dist/components/ui/input.d.ts +0 -6
- package/dist/components/ui/input.d.ts.map +0 -1
- package/dist/components/ui/label.d.ts +0 -6
- package/dist/components/ui/label.d.ts.map +0 -1
- package/dist/components/ui/separator.d.ts +0 -5
- package/dist/components/ui/separator.d.ts.map +0 -1
- package/dist/hooks/index.d.ts +0 -8
- package/dist/hooks/index.d.ts.map +0 -1
- package/dist/hooks/useBiometricType.d.ts.map +0 -1
- package/dist/hooks/useBodyScrollLock.d.ts +0 -32
- package/dist/hooks/useBodyScrollLock.d.ts.map +0 -1
- package/dist/hooks/useCardElement.d.ts +0 -135
- package/dist/hooks/useCardElement.d.ts.map +0 -1
- package/dist/hooks/useCheckoutFlow.d.ts +0 -29
- package/dist/hooks/useCheckoutFlow.d.ts.map +0 -1
- package/dist/hooks/useDrawerState.d.ts +0 -4
- package/dist/hooks/useDrawerState.d.ts.map +0 -1
- package/dist/hooks/useLinkAuth.d.ts +0 -24
- package/dist/hooks/useLinkAuth.d.ts.map +0 -1
- package/dist/hooks/useLinkDeviceAuthPoll.d.ts +0 -29
- package/dist/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
- package/dist/hooks/useLinkMethods.d.ts +0 -28
- package/dist/hooks/useLinkMethods.d.ts.map +0 -1
- package/dist/hooks/useLinkSession.d.ts.map +0 -1
- package/dist/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
- package/dist/hooks/usePasskeySDK.d.ts +0 -103
- package/dist/hooks/usePasskeySDK.d.ts.map +0 -1
- package/dist/hooks/useSession.d.ts.map +0 -1
- package/dist/hooks/useVisualViewport.d.ts +0 -15
- package/dist/hooks/useVisualViewport.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/theme.d.ts +0 -53
- package/dist/lib/theme.d.ts.map +0 -1
- package/dist/lib/utils.d.ts.map +0 -1
- package/dist/mocks/index.d.ts +0 -3
- package/dist/mocks/index.d.ts.map +0 -1
- package/dist/mocks/mockCheckoutFlow.d.ts +0 -25
- package/dist/mocks/mockCheckoutFlow.d.ts.map +0 -1
- package/dist/mocks/mockData.d.ts +0 -6
- package/dist/mocks/mockData.d.ts.map +0 -1
- package/dist/mocks/mockSessionData.d.ts +0 -38
- package/dist/mocks/mockSessionData.d.ts.map +0 -1
- package/dist/services/apiService.d.ts.map +0 -1
- package/dist/services/linkTokenService.d.ts.map +0 -1
- package/dist/services/mockSessionService.d.ts +0 -65
- package/dist/services/mockSessionService.d.ts.map +0 -1
- package/dist/types/cardElement.d.ts.map +0 -1
- package/dist/types/components/identity/IdentityBar.d.ts +0 -8
- package/dist/types/components/identity/IdentityBar.d.ts.map +0 -1
- package/dist/types/components/order/OrderSummaryAccordion.d.ts +0 -9
- package/dist/types/components/order/OrderSummaryAccordion.d.ts.map +0 -1
- package/dist/types/components/order/ShipmentCard.d.ts +0 -8
- package/dist/types/components/order/ShipmentCard.d.ts.map +0 -1
- package/dist/types/components/payos/ActiveCardWidget.d.ts +0 -60
- package/dist/types/components/payos/ActiveCardWidget.d.ts.map +0 -1
- package/dist/types/components/payos/AgentRegistrationFlow.d.ts +0 -24
- package/dist/types/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
- package/dist/types/components/payos/ConnectStripeLinkButton.d.ts +0 -41
- package/dist/types/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
- package/dist/types/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
- package/dist/types/components/payos/LinkPaymentFlow.d.ts +0 -11
- package/dist/types/components/payos/LinkPaymentFlow.d.ts.map +0 -1
- package/dist/types/components/payos/LinkSessionContent.d.ts +0 -19
- package/dist/types/components/payos/LinkSessionContent.d.ts.map +0 -1
- package/dist/types/components/payos/PayOSFooter.d.ts.map +0 -1
- package/dist/types/components/payos/PayWithLinkButton.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentMethodRow.d.ts +0 -53
- package/dist/types/components/payos/PaymentMethodRow.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheet.d.ts +0 -121
- package/dist/types/components/payos/PaymentSheet.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetContent.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetShell.d.ts +0 -25
- package/dist/types/components/payos/PaymentSheetShell.d.ts.map +0 -1
- package/dist/types/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
- package/dist/types/components/payos/PriceTag.d.ts.map +0 -1
- package/dist/types/components/payos/ReceiptPanel.d.ts.map +0 -1
- package/dist/types/components/payos/ViewHeader.d.ts.map +0 -1
- package/dist/types/components/payos/drawer.d.ts.map +0 -1
- package/dist/types/components/payos/order-summary.d.ts +0 -44
- package/dist/types/components/payos/order-summary.d.ts.map +0 -1
- package/dist/types/components/payos/otp-input.d.ts +0 -45
- package/dist/types/components/payos/otp-input.d.ts.map +0 -1
- package/dist/types/components/payos/phone-input.d.ts.map +0 -1
- package/dist/types/components/payos/themeMode.d.ts +0 -6
- package/dist/types/components/payos/themeMode.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetDebug.d.ts +0 -22
- package/dist/types/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts +0 -18
- package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
- package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts +0 -14
- package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
- package/dist/types/components/payos/views/AgentRegistrationView.d.ts +0 -61
- package/dist/types/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
- package/dist/types/components/payos/views/CardAddView.d.ts.map +0 -1
- package/dist/types/components/payos/views/CheckoutView.d.ts.map +0 -1
- package/dist/types/components/payos/views/IdentityView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkBrand.d.ts +0 -13
- package/dist/types/components/payos/views/LinkBrand.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkCheckoutView.d.ts +0 -31
- package/dist/types/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkConnectView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkDeniedView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkLoadingView.d.ts +0 -11
- package/dist/types/components/payos/views/LinkLoadingView.d.ts.map +0 -1
- package/dist/types/components/payos/views/LinkSuccessView.d.ts.map +0 -1
- package/dist/types/components/payos/views/ManageThirdPartyView.d.ts +0 -19
- package/dist/types/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
- package/dist/types/components/payos/views/MethodListView.d.ts +0 -116
- package/dist/types/components/payos/views/MethodListView.d.ts.map +0 -1
- package/dist/types/components/payos/views/OTPView.d.ts.map +0 -1
- package/dist/types/components/payos/views/SuccessView.d.ts.map +0 -1
- package/dist/types/components/payos/views/VisaIframeView.d.ts +0 -16
- package/dist/types/components/payos/views/VisaIframeView.d.ts.map +0 -1
- package/dist/types/components/payos/views/VisaMethodView.d.ts.map +0 -1
- package/dist/types/components/payos/views/VisaOtpView.d.ts +0 -45
- package/dist/types/components/payos/views/VisaOtpView.d.ts.map +0 -1
- package/dist/types/components/payos/views/WelcomeBackView.d.ts +0 -34
- package/dist/types/components/payos/views/WelcomeBackView.d.ts.map +0 -1
- package/dist/types/components/ui/CardBrandIcon.d.ts.map +0 -1
- package/dist/types/components/ui/ConfirmDialog.d.ts.map +0 -1
- package/dist/types/components/ui/DigitalCard.d.ts.map +0 -1
- package/dist/types/components/ui/InfoTooltip.d.ts +0 -8
- package/dist/types/components/ui/InfoTooltip.d.ts.map +0 -1
- package/dist/types/components/ui/PinInput.d.ts +0 -12
- package/dist/types/components/ui/PinInput.d.ts.map +0 -1
- package/dist/types/components/ui/button.d.ts.map +0 -1
- package/dist/types/components/ui/card.d.ts.map +0 -1
- package/dist/types/components/ui/input.d.ts.map +0 -1
- package/dist/types/components/ui/label.d.ts.map +0 -1
- package/dist/types/components/ui/separator.d.ts.map +0 -1
- package/dist/types/drawer.d.ts.map +0 -1
- package/dist/types/hooks/index.d.ts +0 -8
- package/dist/types/hooks/index.d.ts.map +0 -1
- package/dist/types/hooks/useBiometricType.d.ts +0 -21
- package/dist/types/hooks/useBiometricType.d.ts.map +0 -1
- package/dist/types/hooks/useBodyScrollLock.d.ts.map +0 -1
- package/dist/types/hooks/useCardElement.d.ts.map +0 -1
- package/dist/types/hooks/useCheckoutFlow.d.ts +0 -29
- package/dist/types/hooks/useCheckoutFlow.d.ts.map +0 -1
- package/dist/types/hooks/useDrawerState.d.ts +0 -4
- package/dist/types/hooks/useDrawerState.d.ts.map +0 -1
- package/dist/types/hooks/useLinkAuth.d.ts.map +0 -1
- package/dist/types/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
- package/dist/types/hooks/useLinkMethods.d.ts.map +0 -1
- package/dist/types/hooks/useLinkSession.d.ts +0 -81
- package/dist/types/hooks/useLinkSession.d.ts.map +0 -1
- package/dist/types/hooks/useLinkSpendStatusPoll.d.ts +0 -28
- package/dist/types/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
- package/dist/types/hooks/usePasskeySDK.d.ts.map +0 -1
- package/dist/types/hooks/useSession.d.ts +0 -87
- package/dist/types/hooks/useSession.d.ts.map +0 -1
- package/dist/types/hooks/useVisualViewport.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/theme.d.ts +0 -53
- package/dist/types/lib/theme.d.ts.map +0 -1
- package/dist/types/lib/utils.d.ts +0 -3
- package/dist/types/lib/utils.d.ts.map +0 -1
- package/dist/types/mocks/index.d.ts +0 -3
- package/dist/types/mocks/index.d.ts.map +0 -1
- package/dist/types/mocks/mockCheckoutFlow.d.ts +0 -25
- package/dist/types/mocks/mockCheckoutFlow.d.ts.map +0 -1
- package/dist/types/mocks/mockData.d.ts +0 -6
- package/dist/types/mocks/mockData.d.ts.map +0 -1
- package/dist/types/mocks/mockSessionData.d.ts +0 -38
- package/dist/types/mocks/mockSessionData.d.ts.map +0 -1
- package/dist/types/order.d.ts.map +0 -1
- package/dist/types/payment.d.ts +0 -55
- package/dist/types/payment.d.ts.map +0 -1
- package/dist/types/services/apiService.d.ts +0 -406
- package/dist/types/services/apiService.d.ts.map +0 -1
- package/dist/types/services/linkTokenService.d.ts +0 -7
- package/dist/types/services/linkTokenService.d.ts.map +0 -1
- package/dist/types/services/mockSessionService.d.ts +0 -65
- package/dist/types/services/mockSessionService.d.ts.map +0 -1
- package/dist/types/session.d.ts.map +0 -1
- package/dist/types/types/cardElement.d.ts +0 -157
- package/dist/types/types/cardElement.d.ts.map +0 -1
- package/dist/types/types/drawer.d.ts +0 -33
- package/dist/types/types/drawer.d.ts.map +0 -1
- package/dist/types/types/index.d.ts.map +0 -1
- package/dist/types/types/order.d.ts +0 -25
- package/dist/types/types/order.d.ts.map +0 -1
- package/dist/types/types/payment.d.ts.map +0 -1
- package/dist/types/types/session.d.ts +0 -165
- package/dist/types/types/session.d.ts.map +0 -1
- package/dist/types/utils/credentialStatus.d.ts.map +0 -1
- package/dist/types/utils/deviceFingerprint.d.ts +0 -27
- package/dist/types/utils/deviceFingerprint.d.ts.map +0 -1
- package/dist/types/utils/environment.d.ts.map +0 -1
- package/dist/types/utils/formatting.d.ts +0 -41
- package/dist/types/utils/formatting.d.ts.map +0 -1
- package/dist/types/utils/index.d.ts +0 -4
- package/dist/types/utils/index.d.ts.map +0 -1
- package/dist/types/utils/linkFormat.d.ts +0 -17
- package/dist/types/utils/linkFormat.d.ts.map +0 -1
- package/dist/types/utils/linkPopup.d.ts.map +0 -1
- package/dist/types/utils/selectCard.d.ts.map +0 -1
- package/dist/types/utils/text.d.ts.map +0 -1
- package/dist/types/utils/validation.d.ts +0 -90
- package/dist/types/utils/validation.d.ts.map +0 -1
- package/dist/utils/credentialStatus.d.ts +0 -8
- package/dist/utils/credentialStatus.d.ts.map +0 -1
- package/dist/utils/deviceFingerprint.d.ts.map +0 -1
- package/dist/utils/environment.d.ts +0 -22
- package/dist/utils/environment.d.ts.map +0 -1
- package/dist/utils/formatting.d.ts.map +0 -1
- package/dist/utils/index.d.ts +0 -4
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/linkFormat.d.ts +0 -17
- package/dist/utils/linkFormat.d.ts.map +0 -1
- package/dist/utils/linkPopup.d.ts +0 -19
- package/dist/utils/linkPopup.d.ts.map +0 -1
- package/dist/utils/selectCard.d.ts +0 -18
- package/dist/utils/selectCard.d.ts.map +0 -1
- package/dist/utils/text.d.ts +0 -12
- package/dist/utils/text.d.ts.map +0 -1
- package/dist/utils/validation.d.ts.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
PayOS React SDK Commercial License
|
|
2
|
+
Copyright (c) 2026 PayOS Inc. All Rights Reserved.
|
|
3
|
+
|
|
4
|
+
SCOPE:
|
|
5
|
+
This license applies to the PayOS-owned code and accompanying documentation
|
|
6
|
+
in @payos-inc/payos-react (the "Software"). The Software is proprietary and
|
|
7
|
+
licensed, not sold. Public availability does not grant rights beyond those
|
|
8
|
+
expressly stated in this license. Third-party components are addressed below.
|
|
9
|
+
|
|
10
|
+
PERMITTED USE:
|
|
11
|
+
Subject to this license, PayOS Inc. grants you a limited, non-exclusive,
|
|
12
|
+
royalty-free license to:
|
|
13
|
+
1. Download, copy, inspect, and run the Software to evaluate, develop, test,
|
|
14
|
+
and integrate applications that use PayOS services.
|
|
15
|
+
2. Bundle, minify, transpile, tree-shake, and make other build-time
|
|
16
|
+
transformations reasonably necessary to integrate the Software into
|
|
17
|
+
those applications.
|
|
18
|
+
3. Reproduce, host, and distribute the Software, including those transformed
|
|
19
|
+
versions, as an integrated part of your applications, including delivery
|
|
20
|
+
to end users' browsers and through your hosting providers or CDNs.
|
|
21
|
+
End users may execute those copies as part of using your applications;
|
|
22
|
+
this does not grant rights to redistribute the SDK separately.
|
|
23
|
+
|
|
24
|
+
Downloading, inspecting, and local evaluation with mocks do not require a
|
|
25
|
+
PayOS account or API credentials. Access to PayOS sandbox or production
|
|
26
|
+
services requires the account, credentials, permissions, and acceptance of
|
|
27
|
+
service terms applicable to that environment. SDK license rights do not
|
|
28
|
+
waive service fees or grant access to any PayOS service.
|
|
29
|
+
|
|
30
|
+
Preserve this license and applicable copyright and attribution notices in
|
|
31
|
+
distributed copies, either in the bundle or in an accompanying license or
|
|
32
|
+
third-party notices file delivered with the application. Build transformations
|
|
33
|
+
may relocate notices to that file but must not omit them.
|
|
34
|
+
|
|
35
|
+
RESTRICTIONS:
|
|
36
|
+
Except as expressly permitted above, by a separate written agreement with
|
|
37
|
+
PayOS, or by applicable law, you may not:
|
|
38
|
+
- Redistribute, republish, sell, lease, rent, lend, or sublicense the Software
|
|
39
|
+
as a standalone SDK, library, package, or competing product.
|
|
40
|
+
- Modify or create derivative works of the Software beyond the permitted
|
|
41
|
+
integration and build transformations, or reverse engineer, decompile,
|
|
42
|
+
or disassemble it. Inspection permitted above is not prohibited.
|
|
43
|
+
- Remove proprietary notices without preserving them as described above,
|
|
44
|
+
or misrepresent the Software's origin or ownership.
|
|
45
|
+
- Circumvent PayOS authentication, authorization, usage limits, or other
|
|
46
|
+
service controls, or use the Software to access services without permission.
|
|
47
|
+
- Use the Software for competitive analysis or benchmarking, or in violation
|
|
48
|
+
of applicable law.
|
|
49
|
+
|
|
50
|
+
INTELLECTUAL PROPERTY:
|
|
51
|
+
PayOS Inc. retains all rights, title, and interest in and to the Software,
|
|
52
|
+
excluding third-party components. All rights not expressly granted are
|
|
53
|
+
reserved. This license does not grant rights to PayOS trademarks except for
|
|
54
|
+
displaying notices or branding included in the Software as supplied.
|
|
55
|
+
|
|
56
|
+
THIRD-PARTY COMPONENTS:
|
|
57
|
+
Third-party components included in or used by the Software remain subject to
|
|
58
|
+
their own licenses. This license does not replace, restrict, or expand rights
|
|
59
|
+
under those licenses. Retain and distribute all notices and license texts
|
|
60
|
+
required by the applicable third-party licenses.
|
|
61
|
+
|
|
62
|
+
RELATIONSHIP TO SERVICE AGREEMENTS:
|
|
63
|
+
This license governs use and distribution of the Software. Access to PayOS
|
|
64
|
+
services is separately governed by the Platform Terms of Service, sandbox
|
|
65
|
+
terms, and service schedules accepted by your organization, or an executed
|
|
66
|
+
Master Services Agreement, as applicable. An MSA is not required merely to
|
|
67
|
+
exercise the evaluation and integration rights granted here.
|
|
68
|
+
|
|
69
|
+
If a separate written agreement executed by you and PayOS expressly governs
|
|
70
|
+
SDK licensing, that agreement controls to the extent of a conflict with this
|
|
71
|
+
license. Otherwise, this license governs the Software and the applicable
|
|
72
|
+
service agreements govern access to and use of PayOS services.
|
|
73
|
+
|
|
74
|
+
TERMINATION:
|
|
75
|
+
This license terminates if you violate its terms. Upon termination, stop
|
|
76
|
+
using and distributing the Software and remove copies under your control,
|
|
77
|
+
except copies required by law or retained in inaccessible archival backups.
|
|
78
|
+
Account suspension or termination ends access to the affected PayOS services
|
|
79
|
+
under their applicable terms; it does not by itself prohibit offline
|
|
80
|
+
evaluation otherwise permitted by this license. Ownership, restrictions,
|
|
81
|
+
third-party license rights, warranty disclaimers, and limitations of liability
|
|
82
|
+
survive termination to the extent applicable.
|
|
83
|
+
|
|
84
|
+
NO WARRANTY:
|
|
85
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
|
|
86
|
+
THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
87
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY,
|
|
88
|
+
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
|
89
|
+
|
|
90
|
+
LIMITATION OF LIABILITY:
|
|
91
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW,
|
|
92
|
+
IN NO EVENT SHALL PAYOS INC. BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
|
|
93
|
+
SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING OUT OF OR RELATED
|
|
94
|
+
TO YOUR USE OF OR INABILITY TO USE THE SOFTWARE.
|
|
95
|
+
|
|
96
|
+
For licensing inquiries: support@payos.ai
|
package/README.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# PayOS React SDK
|
|
2
|
+
|
|
3
|
+
React components for integrating PayOS customer verification, card collection,
|
|
4
|
+
and payment authorization into your application. `PaymentSheet` guides customers
|
|
5
|
+
through the flow associated with a session created by your backend.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- React and React DOM 18.2 or later within the React 18 release line.
|
|
10
|
+
- A browser application and a bundler that supports JavaScript and CSS imports.
|
|
11
|
+
- TypeScript projects: use `bundler`, `node16`, or `nodenext` module resolution
|
|
12
|
+
so dependency package exports resolve correctly.
|
|
13
|
+
- A PayOS account and API credentials for the environment you use.
|
|
14
|
+
- A backend that creates PayOS sessions and keeps your API key private.
|
|
15
|
+
- HTTPS and a compatible browser/device for passkey flows.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @payos-inc/payos-react
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
If npm reports an access error, confirm your package access with
|
|
24
|
+
[PayOS support](mailto:support@payos.ai).
|
|
25
|
+
|
|
26
|
+
The package provides ESM and CommonJS entry points, TypeScript declarations,
|
|
27
|
+
and a standalone stylesheet. A browser UMD build is available at
|
|
28
|
+
`dist/payos-react.min.js` and expects React and React DOM globals.
|
|
29
|
+
|
|
30
|
+
## Create a session on your backend
|
|
31
|
+
|
|
32
|
+
For a checkout integration:
|
|
33
|
+
|
|
34
|
+
1. Authenticate the customer in your application and load their order on your
|
|
35
|
+
server. Derive amounts and customer identifiers from trusted server data.
|
|
36
|
+
2. Create a payment intent with `POST /api/payment-intents`.
|
|
37
|
+
3. Create a checkout session with `POST /api/sessions/checkout`, passing the
|
|
38
|
+
returned intent ID as `paymentIntentId`.
|
|
39
|
+
4. Return the session response's `data.sessionSecret` to that customer's browser.
|
|
40
|
+
|
|
41
|
+
Authenticate these server requests with your secret API key in the `X-API-Key`
|
|
42
|
+
header. Never put that key in a React prop, browser environment variable, or
|
|
43
|
+
frontend bundle. The browser uses the session secret, not your API key.
|
|
44
|
+
|
|
45
|
+
| Environment | Backend API base URL | PaymentSheet prop |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| Sandbox | `https://sandbox.api.payos.ai` | `environment="sandbox"` |
|
|
48
|
+
| Production | `https://api.payos.ai` | `environment="production"` |
|
|
49
|
+
|
|
50
|
+
Use matching credentials, payment intents, sessions, and SDK environment.
|
|
51
|
+
See the [backend integration guide](https://docs.payos.ai/guides/integration-guides/payment-sheet/backend-setup)
|
|
52
|
+
for request schemas and the flow appropriate to your integration.
|
|
53
|
+
|
|
54
|
+
Treat the session secret as a credential: return it only to the intended customer,
|
|
55
|
+
keep it out of application logs and analytics, and avoid persistent browser
|
|
56
|
+
storage. Use the session's `expiresAt` value to handle expiration and request a
|
|
57
|
+
new session through your backend when needed.
|
|
58
|
+
|
|
59
|
+
## Render PaymentSheet
|
|
60
|
+
|
|
61
|
+
This TypeScript example expects a valid sandbox `sessionSecret` obtained through
|
|
62
|
+
your backend. Mount it after session creation. `onFlowComplete` is your
|
|
63
|
+
application callback for refreshing order state from your server.
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
import { useState } from 'react';
|
|
67
|
+
import {
|
|
68
|
+
PaymentSheet,
|
|
69
|
+
type PaymentSheetResult,
|
|
70
|
+
} from '@payos-inc/payos-react';
|
|
71
|
+
import '@payos-inc/payos-react/dist/payos-react.css';
|
|
72
|
+
|
|
73
|
+
type CheckoutProps = {
|
|
74
|
+
sessionSecret: string;
|
|
75
|
+
onFlowComplete: (result: PaymentSheetResult) => void;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export function Checkout({ sessionSecret, onFlowComplete }: CheckoutProps) {
|
|
79
|
+
const [open, setOpen] = useState(true);
|
|
80
|
+
const [errorMessage, setErrorMessage] = useState<string | null>(null);
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<>
|
|
84
|
+
{errorMessage && <p role="alert">{errorMessage}</p>}
|
|
85
|
+
{open && (
|
|
86
|
+
<PaymentSheet
|
|
87
|
+
sessionSecret={sessionSecret}
|
|
88
|
+
environment="sandbox"
|
|
89
|
+
open={open}
|
|
90
|
+
title="Your Store"
|
|
91
|
+
onClose={() => setOpen(false)}
|
|
92
|
+
onSuccess={(result) => {
|
|
93
|
+
setOpen(false);
|
|
94
|
+
setErrorMessage(null);
|
|
95
|
+
onFlowComplete(result);
|
|
96
|
+
}}
|
|
97
|
+
onError={() => {
|
|
98
|
+
setErrorMessage('Unable to complete this step. Please try again.');
|
|
99
|
+
}}
|
|
100
|
+
/>
|
|
101
|
+
)}
|
|
102
|
+
</>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Import the stylesheet once in your application. In frameworks that restrict global
|
|
108
|
+
CSS imports, place it in the framework's application entry point. Render
|
|
109
|
+
PaymentSheet on the client; it uses browser APIs. For server-rendered applications,
|
|
110
|
+
load the integration in a client-only component using your framework's supported
|
|
111
|
+
mechanism.
|
|
112
|
+
|
|
113
|
+
`onSuccess` reports completion of the SDK flow. Depending on the session, this can
|
|
114
|
+
mean card setup or payment authorization. It is not proof that a payment has
|
|
115
|
+
settled. Confirm the appropriate payment state on your backend before fulfilling
|
|
116
|
+
an order; do not use a browser callback as authorization to mark an order paid.
|
|
117
|
+
|
|
118
|
+
## Common props
|
|
119
|
+
|
|
120
|
+
| Prop | Purpose |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| `sessionSecret` | Required session credential returned by your backend. |
|
|
123
|
+
| `open` | Required boolean controlling visibility. |
|
|
124
|
+
| `onClose` | Required callback; update your application's visibility state. |
|
|
125
|
+
| `onSuccess` | Required callback receiving a `PaymentSheetResult`. |
|
|
126
|
+
| `onError` | Required callback receiving a `PaymentSheetError`. |
|
|
127
|
+
| `onCancel` | Optional callback for explicit cancellation. |
|
|
128
|
+
| `environment` | `sandbox` (default) or `production`. |
|
|
129
|
+
| `title` | Merchant name displayed in the sheet. |
|
|
130
|
+
| `layout` | `drawer` (default), `modal`, `inline`, or `embedded`. |
|
|
131
|
+
| `theme` | `light`, `dark`, `black`, or `auto`. |
|
|
132
|
+
| `cardElementStyles` | Style overrides for the card collection iframe. |
|
|
133
|
+
| `exitOnCardAdd` | Finish setup/onboard sessions after adding a card. |
|
|
134
|
+
| `skipCredentialGeneration` | Leave agent-mode credential generation to your integration. |
|
|
135
|
+
|
|
136
|
+
The package includes TypeScript declarations, including `PaymentSheetProps`,
|
|
137
|
+
`PaymentSheetResult`, and `PaymentSheetError`. See the
|
|
138
|
+
[frontend integration guide](https://docs.payos.ai/guides/integration-guides/payment-sheet/frontend-setup)
|
|
139
|
+
for additional props and flows.
|
|
140
|
+
|
|
141
|
+
The demo-only `useCheckoutFlow` hook is no longer exported. It simulated OTP
|
|
142
|
+
verification and payments and must not be used for a live integration. Use
|
|
143
|
+
`PaymentSheet` or the session-backed `useSession` hook instead.
|
|
144
|
+
Import APIs from the package root; internal `dist` implementation paths are no
|
|
145
|
+
longer exported. The documented stylesheet and browser build paths remain available.
|
|
146
|
+
|
|
147
|
+
## Documentation and support
|
|
148
|
+
|
|
149
|
+
- [PaymentSheet overview](https://docs.payos.ai/guides/integration-guides/payment-sheet/overview)
|
|
150
|
+
- [Customization](https://docs.payos.ai/guides/integration-guides/payment-sheet/customization)
|
|
151
|
+
- [Troubleshooting and FAQ](https://docs.payos.ai/guides/integration-guides/payment-sheet/faq)
|
|
152
|
+
- [Contact PayOS support](mailto:support@payos.ai)
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
Proprietary software licensed under the [PayOS React SDK Commercial License](./LICENSE).
|
|
157
|
+
The license permits evaluation, integration, normal build transformations, and
|
|
158
|
+
distribution within applications that use PayOS. Standalone redistribution is
|
|
159
|
+
restricted. Third-party components retain their own licenses. See `LICENSE` for
|
|
160
|
+
the complete terms.
|