mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-06 20:37:44 +00:00
42 lines
1.0 KiB
Plaintext
42 lines
1.0 KiB
Plaintext
{/* -------------------------------------------------------- */}
|
|
{/* APIMethod component */}
|
|
{/* -------------------------------------------------------- */}
|
|
|
|
<APIMethod
|
|
path="/subscription/restore"
|
|
method="POST"
|
|
requireSession
|
|
>
|
|
```ts
|
|
type restoreSubscription = {
|
|
/**
|
|
* Reference id of the subscription to restore.
|
|
*/
|
|
referenceId?: string = '123'
|
|
/**
|
|
* The id of the subscription to restore.
|
|
*/
|
|
subscriptionId: string = 'sub_123'
|
|
}
|
|
```
|
|
</APIMethod>
|
|
|
|
{/* -------------------------------------------------------- */}
|
|
{/* JSDOC For the endpoint */}
|
|
{/* -------------------------------------------------------- */}
|
|
|
|
/**
|
|
* ### Endpoint
|
|
*
|
|
* POST `/subscription/restore`
|
|
*
|
|
* ### API Methods
|
|
*
|
|
* **server:**
|
|
* `auth.api.restoreSubscription`
|
|
*
|
|
* **client:**
|
|
* `authClient.subscription.restore`
|
|
*
|
|
* @see [Read our docs to learn more.](https://better-auth.com/docs/plugins/subscription#api-method-subscription-restore)
|
|
*/ |