mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 04:19:20 +00:00
docs: fix wrong cancelUrl and returnUrl descriptions (#3647)
* docs: fix wrong cancelUrl and returnUrl descriptions * chore: changeset * chore: update changeset --------- Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
This commit is contained in:
5
.changeset/mighty-tables-dream.md
Normal file
5
.changeset/mighty-tables-dream.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@better-auth/stripe": patch
|
||||
---
|
||||
|
||||
chore: fix wrong cancelUrl and returnUrl descriptions
|
||||
@@ -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'
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ export const stripe = <O extends StripeOptions>(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 = <O extends StripeOptions>(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 = <O extends StripeOptions>(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: [
|
||||
|
||||
Reference in New Issue
Block a user