# Module: web/stripe

# Type aliases

# CancelSubscriptionParams

Ƭ CancelSubscriptionParams: Object

# Type declaration

Name Type
subscription_id string

# CreatePaymentIntentParams

Ƭ CreatePaymentIntentParams: Object

# Type declaration

Name Type
amount number

# CreatePaymentIntentResponse

Ƭ CreatePaymentIntentResponse: Object

# Type declaration

Name Type
account_id string
secret string

# CreateSubscriptionIntentResponse

Ƭ CreateSubscriptionIntentResponse: Object

# Type declaration

Name Type
id string
secret string

# CreateSubscriptionParams

Ƭ CreateSubscriptionParams: Object

# Type declaration

Name Type
price_id string

# MySubscriptionsResponse

Ƭ MySubscriptionsResponse: Subscription[]


# ProductDetail

Ƭ ProductDetail: Object

# Type declaration

Name Type
description? string | null
id string
name string
prices ProductPrice[]

# ProductPrice

Ƭ ProductPrice: Object

# Type declaration

Name Type
currency string
id string
interval "year" | "month" | "day"
interval_count number
unit_amount number

# StripeStore

Ƭ StripeStore: Object

# Type declaration

Name Type
stripePromise Promise<Stripe | null> | null
setConfiguration (configuration: undefined | null | VYouConfiguration) => void

# Subscription

Ƭ Subscription: Object

# Type declaration

Name Type
currency string
id string
next_billing_date string
price string
product string
tenant_id string
trial_end string
trial_start string

# SubscriptionProductsResponse

Ƭ SubscriptionProductsResponse: ProductDetail[]

# Variables

# stripeStore

Const stripeStore: StoreApi<StripeStore>

# Functions

# cancelSubscription

cancelSubscription(params): Promise<VYouError | VYouResponse<void>>

# Parameters

Name Type
params CancelSubscriptionParams

# Returns

Promise<VYouError | VYouResponse<void>>


# createPaymentIntent

createPaymentIntent(params): Promise<VYouError | VYouResponse<CreatePaymentIntentResponse>>

# Parameters

Name Type
params CreatePaymentIntentParams

# Returns

Promise<VYouError | VYouResponse<CreatePaymentIntentResponse>>


# createSubscriptionIntent

createSubscriptionIntent(params): Promise<VYouError | VYouResponse<CreateSubscriptionIntentResponse>>

# Parameters

Name Type
params CreateSubscriptionParams

# Returns

Promise<VYouError | VYouResponse<CreateSubscriptionIntentResponse>>


# getMySubscriptions

getMySubscriptions(): Promise<VYouError | VYouResponse<MySubscriptionsResponse>>

# Returns

Promise<VYouError | VYouResponse<MySubscriptionsResponse>>


# getStripePromise

getStripePromise(): null | Promise<null | Stripe>

# Returns

null | Promise<null | Stripe>


# getSubscriptionProducts

getSubscriptionProducts(): Promise<VYouError | VYouResponse<SubscriptionProductsResponse>>

# Returns

Promise<VYouError | VYouResponse<SubscriptionProductsResponse>>