Skip to main content

subscribe

Create a new subscription and get a payment session for it. 🔐 This method requires .

Description​

This method creates a new paid subscription for the current user and returns the payment session that must be paid to activate it. It returns a Promise that resolves to an ICreatedSubscription object.

.subscribe(

);

Parameters schema​

Schema

body(required): ISubscribe
Subscription body
example:

{ marker: "premium" }

body.marker(required): string
Subscription marker.
example: "premium"

Examples​

Minimal example​

const response = await Subscriptions.subscribe({ marker: 'premium' });

Example response​

{
"statusCode": 404,
"timestamp": "2026-09-25T17:23:32.228Z",
"message": "Subscription not found"
}

Response schema​

Schema: ICreatedSubscription

id: number
Payment session identifier.
example: 1

amount: number
Amount to be paid.
example: 100

paymentUrl: string
Payment page URL.
example: "https://checkout.stripe.com/c/pay/..."

status: string
Payment session status.
example: "waiting"