OpenRoam 0.1.0-rc.6

This is a prerelease version of OpenRoam.
dotnet add package OpenRoam --version 0.1.0-rc.6
                    
NuGet\Install-Package OpenRoam -Version 0.1.0-rc.6
                    
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="OpenRoam" Version="0.1.0-rc.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenRoam" Version="0.1.0-rc.6" />
                    
Directory.Packages.props
<PackageReference Include="OpenRoam" />
                    
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 OpenRoam --version 0.1.0-rc.6
                    
#r "nuget: OpenRoam, 0.1.0-rc.6"
                    
#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 OpenRoam@0.1.0-rc.6
                    
#: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=OpenRoam&version=0.1.0-rc.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OpenRoam&version=0.1.0-rc.6&prerelease
                    
Install as a Cake Tool

OpenRoam SDK for .NET

Official client for the OpenRoam Partner API: eSIMs, airtime, utility payments, gift cards, hotels and flights. .NET 8+ (net8.0).

Install

dotnet add package OpenRoam --version 0.1.0-rc.6

This is a release candidate: install it by its exact version, as above; a plain install does not pick it up. Before 1.0 the API can change between minor versions; every change is listed in the changelog.

Quick start

using OpenRoam;
using OpenRoam.Model;

using var openroam = new OpenRoamClient(Environment.GetEnvironmentVariable("OPENROAM_API_KEY")); // or new OpenRoamClient() with OPENROAM_API_KEY set

var found = await openroam.Esims.SearchAsync(new EsimsSearchQuery { CountryCode = "JP" });
var request = new EsimOrderRequest(currency: "USD", items: items);
var quote = await openroam.Esims.QuoteAsync(request);
var order = await openroam.Esims.OrderAsync(request);

await openroam.Esims.GetUsageAsync(iccid);
await openroam.Hotels.SearchAsync(new HotelSearchRequest(/* ... */));

Every product is a property of the client: Esims, Airtime, Utilities, GiftCards, Hotels, Flights, plus Orders, OrderItems (with OrderItems.ManualAmendments), Wallets, Currencies, Countries and MobileNetworks. Buying always reads SearchAsync, QuoteAsync, OrderAsync; GetAsync fetches one thing you own, List...Async returns many, everything else starts with a verb. A path id is the first argument, a body is passed as it is (the request model), query parameters are one object such as EsimsSearchQuery, and every method takes a CancellationToken last.

Make one client and keep it (it holds the HTTP connections); it is safe to share between threads. Options when you need them:

using var openroam = new OpenRoamClient(new OpenRoamOptions
{
    ApiKey = "key",
    Environment = OpenRoamEnvironment.Sandbox, // default Production
    MaxRetries = 3,                            // default 0: no retries
    // BaseUrl = "https://...",                to point anywhere else, for example a development host
    // HttpClient = httpClientFactory.CreateClient("openroam"), to send the requests through your own HttpClient
});

Orders are safe to repeat

An idempotency key means: if the same request arrives twice, OpenRoam makes one order, not two. OrderAsync creates a key for you on every call. To stay safe even if your own program crashes and asks again, pass a UUID generated once and persisted for that purchase, for example your order id if it is a UUID:

await openroam.Esims.OrderAsync(request, new OrderRequestOptions { IdempotencyKey = myOrderId });

Errors

A failed call throws an OpenRoamException with the error body of the API: Status, Code (branch on this), ErrorName, Message, RequestId (keep it for support) and Details. When no answer arrived (network error, timeout), Status is null and InnerException has the original error. A cancellation you asked for stays an OperationCanceledException.

try
{
    await openroam.Esims.OrderAsync(request);
}
catch (OpenRoamException error) when (error.Code == 11002)
{
    // the price rose above your maxPrice
}

Lists and pages

Pagination depends on the method. Esims.SearchAsync accepts Page and Limit and returns Items and Pagination, while Orders.ListAsync returns Orders and Pagination. Esims.ListCatalogAsync accepts Cursor and Limit and returns Items and NextCursor; pass NextCursor as Cursor to fetch the next page. Some lists, such as Esims.ListCompatibleDevicesAsync, return an unpaged list.

Webhooks

OpenRoamWebhooks.Verify(secret, timestampHeader, eventIdHeader, signatureHeader, rawBody);
// throws WebhookSignatureException when invalid or older than 5 minutes

Retries

Retries are off by default. Set MaxRetries to retry network errors, 429, 502/503/504 and "still running" (12002) safely: a POST with an Idempotency-Key (OrderAsync always has one) is sent again with the same key and the same body; a POST without one, such as QuoteAsync, is sent again only after a 429, which the API refused before doing anything. Never after a 500.

using var openroam = new OpenRoamClient(new OpenRoamOptions { ApiKey = apiKey, MaxRetries = 3 });

Each call is limited to 100 seconds, waits between retries included. The full behaviour: Retries and idempotency. RetryHandler (a DelegatingHandler) and OpenRoamRetry.NewIdempotencyKey() are also public if you build your own requests.

Good to know

  • Amounts are { amount, currency }. price is what OpenRoam charges you, value what your customer receives.
  • Full API documentation: https://openroam.com (partner portal). Support: support@openroam.com.

The client is generated from the OpenRoam Partner API description, so it always matches the API; Webhooks, Retries and the errors are hand-written. MIT licensed.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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.

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
0.1.0-rc.6 54 11/15/2026