diff --git a/.changeset/mighty-tables-dream.md b/.changeset/mighty-tables-dream.md new file mode 100644 index 00000000..d09e3548 --- /dev/null +++ b/.changeset/mighty-tables-dream.md @@ -0,0 +1,5 @@ +--- +"@better-auth/stripe": patch +--- + +chore: fix wrong cancelUrl and returnUrl descriptions diff --git a/docs/content/docs/plugins/stripe.mdx b/docs/content/docs/plugins/stripe.mdx index e5fa3cf7..48720580 100644 --- a/docs/content/docs/plugins/stripe.mdx +++ b/docs/content/docs/plugins/stripe.mdx @@ -234,10 +234,11 @@ type upgradeSubscription = { */ successUrl: string /** - * Callback URL to redirect back after successful subscription. + * If set, checkout shows a back button and customers will be directed here if they cancel payment. */ cancelUrl: string - * Return URL to redirect back after successful subscription. + /** + * URL to take customers to when they click on the billing portal’s link to return to your website. */ returnUrl?: string /** @@ -345,7 +346,7 @@ type cancelSubscription = { */ subscriptionId?: string = 'sub_123' /** - * Return URL to redirect back after successful subscription. + * URL to take customers to when they click on the billing portal’s link to return to your website. */ returnUrl: string = '/account' } diff --git a/packages/stripe/src/index.ts b/packages/stripe/src/index.ts index 1e6b7b0e..54a0017f 100644 --- a/packages/stripe/src/index.ts +++ b/packages/stripe/src/index.ts @@ -198,7 +198,7 @@ export const stripe = (options: O) => { .string() .meta({ description: - 'Callback URL to redirect back after successful subscription. Eg: "https://example.com/success"', + 'If set, checkout shows a back button and customers will be directed here if they cancel payment. Eg: "https://example.com/pricing"', }) .default("/"), /** @@ -208,7 +208,7 @@ export const stripe = (options: O) => { .string() .meta({ description: - 'Return URL to redirect back after successful subscription. Eg: "https://example.com/success"', + 'URL to take customers to when they click on the billing portal’s link to return to your website. Eg: "https://example.com/dashboard"', }) .optional(), /** @@ -625,7 +625,7 @@ export const stripe = (options: O) => { .optional(), returnUrl: z.string().meta({ description: - "Return URL to redirect back after successful subscription. Eg: 'https://example.com/success'", + 'URL to take customers to when they click on the billing portal’s link to return to your website. Eg: "https://example.com/dashboard"', }), }), use: [