CarmelNet 1.3.0
dotnet add package CarmelNet --version 1.3.0
NuGet\Install-Package CarmelNet -Version 1.3.0
<PackageReference Include="CarmelNet" Version="1.3.0" />
<PackageVersion Include="CarmelNet" Version="1.3.0" />
<PackageReference Include="CarmelNet" />
paket add CarmelNet --version 1.3.0
#r "nuget: CarmelNet, 1.3.0"
#:package CarmelNet@1.3.0
#addin nuget:?package=CarmelNet&version=1.3.0
#tool nuget:?package=CarmelNet&version=1.3.0
Unofficial .NET client for Carmel, making bank payments in the US.
Complete API documentation: https://docs.carmelsolutions.com/
To get an access token, call: CarmelPayment.getAcccessToken
To register a new webhook, call: CarmelWebhooks.createWebhookSubscription
To get a list of origination accounts, call: CarmelPayment.getOriginationAccounts
Then to create payments, call: CarmelPayment.createCreditTransfer
And to approve the payments, call: CarmelPayment.approveCreditTransfer
To verify the webhook signatures and parse the response: CarmelWebhooks.parseWebhookResponse
When processing a webhook, fetch the details via: CarmelPayment.fetchCreditTransfer
See the unit tests for examples.
Printing a CarmelAccessToken (ToString, %A, string interpolation) hides it, so a header built that way sends "Bearer CarmelAccessToken hidden". To read the token, match the case: let (CarmelAccessToken.Token raw) = token.
Running a returned Async again sends the request again, and this library never retries by itself.
CarmelPayment.createCreditTransfer is safe to retry only while Carmel holds the key: the Idempotency-Key comes from paymentId and the effective date from the first run. Carmel may forget a key after 24 hours, and a later retry can then send a second ACH, so read the order's status with CarmelPayment.fetchCreditTransfers first. A new call with the same paymentId after midnight sends the same key with a new date. A blank paymentId throws and sends nothing.
CarmelWebhooks.createWebhookSubscription is safe to retry: the Idempotency-Key is derived from the endpoint and events. Carmel may forget a key after 24 hours. Until then, registering the same endpoint and events after deleting the listener gets the deleted listener's response: use CarmelWebhooks.createWebhookSubscriptionWithKey with a new id.
CarmelPayment.approveCreditTransfer is not safe to retry: Carmel's docs give Idempotency-Key to POST requests only and this is a PATCH. After a failure, read the status with CarmelPayment.fetchCreditTransfer first.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- FSharp.Core (>= 10.1.201)
- FSharp.Data (>= 8.1.11)
- FSharp.Data.JsonProvider.Serializer (>= 1.0.7)
- SwaggerProvider (>= 2.3.0)
- System.Text.Json (>= 10.0.7)
-
net10.0
- FSharp.Core (>= 10.1.201)
- FSharp.Data (>= 8.1.11)
- FSharp.Data.JsonProvider.Serializer (>= 1.0.7)
- SwaggerProvider (>= 2.3.0)
-
net8.0
- FSharp.Core (>= 10.1.201)
- FSharp.Data (>= 8.1.11)
- FSharp.Data.JsonProvider.Serializer (>= 1.0.7)
- SwaggerProvider (>= 2.3.0)
- System.Text.Json (>= 10.0.7)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.3.0:
- BREAKING: CarmelAccessToken.ToString() and string interpolation hide the token, so a header built from them sends "Bearer CarmelAccessToken hidden"; match CarmelAccessToken.Token to read it
- BREAKING: redirects are not followed; a 3xx is a failure
- BREAKING: parseWebhookResponse refuses a timestamp ahead by more than the tolerance, and a svix-signature entry that is not exactly v1,signature
- FIXED: a returned Async runs again, re-sending the request; createCreditTransfer keeps its key and date
- FIXED: createWebhookSubscription sends an Idempotency-Key derived from the endpoint and events, as Carmel documents for all POST requests
- ADDED: createWebhookSubscriptionWithKey takes the id the key is built from
- FIXED: createCreditTransfer and createWebhookSubscriptionWithKey refuse a blank id, which would share one Idempotency-Key
- FIXED: docs state that a createCreditTransfer retry after Carmel's 24 hours can send a second ACH
- CHANGED: approveCreditTransfer is documented as not safe to retry, as Carmel documents no key for PATCH; the library makes one attempt
- FIXED: cancelling the Async cancels its HTTP request
- FIXED: webhook signatures are compared in fixed time