@flopay/shared 1.1.5 → 1.2.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 +5 -1
- package/dist/index.cjs +510 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +298 -2
- package/dist/index.d.ts +298 -2
- package/dist/index.mjs +496 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -250,6 +250,18 @@ interface CheckoutGateway {
|
|
|
250
250
|
* direct PayPal SDK.
|
|
251
251
|
*/
|
|
252
252
|
paypalPublishableKey?: string | null;
|
|
253
|
+
/**
|
|
254
|
+
* Per-session list of payment method type identifiers that the gateway has
|
|
255
|
+
* enabled for this consumer (e.g. `['apple_pay', 'google_pay', 'cashapp',
|
|
256
|
+
* 'klarna']`). Populated by the billing API after looking up the gateway's
|
|
257
|
+
* Payment Method Configurations. The SDK partitions this list against
|
|
258
|
+
* {@link STRIPE_EXPRESS_METHODS} to decide which methods render in the
|
|
259
|
+
* `ExpressCheckoutElement` row (Apple Pay / Google Pay / PayPal / Link /
|
|
260
|
+
* Amazon Pay / Klarna) vs the `PaymentElement` accordion (Cash App Pay /
|
|
261
|
+
* Affirm / iDEAL / Bancontact / …). `card` is always filtered out — the
|
|
262
|
+
* card path stays on the split-fields elements. Absent on legacy backends.
|
|
263
|
+
*/
|
|
264
|
+
enabledPaymentMethods?: string[];
|
|
253
265
|
}
|
|
254
266
|
/**
|
|
255
267
|
* Map of gateways attached to a session, keyed by gateway code. A session can
|
|
@@ -500,7 +512,26 @@ interface TokenizedBody {
|
|
|
500
512
|
type?: string;
|
|
501
513
|
threeDSecureActionResultTokenId?: string;
|
|
502
514
|
originalPaymentMethodId?: string;
|
|
515
|
+
/**
|
|
516
|
+
* @deprecated Use {@link TokenizedBody.gateway} + {@link TokenizedBody.paymentMethodType}.
|
|
517
|
+
* Still populated by the SDK for PayPal payments so backends that gate on
|
|
518
|
+
* `isPaypal === 'true'` keep working through the deprecation window.
|
|
519
|
+
*/
|
|
503
520
|
isPaypal?: boolean;
|
|
521
|
+
/**
|
|
522
|
+
* Upstream gateway that produced the token. `'stripe'` covers every Stripe
|
|
523
|
+
* payment method (card / wallets / Cash App Pay / Klarna / …); `'paypal'`
|
|
524
|
+
* is set when DirectPayPalButton produced the token via the PayPal JS SDK.
|
|
525
|
+
* Backend should route `/process` by `(gateway, paymentMethodType)` instead
|
|
526
|
+
* of branching on `isPaypal` once consumers have adopted the new fields.
|
|
527
|
+
*/
|
|
528
|
+
gateway?: BillingProvider | (string & {});
|
|
529
|
+
/**
|
|
530
|
+
* Concrete payment method type. For Stripe gateways this mirrors the Stripe
|
|
531
|
+
* PaymentMethod.type value (`'card'`, `'apple_pay'`, `'google_pay'`,
|
|
532
|
+
* `'cashapp'`, `'klarna'`, …). For PayPal it is the literal `'paypal'`.
|
|
533
|
+
*/
|
|
534
|
+
paymentMethodType?: string;
|
|
504
535
|
}
|
|
505
536
|
/** Structured checkout-processing error returned by the billing API. */
|
|
506
537
|
interface CheckoutProcessError {
|
|
@@ -552,6 +583,13 @@ interface NormalizedCheckoutSession {
|
|
|
552
583
|
*/
|
|
553
584
|
paypalPublishableKey?: string;
|
|
554
585
|
environment?: GatewayEnvironment;
|
|
586
|
+
/**
|
|
587
|
+
* Mirrors {@link CheckoutGateway.enabledPaymentMethods}. Drives dynamic
|
|
588
|
+
* `ExpressCheckoutElement` / `PaymentElement` rendering inside
|
|
589
|
+
* `SplitCardForm` instead of the historic hardcoded Apple/Google/PayPal
|
|
590
|
+
* set. Absent on backends that have not yet adopted the field.
|
|
591
|
+
*/
|
|
592
|
+
enabledPaymentMethods?: string[];
|
|
555
593
|
};
|
|
556
594
|
/**
|
|
557
595
|
* Direct PayPal gateway configuration. Present only when the backend has
|
|
@@ -935,7 +973,7 @@ declare function getConfiguredBillingApiUrl(): string;
|
|
|
935
973
|
declare function getFloPayEnvironment(): FloPayEnvironment;
|
|
936
974
|
|
|
937
975
|
/** Current SDK version. */
|
|
938
|
-
declare const SDK_VERSION = "1.
|
|
976
|
+
declare const SDK_VERSION = "1.2.0";
|
|
939
977
|
/** Billing API URL for staging environment. */
|
|
940
978
|
declare const BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
|
|
941
979
|
/** Billing API URL for production environment. */
|
|
@@ -1031,6 +1069,264 @@ declare const THEMES: Record<ThemeBundleId, ThemeBundle>;
|
|
|
1031
1069
|
* `appearance` / `buttonsStyles` props still override the resolved bundle.
|
|
1032
1070
|
*/
|
|
1033
1071
|
declare function resolveTheme(id?: ThemeId | null): ThemeBundle | undefined;
|
|
1072
|
+
/**
|
|
1073
|
+
* Map Stripe wire identifiers (`apple_pay`, `google_pay`, `amazon_pay`) to the
|
|
1074
|
+
* camelCase keys that `ExpressCheckoutElement`'s `paymentMethods` options
|
|
1075
|
+
* map expects. Everything not in this map is already camelCase compatible.
|
|
1076
|
+
*/
|
|
1077
|
+
declare function stripeExpressMethodToOptionKey(method: string): string;
|
|
1078
|
+
/**
|
|
1079
|
+
* Per-method metadata for every Stripe payment-method type the SDK
|
|
1080
|
+
* recognises. One source of truth instead of half a dozen disjoint maps —
|
|
1081
|
+
* `STRIPE_METHOD_CURRENCIES`, `STRIPE_METHOD_AMOUNT_LIMITS`, the React
|
|
1082
|
+
* package's display-name table, and the inline-form heuristic all derive
|
|
1083
|
+
* from entries here.
|
|
1084
|
+
*
|
|
1085
|
+
* Source: Stripe payment-method support matrices at
|
|
1086
|
+
* <https://docs.stripe.com/payments/payment-methods/integration-options>.
|
|
1087
|
+
* Update entries when Stripe ships a new currency / amount limit / method
|
|
1088
|
+
* — the SDK falls back to safe defaults for any wire identifier not listed.
|
|
1089
|
+
*/
|
|
1090
|
+
interface StripeMethodEntry {
|
|
1091
|
+
/**
|
|
1092
|
+
* Human-readable label, used by consumers for "Pay with X" buttons and
|
|
1093
|
+
* other UI surfaces that need the brand name.
|
|
1094
|
+
*/
|
|
1095
|
+
displayName: string;
|
|
1096
|
+
/**
|
|
1097
|
+
* Lowercase ISO-4217 currency codes Stripe accepts for this method. The
|
|
1098
|
+
* sentinel `'*'` means "currency-agnostic" — only the universal big-button
|
|
1099
|
+
* wallets (Apple Pay / Google Pay) use this today.
|
|
1100
|
+
*/
|
|
1101
|
+
currencies: readonly string[];
|
|
1102
|
+
/**
|
|
1103
|
+
* Uppercase ISO 3166-1 alpha-2 codes for the buyer countries Stripe makes
|
|
1104
|
+
* this method available to (matched against the session customer's
|
|
1105
|
+
* country). Many local APMs are country-gated independently of currency —
|
|
1106
|
+
* Bancontact is Belgium-only, EPS Austria-only, iDEAL Netherlands-only,
|
|
1107
|
+
* SEPA Debit the whole SEPA zone — so a EUR cart still must not offer
|
|
1108
|
+
* Bancontact to a Dutch buyer.
|
|
1109
|
+
*
|
|
1110
|
+
* **Omit** for methods with no meaningful country restriction (the global
|
|
1111
|
+
* wallets, Alipay, Klarna, …) — a missing list means "no country gate", so
|
|
1112
|
+
* the method passes {@link filterStripeMethodsByCountry} for every buyer.
|
|
1113
|
+
*/
|
|
1114
|
+
countries?: readonly string[];
|
|
1115
|
+
/**
|
|
1116
|
+
* Per-currency amount min/max in the smallest currency unit (cents for USD,
|
|
1117
|
+
* pence for GBP, etc.). Omit when there is no notable limit. Stripe's
|
|
1118
|
+
* `/v1/elements/sessions` rejects the whole accordion when an entry is in
|
|
1119
|
+
* `paymentMethodTypes` and the deferred-intent amount falls outside its
|
|
1120
|
+
* advertised range, so filtering here matches Stripe's reality.
|
|
1121
|
+
*/
|
|
1122
|
+
amounts?: Record<string, {
|
|
1123
|
+
min?: number;
|
|
1124
|
+
max?: number;
|
|
1125
|
+
}>;
|
|
1126
|
+
/**
|
|
1127
|
+
* True when this method renders inside Stripe's `ExpressCheckoutElement`
|
|
1128
|
+
* (apple_pay, google_pay, paypal, link, amazon_pay, klarna). Everything
|
|
1129
|
+
* else lives in the `PaymentElement` accordion.
|
|
1130
|
+
*/
|
|
1131
|
+
express?: boolean;
|
|
1132
|
+
/**
|
|
1133
|
+
* When `false`, the SDK auto-submits the moment the buyer clicks the
|
|
1134
|
+
* method card — the buyer is taken straight to Stripe's authorization UI
|
|
1135
|
+
* (popup / redirect) without an intermediate confirm step. Only set this
|
|
1136
|
+
* for *pure* redirect-only methods that have no inline data collection
|
|
1137
|
+
* (Cash App, Affirm).
|
|
1138
|
+
*
|
|
1139
|
+
* **Default `true`**: render an explicit "Pay with X" button at the
|
|
1140
|
+
* bottom of the accordion. Safer-by-default — any new/unknown APM, or
|
|
1141
|
+
* any method whose Stripe UI changes to add inline inputs, will surface
|
|
1142
|
+
* a deliberate confirm action instead of silently auto-submitting on a
|
|
1143
|
+
* stray keystroke. Bancontact / Giropay are theoretically redirect-only
|
|
1144
|
+
* but ship with a Name input by default, so they stay on the default
|
|
1145
|
+
* (button) path.
|
|
1146
|
+
*/
|
|
1147
|
+
needsExplicitConfirm?: boolean;
|
|
1148
|
+
/**
|
|
1149
|
+
* Per-mode brand styling for the method tile button. The SDK looks up
|
|
1150
|
+
* `theme.dark` when the active FloPay theme is one of the `*-dark`
|
|
1151
|
+
* bundles, otherwise `theme.light` (also used for `classic`, since
|
|
1152
|
+
* brand assets are designed primarily against light surfaces).
|
|
1153
|
+
*
|
|
1154
|
+
* Entries are optional — methods without a `theme` fall back to the
|
|
1155
|
+
* neutral tile styling derived from the theme's `buttonsStyles.cardButton`
|
|
1156
|
+
* + `derivePrimaryTileStyle`. Consumers can override per-tile via
|
|
1157
|
+
* `buttonAppearance` on the inner component.
|
|
1158
|
+
*/
|
|
1159
|
+
theme?: {
|
|
1160
|
+
light?: StripeMethodThemeVariant;
|
|
1161
|
+
dark?: StripeMethodThemeVariant;
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
/**
|
|
1165
|
+
* Per-mode visual treatment for a Stripe method tile button. Applies brand
|
|
1166
|
+
* colors and (optionally) an inline mark so each APM tile reads
|
|
1167
|
+
* unmistakably as itself.
|
|
1168
|
+
*
|
|
1169
|
+
* `logoSvg` is an inline SVG string rendered at ~22px tall inside the
|
|
1170
|
+
* button before the label. The SDK ships a small generic placeholder mark
|
|
1171
|
+
* per method (a colored disc + initial) authored as original geometry —
|
|
1172
|
+
* **not** a reproduction of any official trademarked logo. Consumers who
|
|
1173
|
+
* have rights to a brand's artwork can replace these per-entry by
|
|
1174
|
+
* overriding the matrix in their own deployment.
|
|
1175
|
+
*/
|
|
1176
|
+
interface StripeMethodThemeVariant {
|
|
1177
|
+
backgroundColor?: string;
|
|
1178
|
+
borderColor?: string;
|
|
1179
|
+
textColor?: string;
|
|
1180
|
+
/**
|
|
1181
|
+
* Inline SVG markup, e.g. `'<svg viewBox="0 0 24 24">…</svg>'`. Trusted
|
|
1182
|
+
* by the renderer (mounted via `dangerouslySetInnerHTML`) — only edit
|
|
1183
|
+
* via this matrix or a controlled override; never wire user input here.
|
|
1184
|
+
*/
|
|
1185
|
+
logoSvg?: string;
|
|
1186
|
+
}
|
|
1187
|
+
declare const STRIPE_METHOD_MATRIX: Record<string, StripeMethodEntry>;
|
|
1188
|
+
/**
|
|
1189
|
+
* Whether a method's `logoSvg` is a vendored real brand logo (from
|
|
1190
|
+
* `fetch:logos`) rather than the SDK's generated placeholder mark. Tile
|
|
1191
|
+
* buttons use this to size the gap between logo and label: the real logos
|
|
1192
|
+
* are self-contained cards that read as a separate mark (8px gap), whereas
|
|
1193
|
+
* the generated placeholder monogram reads as part of the label (0px gap).
|
|
1194
|
+
*/
|
|
1195
|
+
declare function hasVendoredStripeMethodLogo(type: string | null | undefined): boolean;
|
|
1196
|
+
/**
|
|
1197
|
+
* Stripe payment method types that render as native big buttons in the
|
|
1198
|
+
* `ExpressCheckoutElement`. Everything else falls into the `PaymentElement`
|
|
1199
|
+
* accordion. Derived from {@link STRIPE_METHOD_MATRIX} entries flagged
|
|
1200
|
+
* `express: true` — insertion order in the matrix dictates the wallet-row
|
|
1201
|
+
* ordering (apple_pay → google_pay → paypal → link → amazon_pay → klarna).
|
|
1202
|
+
*/
|
|
1203
|
+
declare const STRIPE_EXPRESS_METHODS: readonly string[];
|
|
1204
|
+
/**
|
|
1205
|
+
* Stripe payment-method → supported-currencies map. Derived from
|
|
1206
|
+
* {@link STRIPE_METHOD_MATRIX} — kept as a separate export for callers that
|
|
1207
|
+
* just want the currency list without the rest of the entry.
|
|
1208
|
+
*
|
|
1209
|
+
* Stripe rejects the entire `PaymentElement` mount with an `IntegrationError`
|
|
1210
|
+
* when `paymentMethodTypes` contains a method that doesn't support the session
|
|
1211
|
+
* currency (e.g. `bancontact` on a USD session). The SDK drops those methods
|
|
1212
|
+
* before forwarding them to Stripe so a single mis-matched method doesn't
|
|
1213
|
+
* blank out the whole accordion.
|
|
1214
|
+
*
|
|
1215
|
+
* Unknown methods (anything not in the matrix) pass through unchanged so a
|
|
1216
|
+
* brand-new Stripe APM keeps working until the matrix is refreshed.
|
|
1217
|
+
*/
|
|
1218
|
+
declare const STRIPE_METHOD_CURRENCIES: Record<string, readonly string[]>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Stripe payment-method → supported-buyer-countries map (uppercase ISO
|
|
1221
|
+
* 3166-1 alpha-2). Derived from {@link STRIPE_METHOD_MATRIX}; only methods
|
|
1222
|
+
* that declared a `countries` list appear here. Methods absent from this map
|
|
1223
|
+
* have no country gate and are offered to every buyer (subject to the
|
|
1224
|
+
* currency / amount filters).
|
|
1225
|
+
*
|
|
1226
|
+
* Local APMs like Bancontact (BE), EPS (AT) and iDEAL (NL) are available
|
|
1227
|
+
* only to buyers in their home country even on a EUR cart, so the SDK drops
|
|
1228
|
+
* them when the session customer's country doesn't match — mirroring what
|
|
1229
|
+
* Stripe's `PaymentElement` would do from the buyer's locale anyway.
|
|
1230
|
+
*/
|
|
1231
|
+
declare const STRIPE_METHOD_COUNTRIES: Record<string, readonly string[]>;
|
|
1232
|
+
/**
|
|
1233
|
+
* Display-name lookup. Falls back to a title-cased version of the wire id
|
|
1234
|
+
* (e.g. `au_becs_debit` → `Au Becs Debit`) for methods not in the matrix so
|
|
1235
|
+
* a brand-new APM still produces a legible label until the matrix catches up.
|
|
1236
|
+
*/
|
|
1237
|
+
declare function getStripeMethodDisplayName(type: string | null | undefined): string;
|
|
1238
|
+
/**
|
|
1239
|
+
* Whether the SDK should render an explicit "Pay with X" button for this
|
|
1240
|
+
* method rather than auto-submitting on click. Defaults to `true` (safer for
|
|
1241
|
+
* unknown methods) — only methods explicitly flagged `needsExplicitConfirm:
|
|
1242
|
+
* false` in the matrix (Cash App, Affirm) auto-submit.
|
|
1243
|
+
*/
|
|
1244
|
+
declare function needsStripeMethodExplicitConfirm(type: string | null | undefined): boolean;
|
|
1245
|
+
/**
|
|
1246
|
+
* Resolve the per-mode brand styling for a method tile button, given the
|
|
1247
|
+
* active FloPay theme id. Returns `null` when the method has no `theme`
|
|
1248
|
+
* entry in the matrix — callers fall back to the neutral tile styling
|
|
1249
|
+
* derived from `buttonsStyles.cardButton`.
|
|
1250
|
+
*
|
|
1251
|
+
* Theme-id → variant rule:
|
|
1252
|
+
* - `*-dark` themes get `theme.dark` (then `theme.light` as fallback).
|
|
1253
|
+
* - Everything else (`classic`, `*-light`, undefined) gets `theme.light`.
|
|
1254
|
+
*/
|
|
1255
|
+
declare function resolveStripeMethodBrandVariant(type: string | null | undefined, themeId: ThemeId | null | undefined): StripeMethodThemeVariant | null;
|
|
1256
|
+
/**
|
|
1257
|
+
* Filter a Stripe payment-method wire-identifier list down to those that
|
|
1258
|
+
* support the supplied ISO-4217 currency code. Unknown methods (anything not
|
|
1259
|
+
* in {@link STRIPE_METHOD_CURRENCIES}) pass through unchanged so a brand-new
|
|
1260
|
+
* Stripe APM keeps working until the SDK ships an updated map.
|
|
1261
|
+
*
|
|
1262
|
+
* The currency comparison is case-insensitive (`USD` and `usd` both match).
|
|
1263
|
+
* An empty / missing currency disables filtering entirely (returns the input
|
|
1264
|
+
* list as-is) — callers that don't know the currency are still better off
|
|
1265
|
+
* letting Stripe fail loudly than dropping everything to silence.
|
|
1266
|
+
*/
|
|
1267
|
+
declare function filterStripeMethodsByCurrency(methods: readonly string[] | undefined, currency: string | undefined): string[];
|
|
1268
|
+
/**
|
|
1269
|
+
* Filter a Stripe payment-method wire-identifier list down to those available
|
|
1270
|
+
* to the supplied buyer country (ISO 3166-1 alpha-2). Methods with no country
|
|
1271
|
+
* gate in {@link STRIPE_METHOD_COUNTRIES} — the global wallets, Alipay,
|
|
1272
|
+
* Klarna, unknown methods — pass through unchanged.
|
|
1273
|
+
*
|
|
1274
|
+
* The country comparison is case-insensitive (`be` and `BE` both match). An
|
|
1275
|
+
* empty / missing country disables filtering entirely (returns the input list
|
|
1276
|
+
* as-is) — when the session doesn't know the buyer's country we'd rather let
|
|
1277
|
+
* Stripe make the final call than drop every country-gated method.
|
|
1278
|
+
*/
|
|
1279
|
+
declare function filterStripeMethodsByCountry(methods: readonly string[] | undefined, country: string | undefined): string[];
|
|
1280
|
+
/**
|
|
1281
|
+
* Per-method amount limits (in the smallest currency unit, e.g. cents for USD)
|
|
1282
|
+
* keyed by Stripe wire identifier and then currency code. Derived from
|
|
1283
|
+
* {@link STRIPE_METHOD_MATRIX} — kept as a separate export for callers that
|
|
1284
|
+
* just want the amount limits without the rest of the entry.
|
|
1285
|
+
*
|
|
1286
|
+
* Stripe's `/v1/elements/sessions` endpoint hard-400's when
|
|
1287
|
+
* `paymentMethodTypes` contains a method whose per-currency minimum or
|
|
1288
|
+
* maximum is violated by the deferred-intent amount — and a single rejected
|
|
1289
|
+
* method blanks out the entire `PaymentElement` accordion ("Frame not
|
|
1290
|
+
* initialized" / empty `<div class="">` shell). Filtering here matches
|
|
1291
|
+
* Stripe's reality so an incompatible amount silently drops the offending
|
|
1292
|
+
* method instead of poisoning the whole mount.
|
|
1293
|
+
*/
|
|
1294
|
+
declare const STRIPE_METHOD_AMOUNT_LIMITS: Record<string, Record<string, {
|
|
1295
|
+
min?: number;
|
|
1296
|
+
max?: number;
|
|
1297
|
+
}>>;
|
|
1298
|
+
/**
|
|
1299
|
+
* Filter a Stripe payment-method wire-identifier list down to those whose
|
|
1300
|
+
* per-currency amount range accepts {@link amountInMinorUnits}. Unknown methods
|
|
1301
|
+
* (anything not in {@link STRIPE_METHOD_AMOUNT_LIMITS}) pass through unchanged
|
|
1302
|
+
* so a brand-new Stripe APM keeps working without an SDK update.
|
|
1303
|
+
*
|
|
1304
|
+
* Currency comparison is case-insensitive. Missing currency / amount disables
|
|
1305
|
+
* filtering — callers that don't know the cart yet should pass through the
|
|
1306
|
+
* full list rather than silently dropping everything.
|
|
1307
|
+
*/
|
|
1308
|
+
declare function filterStripeMethodsByAmount(methods: readonly string[] | undefined, currency: string | undefined, amountInMinorUnits: number | undefined): string[];
|
|
1309
|
+
/**
|
|
1310
|
+
* Partition the backend's `enabledPaymentMethods` list into the two SDK
|
|
1311
|
+
* regions inside `SplitCardForm`:
|
|
1312
|
+
*
|
|
1313
|
+
* - `expressMethods` — intersected with {@link STRIPE_EXPRESS_METHODS} so
|
|
1314
|
+
* only `ExpressCheckoutElement`-supported methods land in the big-button
|
|
1315
|
+
* row.
|
|
1316
|
+
* - `paymentElementMethods` — every remaining method (Cash App Pay, Affirm,
|
|
1317
|
+
* iDEAL, Bancontact, SEPA debit, …) for the `PaymentElement` accordion.
|
|
1318
|
+
*
|
|
1319
|
+
* `card` is dropped from both lists — the card path stays on the split
|
|
1320
|
+
* fields. When `options.excludePaypal` is `true`, the SDK is rendering
|
|
1321
|
+
* `DirectPayPalButton` separately and PayPal is also pulled out of the
|
|
1322
|
+
* express list to avoid double-rendering.
|
|
1323
|
+
*/
|
|
1324
|
+
declare function partitionStripeMethods(enabledPaymentMethods: readonly string[] | undefined, options?: {
|
|
1325
|
+
excludePaypal?: boolean;
|
|
1326
|
+
}): {
|
|
1327
|
+
expressMethods: string[];
|
|
1328
|
+
paymentElementMethods: string[];
|
|
1329
|
+
};
|
|
1034
1330
|
/** All supported element type identifiers. */
|
|
1035
1331
|
declare const ELEMENT_TYPES: readonly ["payment", "card", "cardNumber", "cardExpiry", "cardCvc", "address"];
|
|
1036
1332
|
declare const SUPPORTED_CARD_BRANDS: readonly ["visa", "mastercard", "mastercard_debit", "amex", "discover"];
|
|
@@ -1218,4 +1514,4 @@ declare function isValidPublishableKey(key: string): boolean;
|
|
|
1218
1514
|
/** Returns `true` if the string looks like a Stripe secret key. */
|
|
1219
1515
|
declare function isValidSecretKey(key: string): boolean;
|
|
1220
1516
|
|
|
1221
|
-
export { type AVSFieldConfig, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, type BeforeButtonClickEvent, type BillingDetails, type BillingProvider, type BuildCheckoutDisplayDataOptions, type ButtonsLayoutStyles, type ButtonsLayoutTheme, CA_PROVINCES, COUNTRY_OPTIONS, CURRENCY_MAP, type CheckoutAccount, type CheckoutButtonMethod, type CheckoutDisplayData, type CheckoutGateway, type CheckoutGateways, type CheckoutItem, type CheckoutMode, type CheckoutModeKind, type CheckoutProcessError, type CheckoutProcessingPending, type CheckoutProduct, type CheckoutProductType, type CheckoutSession, type CheckoutSessionProduct, type CheckoutSessionResult, type CheckoutSubscription, type ConfirmCardPaymentParams, type ConfirmCardPaymentResult, type ConfirmPaymentParams, type CountryOption, type CreateCustomerParams, type CreatePaymentMethodResult, type CreateSessionParams, type CurrencyInfo, type Customer, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, type DeclineEvent, type DisplayLineItem, ELEMENT_TYPES, type ElementChangeEvent, type ElementOptions, type ElementType, FLAT_APPEARANCE, type FloPayAppearance, type FloPayConfig, type FloPayEnvironment, FloPayError, type FloPayErrorType, type FloPayThemeVariables, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, type GatewayEnvironment, type InlineSessionDraft, type InlineSessionParams, type InlineSessionPatch, type LineItem, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, type MountedElement, NIGHT_APPEARANCE, type NormalizedCheckoutSession, type NormalizedGatewayEnvironment, type PaymentProviderAdapter, type PaymentResult, type PriceData, type ProcessPaymentParams, type RecurringInterval, SDK_VERSION, SUPPORTED_CARD_BRANDS, type StateOption, THEMES, type TagsData, type ThemeBundle, type ThemeBundleId, type ThemeId, type TokenizedBody, US_STATES, type UpdateCustomerParams, type WebhookEvent, apiError, authenticationError, buildCheckoutDisplayData, buildItemPayload, buildProductPayload, buildSubscriptionPayload, configureFlopay, foldIntoProducts, getConfiguredBillingApiUrl, getCountryByCode, getCurrencyByCountry, getFloPayEnvironment, getPostalCodeLabel, getStateFromPostalCode, getStateLabel, getStateOptions, isAVSEnabled, isAVSFieldVisible, isValidPublishableKey, isValidSecretKey, networkError, normalizeGatewayEnvironment, rateLimitError, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveSessionCurrency, resolveTheme, validationError };
|
|
1517
|
+
export { type AVSFieldConfig, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, type BeforeButtonClickEvent, type BillingDetails, type BillingProvider, type BuildCheckoutDisplayDataOptions, type ButtonsLayoutStyles, type ButtonsLayoutTheme, CA_PROVINCES, COUNTRY_OPTIONS, CURRENCY_MAP, type CheckoutAccount, type CheckoutButtonMethod, type CheckoutDisplayData, type CheckoutGateway, type CheckoutGateways, type CheckoutItem, type CheckoutMode, type CheckoutModeKind, type CheckoutProcessError, type CheckoutProcessingPending, type CheckoutProduct, type CheckoutProductType, type CheckoutSession, type CheckoutSessionProduct, type CheckoutSessionResult, type CheckoutSubscription, type ConfirmCardPaymentParams, type ConfirmCardPaymentResult, type ConfirmPaymentParams, type CountryOption, type CreateCustomerParams, type CreatePaymentMethodResult, type CreateSessionParams, type CurrencyInfo, type Customer, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, type DeclineEvent, type DisplayLineItem, ELEMENT_TYPES, type ElementChangeEvent, type ElementOptions, type ElementType, FLAT_APPEARANCE, type FloPayAppearance, type FloPayConfig, type FloPayEnvironment, FloPayError, type FloPayErrorType, type FloPayThemeVariables, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, type GatewayEnvironment, type InlineSessionDraft, type InlineSessionParams, type InlineSessionPatch, type LineItem, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, type MountedElement, NIGHT_APPEARANCE, type NormalizedCheckoutSession, type NormalizedGatewayEnvironment, type PaymentProviderAdapter, type PaymentResult, type PriceData, type ProcessPaymentParams, type RecurringInterval, SDK_VERSION, STRIPE_EXPRESS_METHODS, STRIPE_METHOD_AMOUNT_LIMITS, STRIPE_METHOD_COUNTRIES, STRIPE_METHOD_CURRENCIES, STRIPE_METHOD_MATRIX, SUPPORTED_CARD_BRANDS, type StateOption, type StripeMethodEntry, type StripeMethodThemeVariant, THEMES, type TagsData, type ThemeBundle, type ThemeBundleId, type ThemeId, type TokenizedBody, US_STATES, type UpdateCustomerParams, type WebhookEvent, apiError, authenticationError, buildCheckoutDisplayData, buildItemPayload, buildProductPayload, buildSubscriptionPayload, configureFlopay, filterStripeMethodsByAmount, filterStripeMethodsByCountry, filterStripeMethodsByCurrency, foldIntoProducts, getConfiguredBillingApiUrl, getCountryByCode, getCurrencyByCountry, getFloPayEnvironment, getPostalCodeLabel, getStateFromPostalCode, getStateLabel, getStateOptions, getStripeMethodDisplayName, hasVendoredStripeMethodLogo, isAVSEnabled, isAVSFieldVisible, isValidPublishableKey, isValidSecretKey, needsStripeMethodExplicitConfirm, networkError, normalizeGatewayEnvironment, partitionStripeMethods, rateLimitError, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveSessionCurrency, resolveStripeMethodBrandVariant, resolveTheme, stripeExpressMethodToOptionKey, validationError };
|