NETStandard 2.0 client for the Paylike API
This plugin is not developed or maintained by Paylike but kindly made available by the community.
Released under the MIT license: https://opensource.org/licenses/MIT
Installation
nuget install Paylike.NETStandard
-or-
dotnet add package Paylike.NETStandard
PaylikeClient
var client = new PaylikeClient(HttpClient httpClient, string privateKey = null, ILogger<PaylikeClient> logger = null)
Methods:
- void SetPrivateKeyForRequests(string privateKey)
Examples:
var transaction = await client.Transactions.Get("transaction-id");
var transaction = await client.Cards.Save("transaction-id","merchant-id");
Transactions
Methods:
- Task<PaylikeApiResponse> Get(string transactionId)
- Task<PaylikeApiResponse> Create(string merchantId, string cardId, string descriptor, string currency, int amountAsMinor)
- Task<PaylikeApiResponse> Create(string merchantId, string cardId, string descriptor, string currency, decimal amountAsMajor)
- Task<PaylikeApiResponse> Capture(string transactionId, int amount, string currency, string descriptor)
- Task<PaylikeApiResponse> Capture(string transactionId, decimal amount, string currency, string descriptor)
- Task<PaylikeApiResponse<List>> GetRecent(string merchantId, int limit)
- Task<PaylikeApiResponse> Refund(string transactionId, string descriptor, int amountAsMinor)
- Task<PaylikeApiResponse> Refund(string transactionId, string descriptor, string currency, decimal amountAsMajor)
Payouts
Methods:
- Task<PaylikeApiResponse> Get(string merchantId, string payoutId)
- Task<PaylikeApiResponse> Create(string merchantId, decimal amount, string currencyId, string descriptor, string bic, string iban)
Transfers
- Task<PaylikeApiResponse> Get(string transferId)
- Task<PaylikeApiResponse> Create(string merchantId, decimal amount, string currencyId, string token)
- Task<PaylikeApiResponse> Approve(string transferId)
Cards
- Task<PaylikeApiResponse> Get(string cardId)
- Task<PaylikeApiResponse> Save(string transactionId, string merchantId)