### Install Dodo Payments C# Package Source: https://github.com/dodopayments/dodopayments-csharp/blob/main/README.md This command adds the DodoPayments.Client package to your .NET project, allowing you to use the Dodo Payments C# SDK. ```bash dotnet add package DodoPayments.Client ``` -------------------------------- ### Create a Checkout Session with Dodo Payments C# SDK Source: https://github.com/dodopayments/dodopayments-csharp/blob/main/README.md This C# code snippet demonstrates how to initialize the DodoPaymentsClient, define parameters for creating a checkout session, and make the API call. The client is configured using environment variables by default. ```csharp using System; using DodoPayments.Client; using DodoPayments.Client.Models.CheckoutSessions; // Configured using the DODO_PAYMENTS_API_KEY and DODO_PAYMENTS_BASE_URL environment variables DodoPaymentsClient client = new(); CheckoutSessionCreateParams parameters = new() { ProductCart = [ new() { ProductID = "product_id", Quantity = 0, }, ], }; var checkoutSessionResponse = await client.CheckoutSessions.Create(parameters); Console.WriteLine(checkoutSessionResponse); ``` -------------------------------- ### Configure Dodo Payments C# Client (Environment Variables) Source: https://github.com/dodopayments/dodopayments-csharp/blob/main/README.md This C# code shows how to initialize the DodoPaymentsClient, which automatically reads the DODO_PAYMENTS_API_KEY and DODO_PAYMENTS_BASE_URL environment variables for configuration. ```csharp using DodoPayments.Client; // Configured using the DODO_PAYMENTS_API_KEY and DODO_PAYMENTS_BASE_URL environment variables DodoPaymentsClient client = new(); ``` -------------------------------- ### Configure Dodo Payments C# Client (Manual Token) Source: https://github.com/dodopayments/dodopayments-csharp/blob/main/README.md This C# code snippet demonstrates how to manually configure the DodoPaymentsClient by providing a BearerToken directly. ```csharp using DodoPayments.Client; DodoPaymentsClient client = new() { BearerToken = "My Bearer Token" }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.