mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 12:27:44 +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
|
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
|
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
|
returnUrl?: string
|
||||||
/**
|
/**
|
||||||
@@ -345,7 +346,7 @@ type cancelSubscription = {
|
|||||||
*/
|
*/
|
||||||
subscriptionId?: string = 'sub_123'
|
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'
|
returnUrl: string = '/account'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ export const stripe = <O extends StripeOptions>(options: O) => {
|
|||||||
.string()
|
.string()
|
||||||
.meta({
|
.meta({
|
||||||
description:
|
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("/"),
|
.default("/"),
|
||||||
/**
|
/**
|
||||||
@@ -208,7 +208,7 @@ export const stripe = <O extends StripeOptions>(options: O) => {
|
|||||||
.string()
|
.string()
|
||||||
.meta({
|
.meta({
|
||||||
description:
|
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(),
|
.optional(),
|
||||||
/**
|
/**
|
||||||
@@ -625,7 +625,7 @@ export const stripe = <O extends StripeOptions>(options: O) => {
|
|||||||
.optional(),
|
.optional(),
|
||||||
returnUrl: z.string().meta({
|
returnUrl: z.string().meta({
|
||||||
description:
|
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: [
|
use: [
|
||||||
|
|||||||
Reference in New Issue
Block a user