@better-auth/stripe 1.3.7 → 1.3.8-beta.2

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @better-auth/stripe@1.3.7 build /home/runner/work/better-auth/better-auth/packages/stripe
2
+ > @better-auth/stripe@1.3.8-beta.2 build /home/runner/work/better-auth/better-auth/packages/stripe
3
3
  > unbuild
4
4
 
5
5
  [info] Automatically detected entries: src/index, src/client [esm] [cjs] [dts]
@@ -13,5 +13,5 @@
13
13
 
14
14
  [log] dist/client.mjs (total size: 197 B, chunk size: 197 B, exports: stripeClient)
15
15
 
16
- Σ Total dist size (byte size): 213 kB
16
+ Σ Total dist size (byte size): 221 kB
17
17
  [log]
package/dist/client.d.cts CHANGED
@@ -3,7 +3,6 @@ import 'better-auth';
3
3
  import 'better-call';
4
4
  import 'stripe';
5
5
  import 'zod/v4';
6
- import 'better-auth/api';
7
6
 
8
7
  declare const stripeClient: <O extends {
9
8
  subscription: boolean;
package/dist/client.d.mts CHANGED
@@ -3,7 +3,6 @@ import 'better-auth';
3
3
  import 'better-call';
4
4
  import 'stripe';
5
5
  import 'zod/v4';
6
- import 'better-auth/api';
7
6
 
8
7
  declare const stripeClient: <O extends {
9
8
  subscription: boolean;
package/dist/client.d.ts CHANGED
@@ -3,7 +3,6 @@ import 'better-auth';
3
3
  import 'better-call';
4
4
  import 'stripe';
5
5
  import 'zod/v4';
6
- import 'better-auth/api';
7
6
 
8
7
  declare const stripeClient: <O extends {
9
8
  subscription: boolean;
package/dist/index.d.cts CHANGED
@@ -3,7 +3,6 @@ import { GenericEndpointContext, User, Session, InferOptionSchema } from 'better
3
3
  import * as better_call from 'better-call';
4
4
  import Stripe from 'stripe';
5
5
  import * as z from 'zod/v4';
6
- import { APIError } from 'better-auth/api';
7
6
 
8
7
  declare const subscriptions: {
9
8
  subscription: {
@@ -947,8 +946,34 @@ declare const stripe: <O extends StripeOptions>(options: O) => {
947
946
  returnHeaders?: ReturnHeaders | undefined;
948
947
  }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
949
948
  headers: Headers;
950
- response: APIError;
951
- } : APIError>;
949
+ response: {
950
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call.Status;
951
+ body: ({
952
+ message?: string;
953
+ code?: string;
954
+ cause?: unknown;
955
+ } & Record<string, any>) | undefined;
956
+ headers: HeadersInit;
957
+ statusCode: number;
958
+ name: string;
959
+ message: string;
960
+ stack?: string;
961
+ cause?: unknown;
962
+ };
963
+ } : {
964
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call.Status;
965
+ body: ({
966
+ message?: string;
967
+ code?: string;
968
+ cause?: unknown;
969
+ } & Record<string, any>) | undefined;
970
+ headers: HeadersInit;
971
+ statusCode: number;
972
+ name: string;
973
+ message: string;
974
+ stack?: string;
975
+ cause?: unknown;
976
+ }>;
952
977
  options: {
953
978
  method: "GET";
954
979
  query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
package/dist/index.d.mts CHANGED
@@ -3,7 +3,6 @@ import { GenericEndpointContext, User, Session, InferOptionSchema } from 'better
3
3
  import * as better_call from 'better-call';
4
4
  import Stripe from 'stripe';
5
5
  import * as z from 'zod/v4';
6
- import { APIError } from 'better-auth/api';
7
6
 
8
7
  declare const subscriptions: {
9
8
  subscription: {
@@ -947,8 +946,34 @@ declare const stripe: <O extends StripeOptions>(options: O) => {
947
946
  returnHeaders?: ReturnHeaders | undefined;
948
947
  }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
949
948
  headers: Headers;
950
- response: APIError;
951
- } : APIError>;
949
+ response: {
950
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call.Status;
951
+ body: ({
952
+ message?: string;
953
+ code?: string;
954
+ cause?: unknown;
955
+ } & Record<string, any>) | undefined;
956
+ headers: HeadersInit;
957
+ statusCode: number;
958
+ name: string;
959
+ message: string;
960
+ stack?: string;
961
+ cause?: unknown;
962
+ };
963
+ } : {
964
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call.Status;
965
+ body: ({
966
+ message?: string;
967
+ code?: string;
968
+ cause?: unknown;
969
+ } & Record<string, any>) | undefined;
970
+ headers: HeadersInit;
971
+ statusCode: number;
972
+ name: string;
973
+ message: string;
974
+ stack?: string;
975
+ cause?: unknown;
976
+ }>;
952
977
  options: {
953
978
  method: "GET";
954
979
  query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
package/dist/index.d.ts CHANGED
@@ -3,7 +3,6 @@ import { GenericEndpointContext, User, Session, InferOptionSchema } from 'better
3
3
  import * as better_call from 'better-call';
4
4
  import Stripe from 'stripe';
5
5
  import * as z from 'zod/v4';
6
- import { APIError } from 'better-auth/api';
7
6
 
8
7
  declare const subscriptions: {
9
8
  subscription: {
@@ -947,8 +946,34 @@ declare const stripe: <O extends StripeOptions>(options: O) => {
947
946
  returnHeaders?: ReturnHeaders | undefined;
948
947
  }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
949
948
  headers: Headers;
950
- response: APIError;
951
- } : APIError>;
949
+ response: {
950
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call.Status;
951
+ body: ({
952
+ message?: string;
953
+ code?: string;
954
+ cause?: unknown;
955
+ } & Record<string, any>) | undefined;
956
+ headers: HeadersInit;
957
+ statusCode: number;
958
+ name: string;
959
+ message: string;
960
+ stack?: string;
961
+ cause?: unknown;
962
+ };
963
+ } : {
964
+ status: ("OK" | "CREATED" | "ACCEPTED" | "NO_CONTENT" | "MULTIPLE_CHOICES" | "MOVED_PERMANENTLY" | "FOUND" | "SEE_OTHER" | "NOT_MODIFIED" | "TEMPORARY_REDIRECT" | "BAD_REQUEST" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_ALLOWED" | "NOT_ACCEPTABLE" | "PROXY_AUTHENTICATION_REQUIRED" | "REQUEST_TIMEOUT" | "CONFLICT" | "GONE" | "LENGTH_REQUIRED" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "URI_TOO_LONG" | "UNSUPPORTED_MEDIA_TYPE" | "RANGE_NOT_SATISFIABLE" | "EXPECTATION_FAILED" | "I'M_A_TEAPOT" | "MISDIRECTED_REQUEST" | "UNPROCESSABLE_ENTITY" | "LOCKED" | "FAILED_DEPENDENCY" | "TOO_EARLY" | "UPGRADE_REQUIRED" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "REQUEST_HEADER_FIELDS_TOO_LARGE" | "UNAVAILABLE_FOR_LEGAL_REASONS" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "HTTP_VERSION_NOT_SUPPORTED" | "VARIANT_ALSO_NEGOTIATES" | "INSUFFICIENT_STORAGE" | "LOOP_DETECTED" | "NOT_EXTENDED" | "NETWORK_AUTHENTICATION_REQUIRED") | better_call.Status;
965
+ body: ({
966
+ message?: string;
967
+ code?: string;
968
+ cause?: unknown;
969
+ } & Record<string, any>) | undefined;
970
+ headers: HeadersInit;
971
+ statusCode: number;
972
+ name: string;
973
+ message: string;
974
+ stack?: string;
975
+ cause?: unknown;
976
+ }>;
952
977
  options: {
953
978
  method: "GET";
954
979
  query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@better-auth/stripe",
3
3
  "author": "Bereket Engida",
4
- "version": "1.3.7",
4
+ "version": "1.3.8-beta.2",
5
5
  "main": "dist/index.cjs",
6
6
  "license": "MIT",
7
7
  "keywords": [
@@ -37,14 +37,14 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "better-auth": "^1.3.7"
40
+ "better-auth": "^1.3.8-beta.2"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "zod": "^3.25.0 || ^4.0.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/better-sqlite3": "^7.6.12",
47
- "better-call": "^1.0.13",
47
+ "better-call": "1.0.15",
48
48
  "better-sqlite3": "^11.6.0",
49
49
  "stripe": "^18.0.0",
50
50
  "zod": "^4.0.0"
package/tsconfig.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
- "compilerOptions": {
3
- "esModuleInterop": true,
4
- "skipLibCheck": true,
5
- "target": "es2022",
6
- "allowJs": true,
7
- "resolveJsonModule": true,
8
- "module": "ESNext",
9
- "noEmit": true,
10
- "moduleResolution": "Bundler",
11
- "moduleDetection": "force",
12
- "isolatedModules": true,
13
- "verbatimModuleSyntax": true,
14
- "strict": true,
15
- "noImplicitOverride": true,
16
- "noFallthroughCasesInSwitch": true
17
- },
18
- "exclude": ["node_modules", "dist"],
19
- "include": ["src"]
2
+ "compilerOptions": {
3
+ "esModuleInterop": true,
4
+ "skipLibCheck": true,
5
+ "target": "es2022",
6
+ "allowJs": true,
7
+ "resolveJsonModule": true,
8
+ "module": "ESNext",
9
+ "noEmit": true,
10
+ "moduleResolution": "Bundler",
11
+ "moduleDetection": "force",
12
+ "isolatedModules": true,
13
+ "verbatimModuleSyntax": true,
14
+ "strict": true,
15
+ "noImplicitOverride": true,
16
+ "noFallthroughCasesInSwitch": true
17
+ },
18
+ "exclude": ["node_modules", "dist"],
19
+ "include": ["src"]
20
20
  }