@better-auth/stripe 1.7.7 → 1.7.9
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/dist/client.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as STRIPE_ERROR_CODES, t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { n as STRIPE_ERROR_CODES, t as PACKAGE_VERSION } from "./version-D3rBEPCN.mjs";
|
|
2
2
|
import { APIError, HIDE_METADATA } from "better-auth";
|
|
3
3
|
import { defu } from "defu";
|
|
4
4
|
import { createAuthEndpoint, createAuthMiddleware } from "@better-auth/core/api";
|
|
@@ -182,7 +182,11 @@ async function onCheckoutSessionCompleted(ctx, options, event) {
|
|
|
182
182
|
try {
|
|
183
183
|
const client = options.stripeClient;
|
|
184
184
|
const checkoutSession = event.data.object;
|
|
185
|
-
|
|
185
|
+
/**
|
|
186
|
+
* Only `subscription` mode is currently supported.
|
|
187
|
+
* @see https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-mode
|
|
188
|
+
*/
|
|
189
|
+
if (checkoutSession.mode !== "subscription" || !options.subscription?.enabled) return;
|
|
186
190
|
const subscription = await client.subscriptions.retrieve(checkoutSession.subscription);
|
|
187
191
|
const resolved = await resolvePlanItem(options, subscription.items.data);
|
|
188
192
|
if (!resolved) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/stripe",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.9",
|
|
4
4
|
"description": "Stripe plugin for Better Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
"zod": "^4.5.4"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
|
-
"better-call": "1.4.
|
|
58
|
+
"better-call": "1.4.2",
|
|
59
59
|
"stripe": "^22.0.1",
|
|
60
60
|
"tsdown": "0.21.10",
|
|
61
|
-
"@better-auth/core": "1.7.
|
|
62
|
-
"better-auth": "1.7.
|
|
61
|
+
"@better-auth/core": "1.7.9",
|
|
62
|
+
"better-auth": "1.7.9"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"better-call": "1.4.
|
|
65
|
+
"better-call": "1.4.2",
|
|
66
66
|
"stripe": "^18 || ^19 || ^20 || ^21 || ^22",
|
|
67
|
-
"@better-auth/core": "^1.7.
|
|
68
|
-
"better-auth": "^1.7.
|
|
67
|
+
"@better-auth/core": "^1.7.9",
|
|
68
|
+
"better-auth": "^1.7.9"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"build": "tsdown",
|