ResearchCave.Billing.Client (1.0.0)
Published 2026-10-12 19:37:17 +03:00 by admin
Installation
dotnet nuget add source --name ResearchCave --username your_username --password your_token https://git.researchcave.com/api/packages/ResearchCave/nuget/index.jsondotnet add package --source ResearchCave --version 1.0.0 ResearchCave.Billing.ClientAbout this package
Typed, OIDC-authenticated client and durable purchase-event integration for ResearchCave Billing.
ResearchCave.Billing.Client
Use this package for Billing API calls and for consuming completed-purchase events.
Register the event listener inside the application's existing AddResearchCaveMessaging configuration:
builder.AddResearchCaveMessaging(
messaging => messaging.EnableJetStream = true,
wolverine => wolverine.ListenForCompletedBillingPurchases(
"rewards-billing-purchases",
typeof(BillingPurchaseCompletedHandler)));
The consumer name must be stable and unique to the independently deployed service. Replicas of the same service use the same name. Different services use different names so each receives every completed purchase.
Create a Wolverine handler for BillingPurchaseCompletedEvent in the marker type's assembly. The listener uses the dedicated Billing purchase stream and Wolverine's durable inbox, so the consuming service must configure durable Wolverine message storage.