All URIs are relative to https://api.forestvpn.com/v2
Method | HTTP request | Description |
---|---|---|
cancelSubscription | DELETE /billing/subscriptions/{subscriptionID}/ | Cancel subscription |
createPaymentMethodStripeSetupIntent | POST /billing/payment-methods/stripe/setup-intents/ | Create stripe's setup intent for add new payment method. |
createSubscription | POST /billing/subscriptions/ | Create subscription |
deletePaymentMethod | DELETE /billing/payment-methods/{paymentMethodID}/ | Delete payment method |
getBillingAccount | GET /billing/account/ | Billing account info |
getBillingBundle | GET /billing/bundles/{bundleID}/ | Bundle info |
getBillingPaymentOption | GET /billing/payment-options/{paymentOptionID}/ | Payment option info |
getBillingProduct | GET /billing/products/{productID}/ | Product info |
getPaymentMethod | GET /billing/payment-methods/{paymentMethodID}/ | Payment method info |
getSubscription | GET /billing/subscriptions/{subscriptionID}/ | Subscription info |
getSubscriptionItem | GET /billing/subscription-items/{subscriptionItemID}/ | Subscription item info |
listBillingBundles | GET /billing/bundles/ | Billing bundles list |
listBillingFeatures | GET /billing/features/ | Billing feature list |
listBillingPaymentOptions | GET /billing/payment-options/ | Billing payment option list |
listBillingProducts | GET /billing/products/ | Billing products list |
listPaymentMethods | GET /billing/payment-methods/ | Payment method list |
listSubscriptionItems | GET /billing/subscription-items/ | Subscription items list |
listSubscriptions | GET /billing/subscriptions/ | Billing subscriptions list |
reactivateSubscription | POST /billing/subscriptions/{subscriptionID}/reactivate/ | Reactivate subscription |
updateBillingAccount | PATCH /billing/account/ | Update billing account |
updateSubscriptionItem | PATCH /billing/subscription-items/{subscriptionItemID}/ | Update subscription item |
cancelSubscription(subscriptionID)
Cancel subscription
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val subscriptionID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
apiInstance.cancelSubscription(subscriptionID)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#cancelSubscription")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#cancelSubscription")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
subscriptionID | java.util.UUID |
null (empty response body)
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
StripeSetupIntent createPaymentMethodStripeSetupIntent(createStripeSetupIntentRequest)
Create stripe's setup intent for add new payment method.
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val createStripeSetupIntentRequest : CreateStripeSetupIntentRequest = // CreateStripeSetupIntentRequest |
try {
val result : StripeSetupIntent = apiInstance.createPaymentMethodStripeSetupIntent(createStripeSetupIntentRequest)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#createPaymentMethodStripeSetupIntent")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#createPaymentMethodStripeSetupIntent")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
createStripeSetupIntentRequest | CreateStripeSetupIntentRequest | [optional] |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
Subscription createSubscription(subscription)
Create subscription
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val subscription : Subscription = // Subscription |
try {
val result : Subscription = apiInstance.createSubscription(subscription)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#createSubscription")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#createSubscription")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
subscription | Subscription | [optional] |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
deletePaymentMethod(paymentMethodID)
Delete payment method
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val paymentMethodID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
apiInstance.deletePaymentMethod(paymentMethodID)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#deletePaymentMethod")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#deletePaymentMethod")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
paymentMethodID | java.util.UUID |
null (empty response body)
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
BillingAccount getBillingAccount()
Billing account info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
try {
val result : BillingAccount = apiInstance.getBillingAccount()
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#getBillingAccount")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#getBillingAccount")
e.printStackTrace()
}
This endpoint does not need any parameter.
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
Bundle getBillingBundle(bundleID)
Bundle info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val bundleID : kotlin.String = bundleID_example // kotlin.String |
try {
val result : Bundle = apiInstance.getBillingBundle(bundleID)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#getBillingBundle")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#getBillingBundle")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
bundleID | kotlin.String |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
PaymentOption getBillingPaymentOption(paymentOptionID)
Payment option info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val paymentOptionID : kotlin.String = paymentOptionID_example // kotlin.String |
try {
val result : PaymentOption = apiInstance.getBillingPaymentOption(paymentOptionID)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#getBillingPaymentOption")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#getBillingPaymentOption")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
paymentOptionID | kotlin.String |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
Product getBillingProduct(productID)
Product info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val productID : kotlin.String = productID_example // kotlin.String |
try {
val result : Product = apiInstance.getBillingProduct(productID)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#getBillingProduct")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#getBillingProduct")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
productID | kotlin.String |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
PaymentMethod getPaymentMethod(paymentMethodID)
Payment method info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val paymentMethodID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : PaymentMethod = apiInstance.getPaymentMethod(paymentMethodID)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#getPaymentMethod")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#getPaymentMethod")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
paymentMethodID | java.util.UUID |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
Subscription getSubscription(subscriptionID)
Subscription info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val subscriptionID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : Subscription = apiInstance.getSubscription(subscriptionID)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#getSubscription")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#getSubscription")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
subscriptionID | java.util.UUID |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
SubscriptionItem getSubscriptionItem(subscriptionItemID)
Subscription item info
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val subscriptionItemID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : SubscriptionItem = apiInstance.getSubscriptionItem(subscriptionItemID)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#getSubscriptionItem")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#getSubscriptionItem")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
subscriptionItemID | java.util.UUID |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<Bundle> listBillingBundles()
Billing bundles list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
try {
val result : kotlin.collections.List<Bundle> = apiInstance.listBillingBundles()
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#listBillingBundles")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#listBillingBundles")
e.printStackTrace()
}
This endpoint does not need any parameter.
kotlin.collections.List<Bundle>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<BillingFeature> listBillingFeatures()
Billing feature list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
try {
val result : kotlin.collections.List<BillingFeature> = apiInstance.listBillingFeatures()
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#listBillingFeatures")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#listBillingFeatures")
e.printStackTrace()
}
This endpoint does not need any parameter.
kotlin.collections.List<BillingFeature>
Configure bearerAuth: ApiClient.accessToken = "" Configure wireguardAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<PaymentOption> listBillingPaymentOptions()
Billing payment option list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
try {
val result : kotlin.collections.List<PaymentOption> = apiInstance.listBillingPaymentOptions()
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#listBillingPaymentOptions")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#listBillingPaymentOptions")
e.printStackTrace()
}
This endpoint does not need any parameter.
kotlin.collections.List<PaymentOption>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<Product> listBillingProducts()
Billing products list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
try {
val result : kotlin.collections.List<Product> = apiInstance.listBillingProducts()
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#listBillingProducts")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#listBillingProducts")
e.printStackTrace()
}
This endpoint does not need any parameter.
kotlin.collections.List<Product>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<PaymentMethod> listPaymentMethods()
Payment method list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
try {
val result : kotlin.collections.List<PaymentMethod> = apiInstance.listPaymentMethods()
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#listPaymentMethods")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#listPaymentMethods")
e.printStackTrace()
}
This endpoint does not need any parameter.
kotlin.collections.List<PaymentMethod>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<SubscriptionItem> listSubscriptionItems(subscription, perPage, page)
Subscription items list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val subscription : kotlin.String = subscription_example // kotlin.String |
val perPage : kotlin.Int = 56 // kotlin.Int |
val page : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.collections.List<SubscriptionItem> = apiInstance.listSubscriptionItems(subscription, perPage, page)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#listSubscriptionItems")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#listSubscriptionItems")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
subscription | kotlin.String | [optional] | |
perPage | kotlin.Int | [optional] | |
page | kotlin.Int | [optional] |
kotlin.collections.List<SubscriptionItem>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
kotlin.collections.List<Subscription> listSubscriptions(product, perPage, page)
Billing subscriptions list
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val product : kotlin.String = product_example // kotlin.String |
val perPage : kotlin.Int = 56 // kotlin.Int |
val page : kotlin.Int = 56 // kotlin.Int |
try {
val result : kotlin.collections.List<Subscription> = apiInstance.listSubscriptions(product, perPage, page)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#listSubscriptions")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#listSubscriptions")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
product | kotlin.String | [optional] | |
perPage | kotlin.Int | [optional] | |
page | kotlin.Int | [optional] |
kotlin.collections.List<Subscription>
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
Subscription reactivateSubscription(subscriptionID)
Reactivate subscription
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val subscriptionID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
try {
val result : Subscription = apiInstance.reactivateSubscription(subscriptionID)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#reactivateSubscription")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#reactivateSubscription")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
subscriptionID | java.util.UUID |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: Not defined
- Accept: application/json
BillingAccount updateBillingAccount(billingAccount)
Update billing account
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val billingAccount : BillingAccount = // BillingAccount |
try {
val result : BillingAccount = apiInstance.updateBillingAccount(billingAccount)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#updateBillingAccount")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#updateBillingAccount")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
billingAccount | BillingAccount |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json
SubscriptionItem updateSubscriptionItem(subscriptionItemID, subscriptionItem)
Update subscription item
// Import classes:
//import com.forestvpn.api.client.infrastructure.*
//import com.forestvpn.api.client.models.*
val apiInstance = BillingForestVPNAPI()
val subscriptionItemID : java.util.UUID = 38400000-8cf0-11bd-b23e-10b96e4ef00d // java.util.UUID |
val subscriptionItem : SubscriptionItem = // SubscriptionItem |
try {
val result : SubscriptionItem = apiInstance.updateSubscriptionItem(subscriptionItemID, subscriptionItem)
println(result)
} catch (e: ClientException) {
println("4xx response calling BillingForestVPNAPI#updateSubscriptionItem")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling BillingForestVPNAPI#updateSubscriptionItem")
e.printStackTrace()
}
Name | Type | Description | Notes |
---|---|---|---|
subscriptionItemID | java.util.UUID | ||
subscriptionItem | SubscriptionItem |
Configure bearerAuth: ApiClient.accessToken = ""
- Content-Type: application/json
- Accept: application/json