> ## 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.md) 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.

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

```vb VB.NET theme={null}
Public Class Subscription
```

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](https://help.cryptolens.io/libraries/dotnet-reference/settings.md#request-errors).

## Constructors

### Subscription()

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

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

```vb VB.NET theme={null}
Public Sub New()
```

## Methods

### 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](https://help.cryptolens.io/api-reference/generated/RecordUsage.md)

```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
```

[Web API Reference](https://help.cryptolens.io/api-reference/generated/RecordUsage.md)

**Parameters**

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

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

[.NET SDK Reference](https://help.cryptolens.io/libraries/dotnet-api.md) · [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.