@voxepay/checkout 0.5.0 → 0.5.1

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/src/types.ts CHANGED
@@ -18,6 +18,16 @@ export interface VoxePayConfig {
18
18
  locale?: string;
19
19
  /** Custom CSS variables to override default theme */
20
20
  customStyles?: Partial<VoxePayTheme>;
21
+ /**
22
+ * Simulate webhook on payment status polling (useful for testing in dev/sandbox).
23
+ * When true, the API will trigger a simulated webhook on each status check.
24
+ */
25
+ simulateWebhook?: boolean;
26
+ /**
27
+ * Bypass key required when simulateWebhook is true.
28
+ * Only needed in sandbox/testing environments.
29
+ */
30
+ bypassKey?: string;
21
31
  }
22
32
 
23
33
  /**
@@ -83,6 +93,8 @@ export interface CheckoutOptions {
83
93
  apiKey: string;
84
94
  organizationId: string;
85
95
  baseUrl?: string;
96
+ simulateWebhook?: boolean;
97
+ bypassKey?: string;
86
98
  };
87
99
  /** Callback when payment succeeds */
88
100
  onSuccess: (result: PaymentResult) => void;
package/src/voxepay.ts CHANGED
@@ -109,6 +109,8 @@ class VoxePaySDK {
109
109
  apiKey: this.config!.apiKey,
110
110
  organizationId: this.config!.organizationId,
111
111
  baseUrl: this.config!.baseUrl,
112
+ simulateWebhook: this.config!.simulateWebhook,
113
+ bypassKey: this.config!.bypassKey,
112
114
  },
113
115
  onClose: () => {
114
116
  this.currentModal = null;