> ## Documentation Index
> Fetch the complete documentation index at: https://help.cryptolens.io/llms.txt
> Use this file to discover all available pages before exploring further.

# .NET: Subscription

> Signatures, models and behavior for SKM.V3.Methods.Subscription in the .NET SDK 4.0.54.

These methods are related to the [recurring billing](https://help.cryptolens.io/recurring-payments/index) module.
They can all be accessed using an access token with 'Subscription' permission.

**Namespace:** `SKM.V3.Methods`\
**Version:** 4.0.54. Both packages; all six documented target frameworks.

<CodeGroup>
  ```csharp C# theme={null}
  public class Subscription
  ```

  ```vb VB.NET theme={null}
  Public Class Subscription
  ```
</CodeGroup>

These methods return a result object. Check `Result == ResultType.Success` before using its data. In version 4.0.54, handled request and JSON errors normally return `ResultType.Error` with a diagnostic `Message`. A non-null result alone does not mean the request succeeded. See [Request Errors](/libraries/dotnet-reference/settings#request-errors).

## Constructors

<a id="ctor-1d2ca3cbcf" />

### Subscription()

Creates an empty Subscription object. This constructor does not send an API request.

<CodeGroup>
  ```csharp C# theme={null}
  public Subscription()
  ```

  ```vb VB.NET theme={null}
  Public Sub New()
  ```
</CodeGroup>

## Methods

<a id="record-usage-12d1d78efe" />

### RecordUsage(string, RecordUsageModel)

This method records uses Stripe's metered billing to record usage for a certain subscription.
In order to use this mehtod, you need to have set up recurring billing. A record will be created using Stripe's API with action set to 'increment'.
[RecordUsage](/api-reference/generated/RecordUsage)

<CodeGroup>
  ```csharp C# theme={null}
  public static BasicResult RecordUsage(string token, RecordUsageModel parameters)
  ```

  ```vb VB.NET theme={null}
  Public Shared Function RecordUsage(token As String, parameters As RecordUsageModel) As BasicResult
  ```
</CodeGroup>

[Web API Reference](/api-reference/generated/RecordUsage)

**Parameters**

| Name | Type | Description |
| - | - | - |
| `token` | `string` | The access token. Read more at [Auth](/api-reference/generated/Auth) |
| `parameters` | [`RecordUsageModel`](/libraries/dotnet-reference/models/record-usage-model) | The parameters that the method needs. |

**Returns:** [`BasicResult`](/libraries/dotnet-reference/models/basic-result). The API response. Check `Result` and `Message` before using the returned data.

[.NET SDK Reference](/libraries/dotnet-api) · [Reviewed Source Revision](https://github.com/Cryptolens/cryptolens-dotnet/tree/30aaf399ba53d9a111bee896c35bf557fa219394)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.