OrcusPay 1.0.0

dotnet add package OrcusPay --version 1.0.0
                    
NuGet\Install-Package OrcusPay -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OrcusPay" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OrcusPay" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="OrcusPay" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OrcusPay --version 1.0.0
                    
#r "nuget: OrcusPay, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OrcusPay@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OrcusPay&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=OrcusPay&version=1.0.0
                    
Install as a Cake Tool

OrcusPay .NET SDK

Official .NET client for the OrcusPay API.

Install

dotnet add package OrcusPay

Quick Start

using OrcusPay;

using var client = new OrcusPayClient(
    accessKey: "ak_test_xxxxx",
    secretKey: "sk_test_xxxxx"
);

var session = await client.CreateCheckoutSessionAsync(new
{
    success_url = "https://yoursite.com/success?session={CHECKOUT_SESSION_ID}",
    cancel_url = "https://yoursite.com/cancel",
    line_items = new[]
    {
        new
        {
            quantity = 1,
            price_data = new
            {
                unit_amount = 50000, // 500.00 BDT in paisa
                product_data = new { name = "Premium Plan" },
            },
        }
    },
    currency = "BDT",
    customer = new
    {
        name = "Test Customer",
        email = "customer@example.com",
        phone = "01700000000",
    },
});

// Redirect customer to session.GetProperty("url").GetString()

Retrieve a Checkout Session

var session = await client.GetCheckoutSessionAsync("pay_abc123");
Console.WriteLine(session.GetProperty("payment_status").GetString());

List Payments

var payments = await client.ListPaymentsAsync(limit: 10, status: "SUCCEEDED");

foreach (var payment in payments.GetProperty("payments").EnumerateArray())
{
    Console.WriteLine($"{payment.GetProperty("id")} - {payment.GetProperty("amount")}");
}
var link = await client.CreatePaymentLinkAsync(new
{
    title = "Donation",
    amount = 500,
    is_reusable = true,
    success_url = "https://yoursite.com/thanks",
});

Console.WriteLine(link.GetProperty("url").GetString());

Error Handling

try
{
    var payment = await client.GetPaymentAsync("invalid_id");
}
catch (OrcusPayException ex)
{
    Console.WriteLine(ex.Code);    // "not_found"
    Console.WriteLine(ex.Message); // "Payment not found"
    Console.WriteLine(ex.Status);  // 404
}

Available Methods

  • CreateCheckoutSessionAsync(params) — Create a hosted checkout page
  • GetCheckoutSessionAsync(id) — Retrieve a checkout session
  • ListPaymentsAsync(limit?, cursor?, status?) — List payments with pagination
  • GetPaymentAsync(id) — Retrieve a single payment
  • ListPaymentLinksAsync(limit?, cursor?) — List payment links
  • CreatePaymentLinkAsync(params) — Create a payment link
  • GetPaymentLinkAsync(id) — Retrieve a payment link
  • StatusAsync() — Check API status

All methods accept an optional CancellationToken.

Custom API URL

For self-hosted OrcusPay instances:

using var client = new OrcusPayClient(
    accessKey: "ak_prod_xxxxx",
    secretKey: "sk_prod_xxxxx",
    apiUrl: "https://your-instance.com/api/v1"
);

Requirements

  • .NET 6.0, 7.0, 8.0, or 9.0
  • No external dependencies

License

MIT

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 80 9/14/2026