@glomopay/react-native-sdk 3.0.1 → 3.1.0

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 (40) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/MIGRATION.md +50 -0
  3. package/README.md +131 -50
  4. package/lib/glomo-checkout.d.ts.map +1 -1
  5. package/lib/glomo-checkout.js +38 -1
  6. package/lib/glomo-standard-checkout.d.ts +20 -0
  7. package/lib/glomo-standard-checkout.d.ts.map +1 -1
  8. package/lib/glomo-standard-checkout.js +14 -3
  9. package/lib/glomo-subscriptions-checkout.d.ts +8 -0
  10. package/lib/glomo-subscriptions-checkout.d.ts.map +1 -0
  11. package/lib/glomo-subscriptions-checkout.js +85 -0
  12. package/lib/index.d.ts +1 -1
  13. package/lib/index.d.ts.map +1 -1
  14. package/lib/types/checkout.d.ts +15 -3
  15. package/lib/types/checkout.d.ts.map +1 -1
  16. package/lib/types/subscriptions-checkout.d.ts +29 -0
  17. package/lib/types/subscriptions-checkout.d.ts.map +1 -0
  18. package/lib/types/subscriptions-checkout.js +3 -0
  19. package/lib/use-glomo-checkout.d.ts +34 -4
  20. package/lib/use-glomo-checkout.d.ts.map +1 -1
  21. package/lib/use-glomo-checkout.js +92 -13
  22. package/lib/use-standard-checkout.d.ts +11 -2
  23. package/lib/use-standard-checkout.d.ts.map +1 -1
  24. package/lib/use-standard-checkout.js +52 -35
  25. package/lib/utils/analytics.d.ts +87 -2
  26. package/lib/utils/analytics.d.ts.map +1 -1
  27. package/lib/utils/analytics.js +356 -15
  28. package/lib/utils/device-compliance.d.ts.map +1 -1
  29. package/lib/utils/device-compliance.js +0 -1
  30. package/package.json +15 -4
  31. package/src/glomo-checkout.tsx +79 -5
  32. package/src/glomo-standard-checkout.tsx +33 -4
  33. package/src/glomo-subscriptions-checkout.tsx +83 -0
  34. package/src/index.ts +1 -1
  35. package/src/types/checkout.ts +10 -3
  36. package/src/types/subscriptions-checkout.ts +31 -0
  37. package/src/use-glomo-checkout.tsx +158 -17
  38. package/src/use-standard-checkout.tsx +70 -52
  39. package/src/utils/analytics.ts +482 -17
  40. package/src/utils/device-compliance.ts +0 -1
package/lib/index.d.ts CHANGED
@@ -3,5 +3,5 @@ export { GlomoCheckout } from "./glomo-checkout";
3
3
  export { type GlomoCheckoutRef, type GlomoCheckoutProps, type GlomoCheckoutPayload, type CheckoutStatus, type GlomoBankTransferPayload, type GlomoPayViaBankConnectionPayload, } from "./types/checkout";
4
4
  export { type GlomoServer } from "./config/base";
5
5
  export { type SdkError } from "./utils/analytics";
6
- export { useGlomoCheckout } from "./use-glomo-checkout";
6
+ export { useGlomoCheckout, type UseGlomoCheckoutReturn } from "./use-glomo-checkout";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,GACxC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAGrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EACH,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,gCAAgC,GACxC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -32,11 +32,10 @@ export interface GlomoCheckoutRef {
32
32
  start: () => Promise<boolean>;
33
33
  getStatus: () => CheckoutStatus;
34
34
  }
35
- /** Props for the unified checkout component */
36
- export interface GlomoCheckoutProps {
35
+ /** Shared callback and configuration props for the unified checkout component */
36
+ interface GlomoCheckoutBaseProps {
37
37
  server?: GlomoServer;
38
38
  publicKey: string;
39
- orderId: string;
40
39
  onPaymentSuccess: (payload: GlomoCheckoutPayload) => void;
41
40
  onPaymentFailure: (payload: GlomoCheckoutPayload) => void;
42
41
  onConnectionError?: (error: unknown) => void;
@@ -50,4 +49,17 @@ export interface GlomoCheckoutProps {
50
49
  onUserRefusedCameraPermissions?: () => void;
51
50
  devMode?: boolean;
52
51
  }
52
+ /**
53
+ * Props for the unified checkout component.
54
+ * Exactly one of orderId or subscriptionId must be provided.
55
+ * TypeScript enforces this at compile time; a runtime guard in useGlomoCheckout catches JS consumers.
56
+ */
57
+ export type GlomoCheckoutProps = GlomoCheckoutBaseProps & ({
58
+ orderId: string;
59
+ subscriptionId?: never;
60
+ } | {
61
+ subscriptionId: string;
62
+ orderId?: never;
63
+ });
64
+ export {};
53
65
  //# sourceMappingURL=checkout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkout.d.ts","sourceRoot":"","sources":["../../src/types/checkout.ts"],"names":[],"mappings":"AAAA,oDAAoD;AAEpD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEnD,uFAAuF;AACvF,MAAM,WAAW,oBAAoB;IACjC,OAAO,EAAE,MAAM,CAAC;I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OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,SAAS,EAAE,MAAM,cAAc,CAAC;CACnC;AAED,iFAAiF;AACjF,UAAU,sBAAsB;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IAC9C,uBAAuB,CAAC,EAAE,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IACzF,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC9D,oCAAoC,CAAC,EAAE,CAAC,OAAO,EAAE,gCAAgC,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9G,8BAA8B,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GACnD,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,cAAc,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC,CAAC"}
@@ -0,0 +1,29 @@
1
+ /** Type definitions for the Subscriptions Checkout flow */
2
+ import { type GlomoServer } from "../config/base";
3
+ import { type SdkError } from "../utils/analytics";
4
+ import { type GlomoCheckoutPayload, type GlomoPayViaBankConnectionPayload } from "./checkout";
5
+ import { type StandardCheckoutStatus } from "./standard-checkout";
6
+ /** Props for the subscriptions checkout component */
7
+ export interface GlomoSubscriptionsCheckoutProps {
8
+ server?: GlomoServer;
9
+ publicKey: string;
10
+ subscriptionId: string;
11
+ onPaymentSuccess: (payload: GlomoCheckoutPayload) => void;
12
+ onPaymentFailure: (payload: GlomoCheckoutPayload) => void;
13
+ onConnectionError?: (error: unknown) => void;
14
+ onPaymentTerminate?: () => void;
15
+ onSdkError?: (error: Array<SdkError>) => void;
16
+ onPayViaBankBankConnectionSuccessful?: (payload: GlomoPayViaBankConnectionPayload | null | undefined) => void;
17
+ onUserRefusedCameraPermissions?: () => void;
18
+ devMode?: boolean;
19
+ }
20
+ /**
21
+ * Ref handle for the subscriptions checkout component.
22
+ * Same type as GlomoStandardCheckoutRef - start() is async at the unified level
23
+ * but delegates to the synchronous standard checkout start() internally.
24
+ */
25
+ export interface GlomoSubscriptionsCheckoutRef {
26
+ start: () => boolean;
27
+ getStatus: () => StandardCheckoutStatus;
28
+ }
29
+ //# sourceMappingURL=subscriptions-checkout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscriptions-checkout.d.ts","sourceRoot":"","sources":["../../src/types/subscriptions-checkout.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAE3D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,gCAAgC,EAAE,MAAM,YAAY,CAAC;AAC9F,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAElE,qDAAqD;AACrD,MAAM,WAAW,+BAA+B;IAC5C,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC1D,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC;IAC9C,oCAAoC,CAAC,EAAE,CAAC,OAAO,EAAE,gCAAgC,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9G,8BAA8B,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5C,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC1C,KAAK,EAAE,MAAM,OAAO,CAAC;IACrB,SAAS,EAAE,MAAM,sBAAsB,CAAC;CAC3C"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ /** Type definitions for the Subscriptions Checkout flow */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,20 +5,50 @@
5
5
  import { type GlomoCheckoutProps, type CheckoutStatus } from "./types/checkout";
6
6
  import { type GlomoLrsCheckoutRef } from "./glomo-lrs-checkout";
7
7
  import { type GlomoStandardCheckoutRef } from "./types/standard-checkout";
8
+ import { type GlomoSubscriptionsCheckoutRef } from "./types/subscriptions-checkout";
8
9
  import { type OrderType } from "./services/order-type-fetcher";
9
- /** The return values for the useGlomoCheckout hook */
10
+ /** Extended order type including subscriptions */
11
+ type ExtendedOrderType = OrderType | "subscriptions";
12
+ /**
13
+ * Public return type for useGlomoCheckout.
14
+ * Exposes only start() and getStatus() - no internal refs or state.
15
+ */
10
16
  export interface UseGlomoCheckoutReturn {
11
- orderType: OrderType | null;
17
+ start: () => Promise<boolean>;
18
+ getStatus: () => CheckoutStatus;
19
+ }
20
+ /**
21
+ * Internal return type - used by GlomoCheckout component.
22
+ * Not exported from the public API.
23
+ */
24
+ export interface UseGlomoCheckoutInternalReturn {
25
+ orderType: ExtendedOrderType | null;
12
26
  detecting: boolean;
13
27
  start: () => Promise<boolean>;
14
28
  getStatus: () => CheckoutStatus;
15
29
  innerLrsRef: React.RefObject<GlomoLrsCheckoutRef>;
16
30
  innerStandardRef: React.RefObject<GlomoStandardCheckoutRef>;
31
+ innerSubscriptionsRef: React.RefObject<GlomoSubscriptionsCheckoutRef>;
17
32
  props: GlomoCheckoutProps;
18
33
  }
19
34
  /**
20
- * The main unified checkout hook.
21
- * Validates inputs, detects order type via API, then auto-starts the resolved inner component.
35
+ * @deprecated Legacy hook - will be removed in a future major version.
36
+ *
37
+ * This hook does not provide reactive state. `getStatus()` returns a
38
+ * point-in-time snapshot and does not trigger re-renders on status changes.
39
+ * `start()` returns a promise identical to `GlomoCheckoutRef.start()`.
40
+ *
41
+ * Use the `GlomoCheckout` component with a ref instead:
42
+ *
43
+ * ```tsx
44
+ * const ref = useRef<GlomoCheckoutRef>(null);
45
+ * const started = await ref.current?.start();
46
+ * const status = ref.current?.getStatus();
47
+ * ```
22
48
  */
23
49
  export declare function useGlomoCheckout(props: GlomoCheckoutProps): UseGlomoCheckoutReturn;
50
+ export declare function useGlomoCheckout(props: GlomoCheckoutProps, internalOptions: {
51
+ _suppressDeprecationWarning: true;
52
+ }): UseGlomoCheckoutInternalReturn;
53
+ export {};
24
54
  //# sourceMappingURL=use-glomo-checkout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-glomo-checkout.d.ts","sourceRoot":"","sources":["../src/use-glomo-checkout.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,KAAK,wBA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B,GAAG,IAAI,CAAC;IACpC,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,SAAS,EAAE,MAAM,cAAc,CAAC;IAChC,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;IAClD,gBAAgB,EAAE,KAAK,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IAC5D,qBAAqB,EAAE,KAAK,CAAC,SAAS,CAAC,6BAA6B,CAAC,CAAC;IACtE,KAAK,EAAE,kBAAkB,CAAC;CAC7B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,kBAAkB,GAAG,sBAAsB,CAAC;AACpF,wBAAgB,gBAAgB,CAC5B,KAAK,EAAE,kBAAkB,EACzB,eAAe,EAAE;IAAE,2BAA2B,EAAE,IAAI,CAAA;CAAE,GACvD,8BAA8B,CAAC"}
@@ -9,19 +9,51 @@ const react_1 = require("react");
9
9
  const order_type_fetcher_1 = require("./services/order-type-fetcher");
10
10
  const validation_1 = require("./utils/validation");
11
11
  const analytics_1 = require("./utils/analytics");
12
- /**
13
- * The main unified checkout hook.
14
- * Validates inputs, detects order type via API, then auto-starts the resolved inner component.
15
- */
16
- function useGlomoCheckout(props) {
17
- const { server, publicKey, orderId, onSdkError, devMode = false } = props;
12
+ function useGlomoCheckout(props, internalOptions) {
13
+ var _a, _b;
14
+ const { server, publicKey, orderId, subscriptionId, onSdkError, devMode = false } = props;
18
15
  // Order type resolved from the API - null until detection completes
19
16
  const [orderType, setOrderType] = (0, react_1.useState)(null);
20
17
  // Whether order type detection is in progress
21
18
  const [detecting, setDetecting] = (0, react_1.useState)(false);
22
- // Refs for the inner LRS and Standard checkout components
19
+ // Whether the props have a mutual exclusion error
20
+ const [propsError, setPropsError] = (0, react_1.useState)(false);
21
+ // Stabilizing onSdkError ref to avoid re-running effects on inline callback changes
22
+ const onSdkErrorRef = (0, react_1.useRef)(onSdkError);
23
+ onSdkErrorRef.current = onSdkError;
24
+ // One-time deprecation warning for direct merchant usage
25
+ const suppressWarning = (_a = internalOptions === null || internalOptions === void 0 ? void 0 : internalOptions._suppressDeprecationWarning) !== null && _a !== void 0 ? _a : false;
26
+ const mockMode = (_b = publicKey === null || publicKey === void 0 ? void 0 : publicKey.toLowerCase().startsWith("test_")) !== null && _b !== void 0 ? _b : false;
27
+ const hasWarnedRef = (0, react_1.useRef)(false);
28
+ (0, react_1.useEffect)(() => {
29
+ if (!hasWarnedRef.current && !suppressWarning) {
30
+ hasWarnedRef.current = true;
31
+ console.warn("[Glomo-RN-SDK] useGlomoCheckout is deprecated and will be removed in a future major version. " +
32
+ "Use the GlomoCheckout component with a ref instead. " +
33
+ "This hook does not provide reactive state - getStatus() is a point-in-time snapshot, not a reactive value.");
34
+ (0, analytics_1.trackUseOfUnsupportedFunctionality)("useGlomoCheckout", orderId !== null && orderId !== void 0 ? orderId : subscriptionId, publicKey, devMode, mockMode, "");
35
+ }
36
+ }, [suppressWarning, orderId, subscriptionId, publicKey, devMode, mockMode]);
37
+ // Refs for the inner LRS, Standard, and Subscriptions checkout components
23
38
  const innerLrsRef = (0, react_1.useRef)(null);
24
39
  const innerStandardRef = (0, react_1.useRef)(null);
40
+ const innerSubscriptionsRef = (0, react_1.useRef)(null);
41
+ /** Mutual exclusion guard - firing onSdkError if both or neither id is provided */
42
+ (0, react_1.useEffect)(() => {
43
+ const hasBoth = Boolean(orderId) && Boolean(subscriptionId);
44
+ const hasNeither = !orderId && !subscriptionId;
45
+ if (hasBoth) {
46
+ setPropsError(true);
47
+ (0, validation_1.safeCallback)(onSdkErrorRef.current, [[{ type: "validation_error", message: "Provide either orderId or subscriptionId, not both" }]], "onSdkError", devMode);
48
+ }
49
+ else if (hasNeither) {
50
+ setPropsError(true);
51
+ (0, validation_1.safeCallback)(onSdkErrorRef.current, [[{ type: "validation_error", message: "Provide orderId or subscriptionId" }]], "onSdkError", devMode);
52
+ }
53
+ else {
54
+ setPropsError(false);
55
+ }
56
+ }, [orderId, subscriptionId, devMode]);
25
57
  /**
26
58
  * Tracking whether start() has been called and the inner component needs to be auto-started.
27
59
  * This bridges the gap between order type resolution (async) and inner component mount (next render).
@@ -51,6 +83,9 @@ function useGlomoCheckout(props) {
51
83
  if (orderType === "standard" && innerStandardRef.current) {
52
84
  return innerStandardRef.current.getStatus();
53
85
  }
86
+ if (orderType === "subscriptions" && innerSubscriptionsRef.current) {
87
+ return innerSubscriptionsRef.current.getStatus();
88
+ }
54
89
  return "ready";
55
90
  }, [detecting, orderType]);
56
91
  /**
@@ -66,6 +101,13 @@ function useGlomoCheckout(props) {
66
101
  if (devMode) {
67
102
  console.log("[Glomo-RN-SDK] start() called");
68
103
  }
104
+ // Aborting if mutual exclusion guard detected a props error
105
+ if (propsError) {
106
+ if (devMode) {
107
+ console.error("[Glomo-RN-SDK] start() aborted: invalid orderId/subscriptionId combination");
108
+ }
109
+ return false;
110
+ }
69
111
  // Validating inputs before making the API call
70
112
  const errors = [];
71
113
  if (!(0, validation_1.isValidPublicKey)(publicKey)) {
@@ -75,7 +117,11 @@ function useGlomoCheckout(props) {
75
117
  field: "publicKey",
76
118
  });
77
119
  }
78
- if (!(0, validation_1.isValidOrderId)(orderId)) {
120
+ /**
121
+ * For subscriptions flow, skipping orderId validation entirely - GlomoSubscriptionsCheckout
122
+ * owns subscriptionId validation (trim, empty, prefix). For order flow, validating orderId.
123
+ */
124
+ if (!subscriptionId && !(0, validation_1.isValidOrderId)(orderId)) {
79
125
  errors.push({
80
126
  type: "validation_error",
81
127
  message: "Invalid orderId: must start with 'order_' and be a valid string",
@@ -90,6 +136,23 @@ function useGlomoCheckout(props) {
90
136
  (0, validation_1.safeCallback)(onSdkError, [errors], "onSdkError", devMode);
91
137
  return false;
92
138
  }
139
+ /**
140
+ * For subscriptions, orderType is already "subscriptions" and the inner component is mounted.
141
+ * Calling start() directly - no promise/effect bridge needed since no async detection occurs.
142
+ */
143
+ if (subscriptionId) {
144
+ if (innerSubscriptionsRef.current) {
145
+ const started = innerSubscriptionsRef.current.start();
146
+ if (devMode) {
147
+ console.log(`[Glomo-RN-SDK] Subscriptions inner start() returned: ${started}`);
148
+ }
149
+ return started;
150
+ }
151
+ if (devMode) {
152
+ console.error("[Glomo-RN-SDK] Subscriptions component not mounted");
153
+ }
154
+ return false;
155
+ }
93
156
  // Detecting order type via the API
94
157
  setDetecting(true);
95
158
  const thisGeneration = ++fetchGenerationRef.current;
@@ -97,7 +160,7 @@ function useGlomoCheckout(props) {
97
160
  console.log("[Glomo-RN-SDK] Detecting order type...");
98
161
  }
99
162
  (0, analytics_1.trackOrderTypeDetectionStarted)(orderId, publicKey, devMode);
100
- const result = await (0, order_type_fetcher_1.fetchOrderType)({ orderId, publicKey, server, devMode });
163
+ const result = await (0, order_type_fetcher_1.fetchOrderType)({ orderId: orderId, publicKey, server, devMode });
101
164
  // Discarding stale result if props changed while the fetch was in flight
102
165
  if (thisGeneration !== fetchGenerationRef.current) {
103
166
  if (devMode) {
@@ -126,7 +189,7 @@ function useGlomoCheckout(props) {
126
189
  pendingStartResolveRef.current = resolve;
127
190
  pendingStartRef.current = true;
128
191
  });
129
- }, [devMode, publicKey, orderId, server, onSdkError]);
192
+ }, [devMode, publicKey, orderId, subscriptionId, server, onSdkError, propsError]);
130
193
  /**
131
194
  * Auto-starting the inner component after order type is resolved and the component has rendered.
132
195
  * The pendingStartRef bridges the async gap: start() sets it, and this effect fires after
@@ -152,13 +215,23 @@ function useGlomoCheckout(props) {
152
215
  console.log(`[Glomo-RN-SDK] Standard inner start() returned: ${started}`);
153
216
  }
154
217
  }
218
+ else if (orderType === "subscriptions") {
219
+ // No-op: subscription start() calls the inner component directly (not via this effect bridge).
220
+ // If we reach here, pendingStartRef was set unexpectedly - resolve false defensively.
221
+ pendingStartRef.current = false;
222
+ }
155
223
  // Resolving the merchant's awaited start() promise with the inner component's result
156
224
  if (pendingStartResolveRef.current) {
157
225
  pendingStartResolveRef.current(started);
158
226
  pendingStartResolveRef.current = null;
159
227
  }
160
228
  }, [orderType, devMode]);
161
- // Resetting order type state when orderId or publicKey changes to force re-detection
229
+ /**
230
+ * Resetting order type state when orderId, subscriptionId, or publicKey changes.
231
+ * For subscriptions, setting orderType to "subscriptions" directly (no API call needed).
232
+ * For orders, resetting to null to force re-detection on next start().
233
+ * Single effect owns all orderType transitions to avoid race conditions.
234
+ */
162
235
  (0, react_1.useEffect)(() => {
163
236
  // Invalidating any in-flight fetchOrderType call so its stale result is discarded
164
237
  fetchGenerationRef.current++;
@@ -166,10 +239,15 @@ function useGlomoCheckout(props) {
166
239
  pendingStartResolveRef.current(false);
167
240
  pendingStartResolveRef.current = null;
168
241
  }
169
- setOrderType(null);
170
242
  setDetecting(false);
171
243
  pendingStartRef.current = false;
172
- }, [orderId, publicKey]);
244
+ if (subscriptionId && !orderId) {
245
+ setOrderType("subscriptions");
246
+ }
247
+ else {
248
+ setOrderType(null);
249
+ }
250
+ }, [orderId, subscriptionId, publicKey]);
173
251
  return {
174
252
  orderType,
175
253
  detecting,
@@ -177,6 +255,7 @@ function useGlomoCheckout(props) {
177
255
  getStatus,
178
256
  innerLrsRef,
179
257
  innerStandardRef,
258
+ innerSubscriptionsRef,
180
259
  props,
181
260
  };
182
261
  }
@@ -3,7 +3,7 @@ import React from "react";
3
3
  import { type NativeSyntheticEvent } from "react-native";
4
4
  import { type WebViewNavigation, type WebViewMessageEvent, type WebView } from "react-native-webview";
5
5
  import { type GlomoServer } from "./config/base";
6
- import { type SdkError } from "./utils/analytics";
6
+ import { type SdkError, type CheckoutAnalyticsTrackers } from "./utils/analytics";
7
7
  import { type GlomoBankTransferPayload, type GlomoPayViaBankConnectionPayload } from "./types/checkout";
8
8
  import { type StandardCheckoutStatus, type GlomoStandardCheckoutPayload } from "./types/standard-checkout";
9
9
  /** Android-only WebView permission request, not yet in react-native-webview type definitions */
@@ -60,6 +60,15 @@ export interface UseStandardCheckoutReturn {
60
60
  injectedMain?: string;
61
61
  injectedFlow?: string;
62
62
  }
63
+ /**
64
+ * Internal options for useStandardCheckout.
65
+ * Used by subscription checkout to inject subscription-specific analytics trackers.
66
+ * Not exported to merchants.
67
+ */
68
+ export interface UseStandardCheckoutInternalOptions {
69
+ analyticsTrackers?: CheckoutAnalyticsTrackers;
70
+ _skipOrderIdValidation?: boolean;
71
+ }
63
72
  /** The main SDK hook for the GlomoPay Standard Checkout flow */
64
- export declare function useStandardCheckout({ server, publicKey, orderId, onPaymentSuccess, onPaymentFailure, onConnectionError, onPaymentTerminate, onSdkError, onBankTransferSubmitted, onPayViaBankCompleted, onPayViaBankBankConnectionSuccessful, onUserRefusedCameraPermissions, devMode, }: UseStandardCheckoutOptions, mockMode: boolean): UseStandardCheckoutReturn;
73
+ export declare function useStandardCheckout({ server, publicKey, orderId, onPaymentSuccess, onPaymentFailure, onConnectionError, onPaymentTerminate, onSdkError, onBankTransferSubmitted, onPayViaBankCompleted, onPayViaBankBankConnectionSuccessful, onUserRefusedCameraPermissions, devMode, }: UseStandardCheckoutOptions, mockMode: boolean, internalOptions?: UseStandardCheckoutInternalOptions): UseStandardCheckoutReturn;
65
74
  //# sourceMappingURL=use-standard-checkout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-standard-checkout.d.ts","sourceRoot":"","sources":["../src/use-standard-checkout.tsx"],"names":[],"mappings":"AAAA,4DAA4D;AAE5D,OAAO,KAA4D,MAAM,OAAO,CAAC;AACjF,OAAO,EAAgC,KAAK,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEvF,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAItG,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAGtE,OAAO,EAeH,KAAK,QAAQ,EAChB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,gCAAgC,EAAE,MA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