@flopay/js 1.3.3 → 1.4.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.
- package/README.md +32 -2
- package/dist/index.cjs +2037 -175
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -35
- package/dist/index.d.ts +47 -35
- package/dist/index.mjs +2015 -139
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ const flopay = await loadFloPay('pk_test_...', {
|
|
|
24
24
|
});
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
`loadFloPay` caches the instance -- calling it again with the same key returns the cached `FloPay` instance. The optional second argument accepts a `FloPayConfig` with `billingApiUrl`, `locale`, and `
|
|
27
|
+
`loadFloPay` caches the instance -- calling it again with the same key returns the cached `FloPay` instance. The optional second argument accepts a `FloPayConfig` with `billingApiUrl`, `locale`, `appearance`, and `telemetry`; set `telemetry: false` to opt out of privacy-safe operational telemetry.
|
|
28
28
|
|
|
29
29
|
### Create and Mount Elements
|
|
30
30
|
|
|
@@ -233,6 +233,36 @@ try {
|
|
|
233
233
|
|
|
234
234
|
## API Reference
|
|
235
235
|
|
|
236
|
+
## Privacy-safe operational telemetry
|
|
237
|
+
|
|
238
|
+
Browser telemetry is enabled by default and is best-effort. It reports only
|
|
239
|
+
the closed SDK error/lifecycle/performance taxonomy through a Flo-owned API;
|
|
240
|
+
it never bundles Sentry, reads Resource Timing, persists a queue, or transmits
|
|
241
|
+
payment/customer/form data, credentials, URLs, provider payloads, arbitrary
|
|
242
|
+
messages, or stacks. Existing merchant callbacks remain available with their
|
|
243
|
+
existing arguments and invocation order. Callback exceptions and rejected
|
|
244
|
+
promises are contained and logged only to the merchant console; they are not
|
|
245
|
+
uploaded as SDK telemetry.
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
const flopay = await loadFloPay('pk_live_…', {
|
|
249
|
+
telemetry: false, // merchant opt-out
|
|
250
|
+
});
|
|
251
|
+
|
|
252
|
+
const api = new PaymentAPI(billingApiUrl, { telemetry: false });
|
|
253
|
+
const vault = new PciVaultCardCapture({ telemetry: false });
|
|
254
|
+
await createCheckoutSession({ /* normal checkout fields… */ telemetry: false });
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
There is no custom telemetry endpoint or enrichment option. See
|
|
258
|
+
[`docs/TELEMETRY.md`](../../docs/TELEMETRY.md) for collected categories,
|
|
259
|
+
exclusions, unauthenticated beacon transport, failure isolation, retention,
|
|
260
|
+
and rollout gates.
|
|
261
|
+
|
|
262
|
+
The same default-on behavior and boolean opt-out apply to direct `FloPay`,
|
|
263
|
+
`PaymentAPI`, `createCheckoutSession`, `createCheckoutSessionWithRetries`, and
|
|
264
|
+
`PciVaultCardCapture` usage.
|
|
265
|
+
|
|
236
266
|
### Exports
|
|
237
267
|
|
|
238
268
|
| Export | Description |
|
|
@@ -242,7 +272,7 @@ try {
|
|
|
242
272
|
| `FloPayElements` | Element group manager. Methods: `create(type, options?)`, `getElement(type)`, `submit()`, `destroy()` |
|
|
243
273
|
| `StripeAdapter` | `PaymentProviderAdapter` implementation for Stripe |
|
|
244
274
|
| `PciVaultCardCapture` | `CardCaptureAdapter` implementation that injects the backend-served hosted vault card widget. See [Vault card capture](#vault-card-capture). |
|
|
245
|
-
| `PaymentAPI` | Billing API client. Methods: `getCheckoutSession()`, `getVaultCapture()`, `getUnifiedCheckoutSession()`, `processPayment()`, `waitForCheckoutSessionCompletion()`, `createPaymentIntent()`, `createSetupIntent()`, `getPaymentsByEmail()` |
|
|
275
|
+
| `PaymentAPI` | Billing API client. Methods: `getCheckoutSession()`, `getVaultCapture()`, `getUnifiedCheckoutSession()`, `processPayment()`, `waitForCheckoutSessionCompletion()`, `createPaymentIntent()`, `createSetupIntent()`, `getPaymentsByEmail()`, `destroy()` |
|
|
246
276
|
| `createCheckoutSession(options)` | Creates a checkout session and redirects. Returns `CheckoutSessionResult`. |
|
|
247
277
|
| `createCheckoutSessionWithRetries(options)` | Same as above with automatic retries (default 3, exponential backoff). |
|
|
248
278
|
|