> ## 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: PaymentForm

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

Payment form related methods.

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

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

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

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

### PaymentForm()

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

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

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

## Methods

### CreateSession(string, CreateSessionModel)

This method will create a new session for a Payment Form.
It allows you to customize appearance of the form (such as price, heading, etc).
You should only create new sessions from a server side (i.e. never directly from your application).
Note, session will only work once and it will eventually expire depending on Expires parameter.

```csharp C# theme={null}
public static CreateSessionResult CreateSession(string token, CreateSessionModel parameters)
```

```vb VB.NET theme={null}
Public Shared Function CreateSession(token As String, parameters As CreateSessionModel) As CreateSessionResult
```

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

**Parameters**

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

**Returns:** [`CreateSessionResult`](https://help.cryptolens.io/libraries/dotnet-reference/models/create-session-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.