-
Notifications
You must be signed in to change notification settings - Fork 122
Description
Feature summary
The ability to use a singleton pattern for services but api key per request
Problem statement
In a multi-tenant usage scenario there maybe two tenants with different Adyen company accounts as they are not the same entity.
In this case additional work has to happen to use the library to create a scaffold around services per tenant. This is because of the Client implementation being the only way to provide the ApiKey (that I can see) and that being only set in construction.
Documentation/Examples suggests that these should be singletons - https://github.com/adyen-examples/adyen-dotnet-online-payments/blob/main/checkout-example/Startup.cs#L76
Proposed solution
RequestOptions is already available as an optional argument for all service requests to support idempotency and other optional query parameters.
Allowing the ApiKey to be provided here, or the client config entirely would allow this behaviour within the existing architecture of the library.
Alternatives considered
No response
Additional context
No response