Skip to content

diegostamigni/Rest.CryptoCom.Merchant

Repository files navigation

Rest.CryptoCom.Merchant

This is an unofficial .NET (standard) library for Crypto.com REST APIs.

.NET

Description

All APIs are grouped in services:

  • Payments service
  • Refunds service
  • ...

All concrete classes respect a contract (ex. PaymentsService -> IPaymentsService) making things easier for testing/mocking and people that wants to use dependency injection. All services need at least the ICryptoComConfig which exposes the following properties:

  • CryptoComPublicKey
  • CryptoComSecretKey

Because this config is strictly dependant on your project, you are supposed to inherit from it and provide an implementation upon service construction.

Examples

Create payment

var config = MyConfig(); // inherits from `ICryptoComConfig`
var paymentsService = new PaymentsService(config);
var result = await paymentsService.CreateAsync(new(1000, "USD"));
...

Get payment

var config = MyConfig(); // inherits from `IGetChangeioConfig`
var paymentsService = new PaymentsService(config);
var result = await paymentsService.GetAsync("payment-id");
...

Supported APIs

  • Payments
    • Create a payment
    • List your payments
    • Retrieve a payment by ID
    • Cancel a payment
  • Refunds
    • Request a refund
    • Retrieve a refund by refund ID
    • List your refunds by payment ID
  • Rebounds
    • Get rebounds by payment
  • Customers
    • Create a customer
    • Get customer by ID
    • Update a customer
    • List all customers
  • Products
    • Create a product
    • Get product by ID
    • List all Products
  • Subscriptions
    • Create a subscription
    • Get subscription by ID
    • Cancel a subscription
    • List all subscriptions

Feel free to contribute! Support for missing APIs and tests are underway.

About

.NET SDK for Crypto.com REST APIs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages