@payos-inc/payos-react 1.0.42-staging.83 → 1.2.0-staging.89

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.
Files changed (408) hide show
  1. package/LICENSE +96 -0
  2. package/README.md +160 -0
  3. package/dist/THIRD_PARTY_NOTICES.txt +549 -0
  4. package/dist/payos-react.cjs +50 -0
  5. package/dist/payos-react.css +1 -1
  6. package/dist/payos-react.esm.js +17 -11
  7. package/dist/payos-react.min.js +2 -1
  8. package/dist/payos-react.mjs +50 -0
  9. package/dist/types/index.d.ts +1 -57
  10. package/dist/types/payos-passkey-js/src/api/ApiClient.d.ts +48 -0
  11. package/dist/types/payos-passkey-js/src/core/PayOSPasskey.d.ts +114 -0
  12. package/dist/types/payos-passkey-js/src/core/types.d.ts +100 -0
  13. package/dist/types/payos-passkey-js/src/index.d.ts +9 -0
  14. package/dist/types/payos-passkey-js/src/services/mastercard/MastercardSDKService.d.ts +61 -0
  15. package/dist/types/payos-passkey-js/src/services/visa/VisaSDKService.d.ts +90 -0
  16. package/dist/types/payos-passkey-js/src/utils/diagnostics.d.ts +30 -0
  17. package/dist/types/payos-passkey-js/src/utils/logger.d.ts +36 -0
  18. package/dist/{components → types/payos-react/src/components}/payos/ActiveCardWidget.d.ts +0 -1
  19. package/dist/{components → types/payos-react/src/components}/payos/AgentRegistrationFlow.d.ts +1 -3
  20. package/dist/{components → types/payos-react/src/components}/payos/ConnectStripeLinkButton.d.ts +0 -1
  21. package/dist/types/{components → payos-react/src/components}/payos/IdentityVerificationFlow.d.ts +0 -1
  22. package/dist/{components → types/payos-react/src/components}/payos/LinkPaymentFlow.d.ts +0 -1
  23. package/dist/{components → types/payos-react/src/components}/payos/LinkSessionContent.d.ts +0 -1
  24. package/dist/types/{components → payos-react/src/components}/payos/PayOSFooter.d.ts +0 -1
  25. package/dist/types/{components → payos-react/src/components}/payos/PayWithLinkButton.d.ts +0 -1
  26. package/dist/{components → types/payos-react/src/components}/payos/PaymentMethodRow.d.ts +0 -1
  27. package/dist/{components → types/payos-react/src/components}/payos/PaymentSheet.d.ts +3 -4
  28. package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetContent.d.ts +4 -3
  29. package/dist/types/{components → payos-react/src/components}/payos/PaymentSheetPaymentFlow.d.ts +4 -2
  30. package/dist/{components → types/payos-react/src/components}/payos/PaymentSheetShell.d.ts +0 -1
  31. package/dist/{components → types/payos-react/src/components}/payos/PaymentSheetStatusViews.d.ts +0 -1
  32. package/dist/types/{components → payos-react/src/components}/payos/PriceTag.d.ts +0 -1
  33. package/dist/types/{components → payos-react/src/components}/payos/ReceiptPanel.d.ts +0 -1
  34. package/dist/types/{components → payos-react/src/components}/payos/ViewHeader.d.ts +0 -1
  35. package/dist/types/{components → payos-react/src/components}/payos/drawer.d.ts +0 -2
  36. package/dist/{components → types/payos-react/src/components}/payos/order-summary.d.ts +0 -1
  37. package/dist/{components → types/payos-react/src/components}/payos/otp-input.d.ts +0 -1
  38. package/dist/types/{components → payos-react/src/components}/payos/phone-input.d.ts +0 -1
  39. package/dist/{components → types/payos-react/src/components}/payos/themeMode.d.ts +0 -1
  40. package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetDisplayData.d.ts +0 -1
  41. package/dist/types/{components → payos-react/src/components}/payos/usePaymentSheetLifecycle.d.ts +0 -1
  42. package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToAuth.d.ts +0 -1
  43. package/dist/{components → types/payos-react/src/components}/payos/usePaymentSheetSkipToLink.d.ts +0 -1
  44. package/dist/{components → types/payos-react/src/components}/payos/views/AgentRegistrationView.d.ts +0 -1
  45. package/dist/types/{components → payos-react/src/components}/payos/views/CardAddView.d.ts +1 -2
  46. package/dist/types/{components → payos-react/src/components}/payos/views/CheckoutView.d.ts +0 -1
  47. package/dist/types/{components → payos-react/src/components}/payos/views/IdentityView.d.ts +0 -1
  48. package/dist/{components → types/payos-react/src/components}/payos/views/LinkBrand.d.ts +0 -1
  49. package/dist/{components → types/payos-react/src/components}/payos/views/LinkCheckoutView.d.ts +0 -1
  50. package/dist/types/{components → payos-react/src/components}/payos/views/LinkConnectView.d.ts +0 -1
  51. package/dist/types/{components → payos-react/src/components}/payos/views/LinkDeniedView.d.ts +0 -1
  52. package/dist/{components → types/payos-react/src/components}/payos/views/LinkLoadingView.d.ts +0 -1
  53. package/dist/types/{components → payos-react/src/components}/payos/views/LinkSuccessView.d.ts +0 -1
  54. package/dist/{components → types/payos-react/src/components}/payos/views/ManageThirdPartyView.d.ts +0 -1
  55. package/dist/{components → types/payos-react/src/components}/payos/views/MethodListView.d.ts +8 -1
  56. package/dist/types/{components → payos-react/src/components}/payos/views/OTPView.d.ts +0 -1
  57. package/dist/types/payos-react/src/components/payos/views/ShareCardsView.d.ts +24 -0
  58. package/dist/types/{components → payos-react/src/components}/payos/views/SuccessView.d.ts +0 -1
  59. package/dist/{components → types/payos-react/src/components}/payos/views/VisaIframeView.d.ts +0 -1
  60. package/dist/types/{components → payos-react/src/components}/payos/views/VisaMethodView.d.ts +0 -1
  61. package/dist/{components → types/payos-react/src/components}/payos/views/VisaOtpView.d.ts +0 -1
  62. package/dist/{components → types/payos-react/src/components}/payos/views/WelcomeBackView.d.ts +0 -1
  63. package/dist/types/{components → payos-react/src/components}/ui/CardBrandIcon.d.ts +0 -1
  64. package/dist/types/{components → payos-react/src/components}/ui/ConfirmDialog.d.ts +0 -1
  65. package/dist/types/{components → payos-react/src/components}/ui/DigitalCard.d.ts +0 -1
  66. package/dist/types/{components → payos-react/src/components}/ui/button.d.ts +1 -2
  67. package/dist/types/{components → payos-react/src/components}/ui/card.d.ts +1 -2
  68. package/dist/types/{components → payos-react/src/components}/ui/input.d.ts +0 -1
  69. package/dist/types/{components → payos-react/src/components}/ui/label.d.ts +1 -2
  70. package/dist/types/{components → payos-react/src/components}/ui/separator.d.ts +0 -1
  71. package/dist/{hooks → types/payos-react/src/hooks}/useBiometricType.d.ts +0 -1
  72. package/dist/types/{hooks → payos-react/src/hooks}/useBodyScrollLock.d.ts +0 -1
  73. package/dist/types/{hooks → payos-react/src/hooks}/useCardElement.d.ts +1 -2
  74. package/dist/types/{hooks → payos-react/src/hooks}/useLinkAuth.d.ts +0 -1
  75. package/dist/types/{hooks → payos-react/src/hooks}/useLinkDeviceAuthPoll.d.ts +0 -1
  76. package/dist/types/{hooks → payos-react/src/hooks}/useLinkMethods.d.ts +0 -1
  77. package/dist/{hooks → types/payos-react/src/hooks}/useLinkSession.d.ts +0 -1
  78. package/dist/{hooks → types/payos-react/src/hooks}/useLinkSpendStatusPoll.d.ts +0 -1
  79. package/dist/types/{hooks → payos-react/src/hooks}/usePasskeySDK.d.ts +2 -4
  80. package/dist/{hooks → types/payos-react/src/hooks}/useSession.d.ts +8 -1
  81. package/dist/types/{hooks → payos-react/src/hooks}/useVisualViewport.d.ts +0 -1
  82. package/dist/{index.d.ts → types/payos-react/src/index.d.ts} +3 -4
  83. package/dist/{lib → types/payos-react/src/lib}/utils.d.ts +0 -1
  84. package/dist/{services → types/payos-react/src/services}/apiService.d.ts +10 -2
  85. package/dist/{services → types/payos-react/src/services}/linkTokenService.d.ts +0 -1
  86. package/dist/types/{cardElement.d.ts → payos-react/src/types/cardElement.d.ts} +2 -3
  87. package/dist/types/{drawer.d.ts → payos-react/src/types/drawer.d.ts} +0 -1
  88. package/dist/types/{types → payos-react/src/types}/index.d.ts +0 -1
  89. package/dist/types/{order.d.ts → payos-react/src/types/order.d.ts} +0 -1
  90. package/dist/types/{types → payos-react/src/types}/payment.d.ts +1 -2
  91. package/dist/types/{session.d.ts → payos-react/src/types/session.d.ts} +15 -1
  92. package/dist/types/{utils → payos-react/src/utils}/credentialStatus.d.ts +0 -1
  93. package/dist/{utils → types/payos-react/src/utils}/deviceFingerprint.d.ts +0 -1
  94. package/dist/types/{utils → payos-react/src/utils}/environment.d.ts +0 -1
  95. package/dist/{utils → types/payos-react/src/utils}/formatting.d.ts +0 -1
  96. package/dist/types/{utils → payos-react/src/utils}/linkPopup.d.ts +0 -1
  97. package/dist/types/{utils → payos-react/src/utils}/selectCard.d.ts +0 -1
  98. package/dist/types/{utils → payos-react/src/utils}/text.d.ts +0 -1
  99. package/dist/{utils → types/payos-react/src/utils}/validation.d.ts +0 -1
  100. package/package.json +38 -13
  101. package/dist/components/identity/IdentityBar.d.ts +0 -8
  102. package/dist/components/identity/IdentityBar.d.ts.map +0 -1
  103. package/dist/components/order/OrderSummaryAccordion.d.ts +0 -9
  104. package/dist/components/order/OrderSummaryAccordion.d.ts.map +0 -1
  105. package/dist/components/order/ShipmentCard.d.ts +0 -8
  106. package/dist/components/order/ShipmentCard.d.ts.map +0 -1
  107. package/dist/components/payos/ActiveCardWidget.d.ts.map +0 -1
  108. package/dist/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
  109. package/dist/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
  110. package/dist/components/payos/IdentityVerificationFlow.d.ts +0 -26
  111. package/dist/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
  112. package/dist/components/payos/LinkPaymentFlow.d.ts.map +0 -1
  113. package/dist/components/payos/LinkSessionContent.d.ts.map +0 -1
  114. package/dist/components/payos/PayOSFooter.d.ts +0 -25
  115. package/dist/components/payos/PayOSFooter.d.ts.map +0 -1
  116. package/dist/components/payos/PayWithLinkButton.d.ts +0 -74
  117. package/dist/components/payos/PayWithLinkButton.d.ts.map +0 -1
  118. package/dist/components/payos/PaymentMethodRow.d.ts.map +0 -1
  119. package/dist/components/payos/PaymentSheet.d.ts.map +0 -1
  120. package/dist/components/payos/PaymentSheetContent.d.ts +0 -80
  121. package/dist/components/payos/PaymentSheetContent.d.ts.map +0 -1
  122. package/dist/components/payos/PaymentSheetPaymentFlow.d.ts +0 -43
  123. package/dist/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
  124. package/dist/components/payos/PaymentSheetShell.d.ts.map +0 -1
  125. package/dist/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
  126. package/dist/components/payos/PriceTag.d.ts +0 -64
  127. package/dist/components/payos/PriceTag.d.ts.map +0 -1
  128. package/dist/components/payos/ReceiptPanel.d.ts +0 -67
  129. package/dist/components/payos/ReceiptPanel.d.ts.map +0 -1
  130. package/dist/components/payos/ViewHeader.d.ts +0 -9
  131. package/dist/components/payos/ViewHeader.d.ts.map +0 -1
  132. package/dist/components/payos/drawer.d.ts +0 -107
  133. package/dist/components/payos/drawer.d.ts.map +0 -1
  134. package/dist/components/payos/order-summary.d.ts.map +0 -1
  135. package/dist/components/payos/otp-input.d.ts.map +0 -1
  136. package/dist/components/payos/phone-input.d.ts +0 -30
  137. package/dist/components/payos/phone-input.d.ts.map +0 -1
  138. package/dist/components/payos/themeMode.d.ts.map +0 -1
  139. package/dist/components/payos/usePaymentSheetDebug.d.ts +0 -22
  140. package/dist/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
  141. package/dist/components/payos/usePaymentSheetDisplayData.d.ts +0 -29
  142. package/dist/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
  143. package/dist/components/payos/usePaymentSheetLifecycle.d.ts +0 -39
  144. package/dist/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
  145. package/dist/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
  146. package/dist/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
  147. package/dist/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
  148. package/dist/components/payos/views/CardAddView.d.ts +0 -101
  149. package/dist/components/payos/views/CardAddView.d.ts.map +0 -1
  150. package/dist/components/payos/views/CheckoutView.d.ts +0 -95
  151. package/dist/components/payos/views/CheckoutView.d.ts.map +0 -1
  152. package/dist/components/payos/views/IdentityView.d.ts +0 -51
  153. package/dist/components/payos/views/IdentityView.d.ts.map +0 -1
  154. package/dist/components/payos/views/LinkBrand.d.ts.map +0 -1
  155. package/dist/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
  156. package/dist/components/payos/views/LinkConnectView.d.ts +0 -18
  157. package/dist/components/payos/views/LinkConnectView.d.ts.map +0 -1
  158. package/dist/components/payos/views/LinkDeniedView.d.ts +0 -13
  159. package/dist/components/payos/views/LinkDeniedView.d.ts.map +0 -1
  160. package/dist/components/payos/views/LinkLoadingView.d.ts.map +0 -1
  161. package/dist/components/payos/views/LinkSuccessView.d.ts +0 -11
  162. package/dist/components/payos/views/LinkSuccessView.d.ts.map +0 -1
  163. package/dist/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
  164. package/dist/components/payos/views/MethodListView.d.ts.map +0 -1
  165. package/dist/components/payos/views/OTPView.d.ts +0 -69
  166. package/dist/components/payos/views/OTPView.d.ts.map +0 -1
  167. package/dist/components/payos/views/SuccessView.d.ts +0 -49
  168. package/dist/components/payos/views/SuccessView.d.ts.map +0 -1
  169. package/dist/components/payos/views/VisaIframeView.d.ts.map +0 -1
  170. package/dist/components/payos/views/VisaMethodView.d.ts +0 -23
  171. package/dist/components/payos/views/VisaMethodView.d.ts.map +0 -1
  172. package/dist/components/payos/views/VisaOtpView.d.ts.map +0 -1
  173. package/dist/components/payos/views/WelcomeBackView.d.ts.map +0 -1
  174. package/dist/components/ui/CardBrandIcon.d.ts +0 -10
  175. package/dist/components/ui/CardBrandIcon.d.ts.map +0 -1
  176. package/dist/components/ui/ConfirmDialog.d.ts +0 -25
  177. package/dist/components/ui/ConfirmDialog.d.ts.map +0 -1
  178. package/dist/components/ui/DigitalCard.d.ts +0 -13
  179. package/dist/components/ui/DigitalCard.d.ts.map +0 -1
  180. package/dist/components/ui/InfoTooltip.d.ts +0 -8
  181. package/dist/components/ui/InfoTooltip.d.ts.map +0 -1
  182. package/dist/components/ui/PinInput.d.ts +0 -12
  183. package/dist/components/ui/PinInput.d.ts.map +0 -1
  184. package/dist/components/ui/button.d.ts +0 -14
  185. package/dist/components/ui/button.d.ts.map +0 -1
  186. package/dist/components/ui/card.d.ts +0 -15
  187. package/dist/components/ui/card.d.ts.map +0 -1
  188. package/dist/components/ui/input.d.ts +0 -6
  189. package/dist/components/ui/input.d.ts.map +0 -1
  190. package/dist/components/ui/label.d.ts +0 -6
  191. package/dist/components/ui/label.d.ts.map +0 -1
  192. package/dist/components/ui/separator.d.ts +0 -5
  193. package/dist/components/ui/separator.d.ts.map +0 -1
  194. package/dist/hooks/index.d.ts +0 -8
  195. package/dist/hooks/index.d.ts.map +0 -1
  196. package/dist/hooks/useBiometricType.d.ts.map +0 -1
  197. package/dist/hooks/useBodyScrollLock.d.ts +0 -32
  198. package/dist/hooks/useBodyScrollLock.d.ts.map +0 -1
  199. package/dist/hooks/useCardElement.d.ts +0 -135
  200. package/dist/hooks/useCardElement.d.ts.map +0 -1
  201. package/dist/hooks/useCheckoutFlow.d.ts +0 -29
  202. package/dist/hooks/useCheckoutFlow.d.ts.map +0 -1
  203. package/dist/hooks/useDrawerState.d.ts +0 -4
  204. package/dist/hooks/useDrawerState.d.ts.map +0 -1
  205. package/dist/hooks/useLinkAuth.d.ts +0 -24
  206. package/dist/hooks/useLinkAuth.d.ts.map +0 -1
  207. package/dist/hooks/useLinkDeviceAuthPoll.d.ts +0 -29
  208. package/dist/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
  209. package/dist/hooks/useLinkMethods.d.ts +0 -28
  210. package/dist/hooks/useLinkMethods.d.ts.map +0 -1
  211. package/dist/hooks/useLinkSession.d.ts.map +0 -1
  212. package/dist/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
  213. package/dist/hooks/usePasskeySDK.d.ts +0 -103
  214. package/dist/hooks/usePasskeySDK.d.ts.map +0 -1
  215. package/dist/hooks/useSession.d.ts.map +0 -1
  216. package/dist/hooks/useVisualViewport.d.ts +0 -15
  217. package/dist/hooks/useVisualViewport.d.ts.map +0 -1
  218. package/dist/index.d.ts.map +0 -1
  219. package/dist/lib/theme.d.ts +0 -53
  220. package/dist/lib/theme.d.ts.map +0 -1
  221. package/dist/lib/utils.d.ts.map +0 -1
  222. package/dist/mocks/index.d.ts +0 -3
  223. package/dist/mocks/index.d.ts.map +0 -1
  224. package/dist/mocks/mockCheckoutFlow.d.ts +0 -25
  225. package/dist/mocks/mockCheckoutFlow.d.ts.map +0 -1
  226. package/dist/mocks/mockData.d.ts +0 -6
  227. package/dist/mocks/mockData.d.ts.map +0 -1
  228. package/dist/mocks/mockSessionData.d.ts +0 -38
  229. package/dist/mocks/mockSessionData.d.ts.map +0 -1
  230. package/dist/services/apiService.d.ts.map +0 -1
  231. package/dist/services/linkTokenService.d.ts.map +0 -1
  232. package/dist/services/mockSessionService.d.ts +0 -65
  233. package/dist/services/mockSessionService.d.ts.map +0 -1
  234. package/dist/types/cardElement.d.ts.map +0 -1
  235. package/dist/types/components/identity/IdentityBar.d.ts +0 -8
  236. package/dist/types/components/identity/IdentityBar.d.ts.map +0 -1
  237. package/dist/types/components/order/OrderSummaryAccordion.d.ts +0 -9
  238. package/dist/types/components/order/OrderSummaryAccordion.d.ts.map +0 -1
  239. package/dist/types/components/order/ShipmentCard.d.ts +0 -8
  240. package/dist/types/components/order/ShipmentCard.d.ts.map +0 -1
  241. package/dist/types/components/payos/ActiveCardWidget.d.ts +0 -60
  242. package/dist/types/components/payos/ActiveCardWidget.d.ts.map +0 -1
  243. package/dist/types/components/payos/AgentRegistrationFlow.d.ts +0 -24
  244. package/dist/types/components/payos/AgentRegistrationFlow.d.ts.map +0 -1
  245. package/dist/types/components/payos/ConnectStripeLinkButton.d.ts +0 -41
  246. package/dist/types/components/payos/ConnectStripeLinkButton.d.ts.map +0 -1
  247. package/dist/types/components/payos/IdentityVerificationFlow.d.ts.map +0 -1
  248. package/dist/types/components/payos/LinkPaymentFlow.d.ts +0 -11
  249. package/dist/types/components/payos/LinkPaymentFlow.d.ts.map +0 -1
  250. package/dist/types/components/payos/LinkSessionContent.d.ts +0 -19
  251. package/dist/types/components/payos/LinkSessionContent.d.ts.map +0 -1
  252. package/dist/types/components/payos/PayOSFooter.d.ts.map +0 -1
  253. package/dist/types/components/payos/PayWithLinkButton.d.ts.map +0 -1
  254. package/dist/types/components/payos/PaymentMethodRow.d.ts +0 -53
  255. package/dist/types/components/payos/PaymentMethodRow.d.ts.map +0 -1
  256. package/dist/types/components/payos/PaymentSheet.d.ts +0 -121
  257. package/dist/types/components/payos/PaymentSheet.d.ts.map +0 -1
  258. package/dist/types/components/payos/PaymentSheetContent.d.ts.map +0 -1
  259. package/dist/types/components/payos/PaymentSheetPaymentFlow.d.ts.map +0 -1
  260. package/dist/types/components/payos/PaymentSheetShell.d.ts +0 -25
  261. package/dist/types/components/payos/PaymentSheetShell.d.ts.map +0 -1
  262. package/dist/types/components/payos/PaymentSheetStatusViews.d.ts +0 -28
  263. package/dist/types/components/payos/PaymentSheetStatusViews.d.ts.map +0 -1
  264. package/dist/types/components/payos/PriceTag.d.ts.map +0 -1
  265. package/dist/types/components/payos/ReceiptPanel.d.ts.map +0 -1
  266. package/dist/types/components/payos/ViewHeader.d.ts.map +0 -1
  267. package/dist/types/components/payos/drawer.d.ts.map +0 -1
  268. package/dist/types/components/payos/order-summary.d.ts +0 -44
  269. package/dist/types/components/payos/order-summary.d.ts.map +0 -1
  270. package/dist/types/components/payos/otp-input.d.ts +0 -45
  271. package/dist/types/components/payos/otp-input.d.ts.map +0 -1
  272. package/dist/types/components/payos/phone-input.d.ts.map +0 -1
  273. package/dist/types/components/payos/themeMode.d.ts +0 -6
  274. package/dist/types/components/payos/themeMode.d.ts.map +0 -1
  275. package/dist/types/components/payos/usePaymentSheetDebug.d.ts +0 -22
  276. package/dist/types/components/payos/usePaymentSheetDebug.d.ts.map +0 -1
  277. package/dist/types/components/payos/usePaymentSheetDisplayData.d.ts.map +0 -1
  278. package/dist/types/components/payos/usePaymentSheetLifecycle.d.ts.map +0 -1
  279. package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts +0 -18
  280. package/dist/types/components/payos/usePaymentSheetSkipToAuth.d.ts.map +0 -1
  281. package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts +0 -14
  282. package/dist/types/components/payos/usePaymentSheetSkipToLink.d.ts.map +0 -1
  283. package/dist/types/components/payos/views/AgentRegistrationView.d.ts +0 -61
  284. package/dist/types/components/payos/views/AgentRegistrationView.d.ts.map +0 -1
  285. package/dist/types/components/payos/views/CardAddView.d.ts.map +0 -1
  286. package/dist/types/components/payos/views/CheckoutView.d.ts.map +0 -1
  287. package/dist/types/components/payos/views/IdentityView.d.ts.map +0 -1
  288. package/dist/types/components/payos/views/LinkBrand.d.ts +0 -13
  289. package/dist/types/components/payos/views/LinkBrand.d.ts.map +0 -1
  290. package/dist/types/components/payos/views/LinkCheckoutView.d.ts +0 -31
  291. package/dist/types/components/payos/views/LinkCheckoutView.d.ts.map +0 -1
  292. package/dist/types/components/payos/views/LinkConnectView.d.ts.map +0 -1
  293. package/dist/types/components/payos/views/LinkDeniedView.d.ts.map +0 -1
  294. package/dist/types/components/payos/views/LinkLoadingView.d.ts +0 -11
  295. package/dist/types/components/payos/views/LinkLoadingView.d.ts.map +0 -1
  296. package/dist/types/components/payos/views/LinkSuccessView.d.ts.map +0 -1
  297. package/dist/types/components/payos/views/ManageThirdPartyView.d.ts +0 -19
  298. package/dist/types/components/payos/views/ManageThirdPartyView.d.ts.map +0 -1
  299. package/dist/types/components/payos/views/MethodListView.d.ts +0 -116
  300. package/dist/types/components/payos/views/MethodListView.d.ts.map +0 -1
  301. package/dist/types/components/payos/views/OTPView.d.ts.map +0 -1
  302. package/dist/types/components/payos/views/SuccessView.d.ts.map +0 -1
  303. package/dist/types/components/payos/views/VisaIframeView.d.ts +0 -16
  304. package/dist/types/components/payos/views/VisaIframeView.d.ts.map +0 -1
  305. package/dist/types/components/payos/views/VisaMethodView.d.ts.map +0 -1
  306. package/dist/types/components/payos/views/VisaOtpView.d.ts +0 -45
  307. package/dist/types/components/payos/views/VisaOtpView.d.ts.map +0 -1
  308. package/dist/types/components/payos/views/WelcomeBackView.d.ts +0 -34
  309. package/dist/types/components/payos/views/WelcomeBackView.d.ts.map +0 -1
  310. package/dist/types/components/ui/CardBrandIcon.d.ts.map +0 -1
  311. package/dist/types/components/ui/ConfirmDialog.d.ts.map +0 -1
  312. package/dist/types/components/ui/DigitalCard.d.ts.map +0 -1
  313. package/dist/types/components/ui/InfoTooltip.d.ts +0 -8
  314. package/dist/types/components/ui/InfoTooltip.d.ts.map +0 -1
  315. package/dist/types/components/ui/PinInput.d.ts +0 -12
  316. package/dist/types/components/ui/PinInput.d.ts.map +0 -1
  317. package/dist/types/components/ui/button.d.ts.map +0 -1
  318. package/dist/types/components/ui/card.d.ts.map +0 -1
  319. package/dist/types/components/ui/input.d.ts.map +0 -1
  320. package/dist/types/components/ui/label.d.ts.map +0 -1
  321. package/dist/types/components/ui/separator.d.ts.map +0 -1
  322. package/dist/types/drawer.d.ts.map +0 -1
  323. package/dist/types/hooks/index.d.ts +0 -8
  324. package/dist/types/hooks/index.d.ts.map +0 -1
  325. package/dist/types/hooks/useBiometricType.d.ts +0 -21
  326. package/dist/types/hooks/useBiometricType.d.ts.map +0 -1
  327. package/dist/types/hooks/useBodyScrollLock.d.ts.map +0 -1
  328. package/dist/types/hooks/useCardElement.d.ts.map +0 -1
  329. package/dist/types/hooks/useCheckoutFlow.d.ts +0 -29
  330. package/dist/types/hooks/useCheckoutFlow.d.ts.map +0 -1
  331. package/dist/types/hooks/useDrawerState.d.ts +0 -4
  332. package/dist/types/hooks/useDrawerState.d.ts.map +0 -1
  333. package/dist/types/hooks/useLinkAuth.d.ts.map +0 -1
  334. package/dist/types/hooks/useLinkDeviceAuthPoll.d.ts.map +0 -1
  335. package/dist/types/hooks/useLinkMethods.d.ts.map +0 -1
  336. package/dist/types/hooks/useLinkSession.d.ts +0 -81
  337. package/dist/types/hooks/useLinkSession.d.ts.map +0 -1
  338. package/dist/types/hooks/useLinkSpendStatusPoll.d.ts +0 -28
  339. package/dist/types/hooks/useLinkSpendStatusPoll.d.ts.map +0 -1
  340. package/dist/types/hooks/usePasskeySDK.d.ts.map +0 -1
  341. package/dist/types/hooks/useSession.d.ts +0 -87
  342. package/dist/types/hooks/useSession.d.ts.map +0 -1
  343. package/dist/types/hooks/useVisualViewport.d.ts.map +0 -1
  344. package/dist/types/index.d.ts.map +0 -1
  345. package/dist/types/lib/theme.d.ts +0 -53
  346. package/dist/types/lib/theme.d.ts.map +0 -1
  347. package/dist/types/lib/utils.d.ts +0 -3
  348. package/dist/types/lib/utils.d.ts.map +0 -1
  349. package/dist/types/mocks/index.d.ts +0 -3
  350. package/dist/types/mocks/index.d.ts.map +0 -1
  351. package/dist/types/mocks/mockCheckoutFlow.d.ts +0 -25
  352. package/dist/types/mocks/mockCheckoutFlow.d.ts.map +0 -1
  353. package/dist/types/mocks/mockData.d.ts +0 -6
  354. package/dist/types/mocks/mockData.d.ts.map +0 -1
  355. package/dist/types/mocks/mockSessionData.d.ts +0 -38
  356. package/dist/types/mocks/mockSessionData.d.ts.map +0 -1
  357. package/dist/types/order.d.ts.map +0 -1
  358. package/dist/types/payment.d.ts +0 -55
  359. package/dist/types/payment.d.ts.map +0 -1
  360. package/dist/types/services/apiService.d.ts +0 -406
  361. package/dist/types/services/apiService.d.ts.map +0 -1
  362. package/dist/types/services/linkTokenService.d.ts +0 -7
  363. package/dist/types/services/linkTokenService.d.ts.map +0 -1
  364. package/dist/types/services/mockSessionService.d.ts +0 -65
  365. package/dist/types/services/mockSessionService.d.ts.map +0 -1
  366. package/dist/types/session.d.ts.map +0 -1
  367. package/dist/types/types/cardElement.d.ts +0 -157
  368. package/dist/types/types/cardElement.d.ts.map +0 -1
  369. package/dist/types/types/drawer.d.ts +0 -33
  370. package/dist/types/types/drawer.d.ts.map +0 -1
  371. package/dist/types/types/index.d.ts.map +0 -1
  372. package/dist/types/types/order.d.ts +0 -25
  373. package/dist/types/types/order.d.ts.map +0 -1
  374. package/dist/types/types/payment.d.ts.map +0 -1
  375. package/dist/types/types/session.d.ts +0 -165
  376. package/dist/types/types/session.d.ts.map +0 -1
  377. package/dist/types/utils/credentialStatus.d.ts.map +0 -1
  378. package/dist/types/utils/deviceFingerprint.d.ts +0 -27
  379. package/dist/types/utils/deviceFingerprint.d.ts.map +0 -1
  380. package/dist/types/utils/environment.d.ts.map +0 -1
  381. package/dist/types/utils/formatting.d.ts +0 -41
  382. package/dist/types/utils/formatting.d.ts.map +0 -1
  383. package/dist/types/utils/index.d.ts +0 -4
  384. package/dist/types/utils/index.d.ts.map +0 -1
  385. package/dist/types/utils/linkFormat.d.ts +0 -17
  386. package/dist/types/utils/linkFormat.d.ts.map +0 -1
  387. package/dist/types/utils/linkPopup.d.ts.map +0 -1
  388. package/dist/types/utils/selectCard.d.ts.map +0 -1
  389. package/dist/types/utils/text.d.ts.map +0 -1
  390. package/dist/types/utils/validation.d.ts +0 -90
  391. package/dist/types/utils/validation.d.ts.map +0 -1
  392. package/dist/utils/credentialStatus.d.ts +0 -8
  393. package/dist/utils/credentialStatus.d.ts.map +0 -1
  394. package/dist/utils/deviceFingerprint.d.ts.map +0 -1
  395. package/dist/utils/environment.d.ts +0 -22
  396. package/dist/utils/environment.d.ts.map +0 -1
  397. package/dist/utils/formatting.d.ts.map +0 -1
  398. package/dist/utils/index.d.ts +0 -4
  399. package/dist/utils/index.d.ts.map +0 -1
  400. package/dist/utils/linkFormat.d.ts +0 -17
  401. package/dist/utils/linkFormat.d.ts.map +0 -1
  402. package/dist/utils/linkPopup.d.ts +0 -19
  403. package/dist/utils/linkPopup.d.ts.map +0 -1
  404. package/dist/utils/selectCard.d.ts +0 -18
  405. package/dist/utils/selectCard.d.ts.map +0 -1
  406. package/dist/utils/text.d.ts +0 -12
  407. package/dist/utils/text.d.ts.map +0 -1
  408. 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.