Product

One runtime for every OPERA Cloud integration your group runs

StayFn is a .NET 8 host that runs your functions against OHIP. Everything an integration needs around its business logic is part of the platform, the same for every function and every hotel.

  • Your apps (HTTP API)
  • Schedules
  • OPERA Cloud business events
  • Signed webhooks
StayFnyour functions + one invocation pipeline
OPERA Cloudvia OHIP REST and Streaming
Functions

Plain C#. The signature is the contract.

A function is a class method with an [OhipFunction] attribute. Its parameters become a validated JSON API, its XML docs become the schema descriptions, and it reaches OPERA Cloud only through the context StayFn hands it.

  • Call it over HTTP, on a schedule, from an event handler or from another function
  • Variables per tenant, environment and hotel, with secrets resolved from your vault
  • Roslyn analyzers enforce the rules at compile time, with code fixes
  • Test it like any .NET code with the StayFn testing package
/// <summary>Count arrivals for a day.</summary>
[OhipFunction("count-arrivals")]
[OhipBudget(3)]  // OHIP calls it may make
public async Task<ArrivalsOutput> CountArrivals(
    DateOnly date, string? roomType, IFunctionContext ctx)
{
    var found = await ctx.Ohip.Api.Rsv
        .SearchHotelReservationsAsync(Search(date));
    return new(found.Count(roomType));
}

// POST /api/functions/rsv/count-arrivals/invoke
// {"date":"2026-10-05","roomType":"KING"}
OHIP layer

Typed access to OHIP, with the hard parts handled

StayFn generates C# clients for 22 OHIP modules from Oracle's published specifications, plus one method per operation: 2,843 of the 2,845 operations in the pinned 26.3 specs.

  • Tokens: password and client-credentials OAuth, cached and refreshed per environment
  • Rate limits: a governor per app key, and each function reserves its call budget before it runs
  • Errors: transient failures retried with backoff, OHIP problems mapped to clear exceptions
  • Long-running operations: the 202-and-poll pattern handled for you
  • Hotels: the hotel comes from the request, or the tenant's default for chain-level calls
22OHIP modules
2,843typed operations
1pipeline for every call
0hand-written HTTP
Business events

React to what happens in OPERA Cloud

StayFn subscribes to the OHIP Streaming API for your chain, stores each event once and runs your handlers in order per hotel and per reservation or profile, across any number of replicas.

  • Handlers are methods with [EventHandler("reservation.changed")]
  • Reservation and profile create and update events verified live; cancel, check-in, check-out, rate, availability and block events mapped
  • Unmapped events are still stored with their raw payload, never dropped
  • Other systems can push events through HMAC-signed webhooks
[EventHandler("reservation.changed")]
public async Task OnReservationChanged(
    ReservationChanged evt, IFunctionContext ctx)
{
    // Runs once per event, in order per reservation,
    // with the same retries and dead letters as any call.
    await ctx.Functions.Rsv().SyncReservationToCrmAsync(
        new(evt.ConfirmationNumber), ctx.Cancellation);
}
Operations dashboard

See every invocation and every OHIP call it made

Filter invocations by function, hotel, status or time, open one to see its OHIP call timeline, and replay dead letters with one click.

The StayFn dashboard's Invocations page: a list of reservation and profile functions with status, trigger, duration and OHIP call count. Hotel codes and correlation ids are blurred.
The Invocations page, from a test run against the OHIP sandbox. Hotel codes and correlation ids are blurred.

Overview

Invocations per minute, error rate, OHIP budget, stream lag and backlog.

Events and dead letters

The event inbox, checkpoints, handler runs and a Replay button for operators.

Tenants and usage

Tenants, environments, hotels, versioned variables, API keys, usage charts with CSV export, and the audit log.

AI authoring with the StayFn MCP server

Describe the integration. Get working, validated code.

StayFn ships an MCP server that gives Claude Code, and other MCP clients, the real OPERA Cloud API to work from. The assistant searches the catalog, reads the exact contract, scaffolds the function and validates it, so invented endpoints never make it into your code.

A terminal running Claude Code. The prompt asks for a StayFn function that returns tomorrow's arrivals with their VIP flag. Claude calls the StayFn MCP tools catalog.search (176 matches, searchHotelReservations), ohip.operation, function.scaffold (three files) and function.validate (compiles: true), then a call to the new function answers 200 OK in 806 ms with 21 arrivals.
Replay of a real session: the published StayFn 0.8.1 tool against the OHIP sandbox, output trimmed.
  1. catalog.searchFinds the right operation among the 2,845 in Oracle’s published OHIP specifications, and your existing functions.
  2. ohip.operationGives the exact contract: path, request and response types, and the typed StayFn call to use.
  3. function.scaffoldWrites the function, its tests and its documentation in your project.
  4. function.validateCompiles the result and checks it against StayFn’s rules before anyone runs it.

How to set up the MCP server →

Developer tools

Built for how your team writes code today

AI authoring with Claude Code

StayFn's MCP server lets Claude Code search the OHIP catalog, read an operation's exact contract, scaffold a function and compile-check it. It only uses operations the catalog returns, so it does not invent endpoints.

VS Code extension

Browse every OHIP operation, insert typed calls, scaffold functions with tests, invoke them with one click and watch live invocations with their OHIP calls.

Typed SDKs for your apps

Generate a C# or TypeScript client for your own functions. Every function is also described in OpenAPI, so any generator works.

Operations

Ready for production operations

  • Health checks, Prometheus metrics and OpenTelemetry traces
  • JSON logs with a correlation id on every line and guest data masked
  • Load shedding, retention windows per tenant, and runbooks for common incidents
  • One container image and PostgreSQL 16: nothing else to run

Capacity

In our load tests one host replica served about 1,000 requests per second of a one-call function on 4 vCPU, and 6,000 events per minute. In practice, OHIP's own limit of about 50 requests per second per app key is the ceiling, and StayFn shares it fairly between your functions.

Preview

Still on OPERA 5?

StayFn includes a preview bridge for OPERA 5: reads through OWS and inbound OXI messages behind the same interfaces your functions use. It is built from public documentation and has not yet been verified against a live OPERA 5 system. If you run OPERA 5 and want to help verify it, talk to us.

See StayFn run against OPERA Cloud

A 30-minute walkthrough: we connect to the OHIP sandbox, write a function together and watch it run in the dashboard.