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

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

  ```vb VB.NET theme={null}
  Public Class PaymentForm
  ```
</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-793e934b42" />

### PaymentForm()

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

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

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

## Methods

<a id="create-session-5ca683888e" />

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

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

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

**Parameters**

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

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