@farm.js/stripe 0.1.0-beta.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/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Farm.js Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # @farm.js/stripe
2
+
3
+ Stripe billing integration for Farm.js
4
+
5
+ Farm.js is currently in beta.
6
+
7
+ ```bash
8
+ npm install @farm.js/stripe@beta
9
+ ```
10
+
11
+ See the [Farm.js repository](https://github.com/farming-labs/farm.js) for documentation, examples, and support.
@@ -0,0 +1,369 @@
1
+ import type { FarmIntegrationAPIOperation } from "@farm.js/core/client";
2
+ import { type InferPathInferredClientAPI, type PathInferredClientOperation } from "@farm.js/integration-utils/integration";
3
+ import type { FarmWebhookAckResult } from "@farm.js/integration-utils/webhooks";
4
+ import type { StripeBillingMeterState, StripeBillingUsageProperties } from "./storage.js";
5
+ export type StripeBillingSeatsMode = "plan_limit" | "subscription_quantity";
6
+ export type StripeBillingSeatLimitSource = "plan_limit" | "subscription_quantity" | "override" | "none";
7
+ export type StripeCheckoutTrialBehavior = "if_eligible" | "require" | "none";
8
+ export type StripeBillingUpgradeProrationBehavior = "always_invoice" | "create_prorations" | "none";
9
+ export interface StripeIntegrationProduct {
10
+ id: string;
11
+ name?: string;
12
+ description?: string;
13
+ priceId?: string;
14
+ seatPriceId?: string;
15
+ meterPriceIds?: Record<string, string>;
16
+ lookupKey?: string;
17
+ currency?: string;
18
+ unitAmount?: number;
19
+ mode?: "payment" | "subscription";
20
+ interval?: "day" | "week" | "month" | "year";
21
+ intervalCount?: number;
22
+ quantity?: number;
23
+ seatBilling?: "line_item_quantity" | "included_plus_add_on";
24
+ imageUrl?: string;
25
+ metadata?: Record<string, string>;
26
+ }
27
+ export type StripeBillingProductKind = "subscription" | "one_time";
28
+ export interface StripeCatalogMeterPrice {
29
+ key: string;
30
+ eventName: string;
31
+ unit: string | null;
32
+ priceId: string;
33
+ currency: string | null;
34
+ billingScheme: "per_unit" | "tiered" | null;
35
+ tiersMode: "graduated" | "volume" | null;
36
+ unitAmount: number | null;
37
+ unitAmountDecimal: string | null;
38
+ summary: string | null;
39
+ }
40
+ export interface StripeCatalogProduct {
41
+ id: string;
42
+ name: string;
43
+ description: string | null;
44
+ kind: StripeBillingProductKind;
45
+ planId: string | null;
46
+ trialDays: number | null;
47
+ public: boolean;
48
+ currency: string | null;
49
+ unitAmount: number | null;
50
+ mode: "payment" | "subscription";
51
+ interval: "day" | "week" | "month" | "year" | null;
52
+ intervalCount: number | null;
53
+ quantity: number;
54
+ seatBilling: "line_item_quantity" | "included_plus_add_on" | null;
55
+ hasSeatPrice: boolean;
56
+ seatUnitAmount: number | null;
57
+ seatCurrency: string | null;
58
+ meterPrices: StripeCatalogMeterPrice[];
59
+ priceId: string | null;
60
+ productId: string | null;
61
+ lookupKey: string | null;
62
+ metadata: Record<string, string>;
63
+ }
64
+ export interface StripeCheckoutInput {
65
+ productId: string;
66
+ quantity?: number;
67
+ customerEmail?: string;
68
+ successPath?: string;
69
+ cancelPath?: string;
70
+ trialBehavior?: StripeCheckoutTrialBehavior;
71
+ metadata?: Record<string, string>;
72
+ }
73
+ export interface StripeCheckoutResult {
74
+ productId: string;
75
+ planId: string | null;
76
+ sessionId: string;
77
+ redirectTo: string;
78
+ mode: "payment" | "subscription";
79
+ trialApplied: boolean;
80
+ trialDays: number | null;
81
+ }
82
+ export interface StripeBillingUpgradeInput {
83
+ quantity: number;
84
+ prorationBehavior?: StripeBillingUpgradeProrationBehavior;
85
+ }
86
+ export interface StripeBillingUpgradeResult {
87
+ planId: string;
88
+ productId: string | null;
89
+ status: string;
90
+ stripeCustomerId: string | null;
91
+ stripeSubscriptionId: string;
92
+ currentPeriodEnd: string | null;
93
+ cancelAtPeriodEnd: boolean;
94
+ seatQuantity: number | null;
95
+ }
96
+ export type StripeBillingChangeProrationBehavior = StripeBillingUpgradeProrationBehavior;
97
+ export type StripeBillingChangeInput = StripeBillingUpgradeInput;
98
+ export type StripeBillingChangeResult = StripeBillingUpgradeResult;
99
+ export interface StripePortalInput {
100
+ sessionId?: string;
101
+ customerId?: string;
102
+ returnTo?: string;
103
+ }
104
+ export interface StripePortalResult {
105
+ customerId: string;
106
+ redirectTo: string;
107
+ }
108
+ export interface StripeSessionQuery {
109
+ sessionId: string;
110
+ }
111
+ export interface StripeSessionLineItemResult {
112
+ description: string | null;
113
+ quantity: number | null;
114
+ amountSubtotal: number | null;
115
+ amountTotal: number | null;
116
+ currency: string | null;
117
+ priceId?: string | null;
118
+ productId?: string | null;
119
+ }
120
+ export interface StripeSessionResult {
121
+ id: string;
122
+ status: string | null;
123
+ paymentStatus: string | null;
124
+ mode: "payment" | "subscription" | null;
125
+ customerId: string | null;
126
+ customerEmail: string | null;
127
+ subscriptionId?: string | null;
128
+ subscriptionStatus?: string | null;
129
+ currentPeriodEnd?: string | null;
130
+ trialEndsAt?: string | null;
131
+ cancelAtPeriodEnd?: boolean;
132
+ amountSubtotal: number | null;
133
+ amountTotal: number | null;
134
+ currency: string | null;
135
+ metadata: Record<string, string>;
136
+ lineItems: StripeSessionLineItemResult[];
137
+ }
138
+ export interface StripeBillingStatusResult {
139
+ owner: {
140
+ kind: "user" | "organization";
141
+ id: string;
142
+ email?: string;
143
+ } | null;
144
+ planId: string;
145
+ productId: string | null;
146
+ status: string;
147
+ stripeCustomerId: string | null;
148
+ stripeSubscriptionId: string | null;
149
+ currentPeriodEnd: string | null;
150
+ cancelAtPeriodEnd: boolean;
151
+ trialEndsAt: string | null;
152
+ trialUsedAt: string | null;
153
+ seatMode: StripeBillingSeatsMode;
154
+ seatQuantity: number | null;
155
+ seatAllowanceOverride: number | null;
156
+ seatLimitSource: StripeBillingSeatLimitSource;
157
+ features: Record<string, boolean>;
158
+ limits: Record<string, number>;
159
+ entitlements: Record<string, unknown>;
160
+ }
161
+ export interface StripeBillingFeaturesResult {
162
+ planId: string;
163
+ features: Record<string, boolean>;
164
+ }
165
+ export interface StripeBillingLimitsResult {
166
+ planId: string;
167
+ limits: Record<string, number>;
168
+ }
169
+ export interface StripeBillingUsageInput {
170
+ key: string;
171
+ }
172
+ export interface StripeBillingUsageResult {
173
+ planId: string;
174
+ key: string;
175
+ used: number | null;
176
+ limit: number | null;
177
+ remaining: number | null;
178
+ }
179
+ export interface StripeBillingMeterUsageInput {
180
+ key: string;
181
+ }
182
+ export interface StripeBillingMeterUsageResult {
183
+ planId: string;
184
+ productId: string | null;
185
+ key: string;
186
+ eventName: string;
187
+ customerId: string;
188
+ subscriptionId: string | null;
189
+ subscriptionStatus: string;
190
+ attached: boolean;
191
+ attachedPriceId: string | null;
192
+ currentPeriodStart: string | null;
193
+ currentPeriodEnd: string | null;
194
+ currentPeriodUsed: number;
195
+ includedLimit: number | null;
196
+ softLimit: number | null;
197
+ hardLimit: number | null;
198
+ remainingIncluded: number | null;
199
+ remainingHard: number | null;
200
+ state: StripeBillingMeterState;
201
+ warning: string | null;
202
+ }
203
+ export type StripeBillingCurrentChargeLineKind = "base_subscription" | "seat_add_on" | "proration" | "metered_usage" | "other";
204
+ export interface StripeBillingCurrentChargeLine {
205
+ key: string | null;
206
+ kind: StripeBillingCurrentChargeLineKind;
207
+ label: string;
208
+ amount: number | null;
209
+ currency: string;
210
+ quantity: number | null;
211
+ includedUnits: number | null;
212
+ overageUnits: number | null;
213
+ billedBuckets: number | null;
214
+ billingUnits: number | null;
215
+ unitAmountDecimal: string | null;
216
+ periodStart: string | null;
217
+ periodEnd: string | null;
218
+ meterKey: string | null;
219
+ }
220
+ export interface StripeBillingCurrentChargesResult {
221
+ owner: {
222
+ kind: "user" | "organization";
223
+ id: string;
224
+ email?: string;
225
+ } | null;
226
+ planId: string;
227
+ productId: string | null;
228
+ customerId: string;
229
+ subscriptionId: string | null;
230
+ subscriptionStatus: string;
231
+ currency: string;
232
+ currentPeriodStart: string | null;
233
+ currentPeriodEnd: string | null;
234
+ baseSubscriptionAmount: number | null;
235
+ pendingMeterChargeAmount: number | null;
236
+ estimatedTotalAmount: number | null;
237
+ lineItems: StripeBillingCurrentChargeLine[];
238
+ }
239
+ export type StripeBillingUpcomingInvoiceLineKind = "base_subscription" | "seat_add_on" | "proration" | "metered" | "other";
240
+ export interface StripeBillingUpcomingInvoiceLineResult {
241
+ description: string | null;
242
+ kind: StripeBillingUpcomingInvoiceLineKind;
243
+ quantity: number | null;
244
+ amount: number | null;
245
+ currency: string | null;
246
+ periodStart: string | null;
247
+ periodEnd: string | null;
248
+ priceId: string | null;
249
+ stripeProductId: string | null;
250
+ meterKey: string | null;
251
+ }
252
+ export interface StripeBillingUpcomingInvoiceTotalsResult {
253
+ recurring: number;
254
+ prorations: number;
255
+ metered: number;
256
+ other: number;
257
+ total: number;
258
+ }
259
+ export interface StripeBillingUpcomingInvoiceResult {
260
+ planId: string;
261
+ productId: string | null;
262
+ customerId: string;
263
+ subscriptionId: string | null;
264
+ subscriptionStatus: string;
265
+ nextBillingAt: string | null;
266
+ currency: string | null;
267
+ generatedAt: string;
268
+ monthlyMeteringActive: boolean;
269
+ note: string | null;
270
+ totals: StripeBillingUpcomingInvoiceTotalsResult;
271
+ lines: StripeBillingUpcomingInvoiceLineResult[];
272
+ }
273
+ export interface StripeBillingReportUsageInput {
274
+ key: string;
275
+ quantity: number;
276
+ idempotencyKey: string;
277
+ occurredAt?: string;
278
+ properties?: StripeBillingUsageProperties;
279
+ }
280
+ export interface StripeBillingReportUsageResult {
281
+ key: string;
282
+ quantity: number;
283
+ customerId: string;
284
+ stripeEventName: string;
285
+ stripeEventIdentifier: string;
286
+ occurredAt: string;
287
+ currentPeriodUsed?: number | null;
288
+ projectedCurrentPeriodUsed?: number | null;
289
+ softLimit?: number | null;
290
+ hardLimit?: number | null;
291
+ state?: StripeBillingMeterState;
292
+ warning?: string | null;
293
+ }
294
+ export interface StripeBillingCheckInput {
295
+ key: string;
296
+ amount?: number;
297
+ }
298
+ export interface StripeBillingCheckResult {
299
+ planId: string;
300
+ key: string;
301
+ amount: number;
302
+ used: number | null;
303
+ limit: number | null;
304
+ remaining: number | null;
305
+ allowed: boolean;
306
+ }
307
+ export interface StripeWebhookResult extends FarmWebhookAckResult {
308
+ provider: "stripe";
309
+ }
310
+ export interface StripeClientPathOptions {
311
+ productsPath?: string;
312
+ statusPath?: string;
313
+ currentChargesPath?: string;
314
+ featuresPath?: string;
315
+ limitsPath?: string;
316
+ usagePath?: string;
317
+ meterUsagePath?: string;
318
+ upcomingInvoicePath?: string;
319
+ reportUsagePath?: string;
320
+ checkPath?: string;
321
+ checkoutPath?: string;
322
+ upgradePath?: string;
323
+ portalPath?: string;
324
+ sessionPath?: string;
325
+ }
326
+ type ResolvedStripeClientPath<TPath extends string | undefined, TDefault extends string> = TPath extends string ? TPath : TDefault;
327
+ type StripeDefaultClientPaths = {
328
+ productsPath: "/billing/products";
329
+ statusPath: "/billing/status";
330
+ currentChargesPath: "/billing/current-charges";
331
+ featuresPath: "/billing/features";
332
+ limitsPath: "/billing/limits";
333
+ usagePath: "/billing/usage";
334
+ meterUsagePath: "/billing/meter-usage";
335
+ upcomingInvoicePath: "/billing/upcoming-invoice";
336
+ reportUsagePath: "/billing/report-usage";
337
+ checkPath: "/billing/check";
338
+ checkoutPath: "/billing/checkout";
339
+ upgradePath: "/billing/upgrade";
340
+ portalPath: "/billing/portal";
341
+ sessionPath: "/billing/session";
342
+ };
343
+ type StripeGetOperation<TResponse, TQuery = never> = FarmIntegrationAPIOperation<never, TQuery, TResponse, false, "GET">;
344
+ type StripePostOperation<TBody, TResponse> = FarmIntegrationAPIOperation<TBody, never, TResponse, false, "POST">;
345
+ type StripeClientEntry<TPath extends string, TOperation extends FarmIntegrationAPIOperation<any, any, any, any, any>, TLeafName extends string | undefined = undefined> = PathInferredClientOperation<TPath, TOperation, TLeafName>;
346
+ type StripeClientEntries<TInput extends StripeClientPathOptions = {}> = [
347
+ StripeClientEntry<ResolvedStripeClientPath<TInput["productsPath"], "/billing/products">, StripeGetOperation<StripeCatalogProduct[]>>,
348
+ StripeClientEntry<ResolvedStripeClientPath<TInput["statusPath"], "/billing/status">, StripeGetOperation<StripeBillingStatusResult>>,
349
+ StripeClientEntry<ResolvedStripeClientPath<TInput["currentChargesPath"], "/billing/current-charges">, StripeGetOperation<StripeBillingCurrentChargesResult>>,
350
+ StripeClientEntry<ResolvedStripeClientPath<TInput["featuresPath"], "/billing/features">, StripeGetOperation<StripeBillingFeaturesResult>>,
351
+ StripeClientEntry<ResolvedStripeClientPath<TInput["limitsPath"], "/billing/limits">, StripeGetOperation<StripeBillingLimitsResult>>,
352
+ StripeClientEntry<ResolvedStripeClientPath<TInput["usagePath"], "/billing/usage">, StripePostOperation<StripeBillingUsageInput, StripeBillingUsageResult>>,
353
+ StripeClientEntry<ResolvedStripeClientPath<TInput["meterUsagePath"], "/billing/meter-usage">, StripePostOperation<StripeBillingMeterUsageInput, StripeBillingMeterUsageResult>>,
354
+ StripeClientEntry<ResolvedStripeClientPath<TInput["upcomingInvoicePath"], "/billing/upcoming-invoice">, StripeGetOperation<StripeBillingUpcomingInvoiceResult>>,
355
+ StripeClientEntry<ResolvedStripeClientPath<TInput["reportUsagePath"], "/billing/report-usage">, StripePostOperation<StripeBillingReportUsageInput, StripeBillingReportUsageResult>>,
356
+ StripeClientEntry<ResolvedStripeClientPath<TInput["checkPath"], "/billing/check">, StripePostOperation<StripeBillingCheckInput, StripeBillingCheckResult>>,
357
+ StripeClientEntry<ResolvedStripeClientPath<TInput["checkoutPath"], "/billing/checkout">, StripePostOperation<StripeCheckoutInput, StripeCheckoutResult>>,
358
+ StripeClientEntry<ResolvedStripeClientPath<TInput["upgradePath"], "/billing/upgrade">, StripePostOperation<StripeBillingUpgradeInput, StripeBillingUpgradeResult>>,
359
+ StripeClientEntry<ResolvedStripeClientPath<TInput["upgradePath"], "/billing/upgrade">, StripePostOperation<StripeBillingChangeInput, StripeBillingChangeResult>, "change">,
360
+ StripeClientEntry<ResolvedStripeClientPath<TInput["portalPath"], "/billing/portal">, StripePostOperation<StripePortalInput, StripePortalResult>>,
361
+ StripeClientEntry<ResolvedStripeClientPath<TInput["sessionPath"], "/billing/session">, StripeGetOperation<StripeSessionResult, StripeSessionQuery>>
362
+ ];
363
+ export type StripeClientAPI<TInput extends StripeClientPathOptions = {}> = InferPathInferredClientAPI<StripeClientEntries<TInput>>;
364
+ export type StripeDefaultClientAPI = InferPathInferredClientAPI<StripeClientEntries<StripeDefaultClientPaths>>;
365
+ export declare function createStripeClientApi(): StripeDefaultClientAPI;
366
+ export declare function createStripeClientApi<const TInput extends StripeClientPathOptions>(input: TInput): StripeClientAPI<TInput>;
367
+ export declare const stripeClient: StripeDefaultClientAPI;
368
+ export {};
369
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAA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,EAAE,kBAAkB,CAAC,CAC3D;IACD,iBAAiB,CACf,wBAAwB,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,kBAAkB,CAAC,EACnE,kBAAkB,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAC5D;CACF,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,MAAM,SAAS,uBAAuB,GAAG,EAAE,IACrE,0BAA0B,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC;AAE1D,MAAM,MAAM,sBAAsB,GAAG,0BAA0B,CAC7D,mBAAmB,CAAC,wBAAwB,CAAC,CAC9C,CAAC;AAEF,wBAAgB,qBAAqB,IAAI,sBAAsB,CAAC;AAChE,wBAAgB,qBAAqB,CAAC,KAAK,CAAC,MAAM,SAAS,uBAAuB,EAChF,KAAK,EAAE,MAAM,GACZ,eAAe,CAAC,MAAM,CAAC,CAAC;AAsK3B,eAAO,MAAM,YAAY,EAAE,sBAAgD,CAAC"}
package/dist/client.js ADDED
@@ -0,0 +1,100 @@
1
+ import { api } from "@farm.js/core/client";
2
+ import { createPathInferredClientApi, } from "@farm.js/integration-utils/integration";
3
+ export function createStripeClientApi(input) {
4
+ const productsPath = (input?.productsPath ?? "/billing/products");
5
+ const statusPath = (input?.statusPath ?? "/billing/status");
6
+ const currentChargesPath = (input?.currentChargesPath ??
7
+ "/billing/current-charges");
8
+ const featuresPath = (input?.featuresPath ?? "/billing/features");
9
+ const limitsPath = (input?.limitsPath ?? "/billing/limits");
10
+ const usagePath = (input?.usagePath ?? "/billing/usage");
11
+ const meterUsagePath = (input?.meterUsagePath ??
12
+ "/billing/meter-usage");
13
+ const upcomingInvoicePath = (input?.upcomingInvoicePath ??
14
+ "/billing/upcoming-invoice");
15
+ const reportUsagePath = (input?.reportUsagePath ??
16
+ "/billing/report-usage");
17
+ const checkPath = (input?.checkPath ?? "/billing/check");
18
+ const checkoutPath = (input?.checkoutPath ?? "/billing/checkout");
19
+ const upgradePath = (input?.upgradePath ?? "/billing/upgrade");
20
+ const portalPath = (input?.portalPath ?? "/billing/portal");
21
+ const sessionPath = (input?.sessionPath ?? "/billing/session");
22
+ return createPathInferredClientApi({
23
+ path: productsPath,
24
+ operation: api.get(productsPath, {
25
+ responseFormat: "json",
26
+ }),
27
+ }, {
28
+ path: statusPath,
29
+ operation: api.get(statusPath, {
30
+ responseFormat: "json",
31
+ }),
32
+ }, {
33
+ path: currentChargesPath,
34
+ operation: api.get(currentChargesPath, {
35
+ responseFormat: "json",
36
+ }),
37
+ }, {
38
+ path: featuresPath,
39
+ operation: api.get(featuresPath, {
40
+ responseFormat: "json",
41
+ }),
42
+ }, {
43
+ path: limitsPath,
44
+ operation: api.get(limitsPath, {
45
+ responseFormat: "json",
46
+ }),
47
+ }, {
48
+ path: usagePath,
49
+ operation: api.post(usagePath, {
50
+ responseFormat: "json",
51
+ }),
52
+ }, {
53
+ path: meterUsagePath,
54
+ operation: api.post(meterUsagePath, {
55
+ responseFormat: "json",
56
+ }),
57
+ }, {
58
+ path: upcomingInvoicePath,
59
+ operation: api.get(upcomingInvoicePath, {
60
+ responseFormat: "json",
61
+ }),
62
+ }, {
63
+ path: reportUsagePath,
64
+ operation: api.post(reportUsagePath, {
65
+ responseFormat: "json",
66
+ }),
67
+ }, {
68
+ path: checkPath,
69
+ operation: api.post(checkPath, {
70
+ responseFormat: "json",
71
+ }),
72
+ }, {
73
+ path: checkoutPath,
74
+ operation: api.post(checkoutPath, {
75
+ responseFormat: "json",
76
+ }),
77
+ }, {
78
+ path: upgradePath,
79
+ operation: api.post(upgradePath, {
80
+ responseFormat: "json",
81
+ }),
82
+ }, {
83
+ path: upgradePath,
84
+ leafName: "change",
85
+ operation: api.post(upgradePath, {
86
+ responseFormat: "json",
87
+ }),
88
+ }, {
89
+ path: portalPath,
90
+ operation: api.post(portalPath, {
91
+ responseFormat: "json",
92
+ }),
93
+ }, {
94
+ path: sessionPath,
95
+ operation: api.get(sessionPath, {
96
+ responseFormat: "json",
97
+ }),
98
+ });
99
+ }
100
+ export const stripeClient = createStripeClientApi();