The Shell Card Management APIs SDK for .NET provides access to the Shell Card Management APIs REST APIs from .NET applications.
The Shell Card Management API provides secure and structured access to the Shell Card Platform, enabling integration with Shell’s internal systems for managing card-related resources.
This REST-based API uses the POST method for all operations—including retrieval, creation, update, and deletion of resources. It supports flexible search capabilities through JSON-encoded request bodies and returns JSON-formatted responses. Standard HTTP status codes are used to indicate the outcome of each request.
Authentication is handled via OAuth 2.0 using the Client Credentials flow. Access tokens must be included in the Authorization header of each request.
All resources are managed within the Shell Card Platform, which abstracts the complexity of backend systems. Some operations may be processed asynchronously, and clients should be prepared to handle delayed responses or polling mechanisms where applicable.
Add the .NET SDK as a project reference into your solution:
dotnet add reference <path-to-sdk>/ShellCardManagementApis.csprojRegister the client with IServiceCollection and resolve it from the container. The HttpClient is managed by IHttpClientFactory. Configure the client's behavior through ShellCardManagementApisClientOptions.
services.AddShellCardManagementApisClient(options =>
{
options.BearerToken =
new OAuth2ClientCredentials
{
ClientId = "YOUR_CLIENT_ID",
ClientSecret = "YOUR_CLIENT_SECRET",
};
options.Environment = ServerEnvironment.Sit;
// TODO: configure more client options here
});Create the client by passing an HttpClient you manage yourself. Configure the client's behavior through ShellCardManagementApisClientOptions.
var httpClient = new HttpClient();
// TODO: configure more client options here
var options =
new ShellCardManagementApisClientOptions
{
BearerToken = new OAuth2ClientCredentials
{
ClientId = "YOUR_CLIENT_ID",
ClientSecret = "YOUR_CLIENT_SECRET",
},
Environment = ServerEnvironment.Sit,
};
var client = new ShellCardManagementApisClient(httpClient, options);For code examples and error responses, see API Reference.
Tip
Use a single ShellCardManagementApisClient instance for the lifetime of your application and
reuse it across all requests. Creating a new instance per request might exhaust the
connection pool.
This SDK is distributed under the MIT License.
Refer to the API reference for detailed information on available operations with code samples.
For further assistance, please contact support at api@shell.com.