Class X402ServiceCollectionExtensions
Registers the x402 facilitator services in an Microsoft.Extensions.DependencyInjection.IServiceCollection.
Inheritance
object
X402ServiceCollectionExtensions
Namespace: Xrpl.X402.AspNetCore
Assembly: Xrpl.X402.AspNetCore.dll
Syntax
public static class X402ServiceCollectionExtensions
Methods
| Edit this page View SourceAddLedgerSettlingFacilitator(IServiceCollection)
Registers LedgerSettlingFacilitator as the singleton IX402Facilitator, settling through the IXrplClient already registered, with an InMemorySettledPaymentStore unless an ISettledPaymentStore is registered first.
Declaration
public static IServiceCollection AddLedgerSettlingFacilitator(this IServiceCollection services)
Parameters
| Type | Name | Description |
|---|---|---|
| IServiceCollection | services | The service collection. |
Returns
| Type | Description |
|---|---|
| IServiceCollection | The same |
Remarks
Register a shared ISettledPaymentStore before calling this when several instances settle for the same merchant: the in-memory default sees only its own process.
Exceptions
| Type | Condition |
|---|---|
| ArgumentNullException | Thrown when |