Releases: Viincenttt/MollieApi
Mollie API 4.4.2.0
New features:
- Exception messages have been updated to provide more helpful guidance when OAuth-specific parameters (e.g., ProfileId or Testmode) are used with an API key.
- If an OAuth-specific client is used in combination with an API key, a targeted error message is now generated to prevent confusion.
Bugfixes:
- Move testmode parameter from query string to request body on CaptureClient.CreateCapture
Mollie API 4.4.1.0
New features:
- Add support for the CustomerId property in the SubscriptionResponse class.
Bugfixes:
- Fix issue where it was not possible to set a
ApplicationFee
on aOrderRequest
, because theApplicationFee
was on the wrong level. TheApplicationFee
property should now be set on theOrderRequest.Payment.ApplicationFee
property level.
Mollie API 4.4.0.0
New features:
- Add support for the cancelUrl, method, locale and testmode properties when updating a payment.
- Improve support for multi tenant setups, where the API / access key is not a static value. Example usage:
When registering dependencies:
builder.Services.AddMollieApi(options => {
//options.ApiKey = builder.Configuration["MySecretManagerMollie:ApiKey"]!;
options.SetCustomMollieSecretManager<TenantSecretManager>();
options.RetryPolicy = MollieHttpRetryPolicies.TransientHttpErrorRetryPolicy();
});
Custom secret manager for multi-tenant setup:
public class TenantSecretManager : IMollieSecretManager {
private readonly ITenantService _tenantService;
public string GetBearerToken() => _tenantService.GetCurrentTenant().ApiKey;
}
Bugfixes:
- Set PaymentLinkResponse.Amount property from required to optional nullable, since it possible to create a PaymentLink without an amount.
- Change OAuth authorize URL from www.mollie.com to my.mollie.com. Big thanks to @fjbender for the PR
- Update all links still pointing to api.mollie.nl to api.mollie.com
Mollie API 4.3.0.0
New features:
- Add support for the new Get PaymentLink Payments endpoint in the PaymentLink API client.
- Add support for the
BillingAddress
property onPaymentRequest
. - Add support for the
ShippingAddress
property onPaymentRequest
.
Technical improvements:
I've received feedback regarding the usage of the required
parameters I've added in version 4 of the library. In general, the reception has been positive. However, I've also received feedback from @martijnmelchers and @JoKeKt that it makes the library difficult to use when creating payment method specific PaymentRequest
objects. A common use-case is to create payment method specific PaymentRequest
objects using a switch statement on a payment method. However, since certain properties are now required, it was necessery to repeat these properties in the switch statement, resulting in a lot of duplicate code.
I've implemented a solution in the form of a constructor overload on all payment specific PaymentRequest
objects that you can use to avoid this code duplication. An example can be found here
Mollie API 4.2.0.0
New features:
- Added support for the
Archived
property on thePaymentLinkResponse
class. - Added support for updating payment links through the new
Update payment link
API method. - Added support for deleting payment links through the new
Delete payment link
API method. - Added support for refunding split payments using the new
ReverseRouting
andRoutingReversals
properties. - Updated the list of available payment methods to include: Trustly, Twint, Satispay, Riverty, Blik, Bancomat Pay, Bacs direct debit and Alma.
Bugfixes:
- Payment method specific details were previously set to be not-nullable. The user @martijnmelchers reported that the API can return null for these properties. Payment method specific response classes have been updated to reflect this. For example, the
CreditCardPaymentResponse.Details
property is now nullable.
Mollie API 4.1.0.0
New features:
- Add support for the new order lines functionality in the Payment API
Bugfixes:
- For some HTTP status codes, such as 409 and 429 a
HttpRequestException
was thrown instead of aMollieApiException
. This has now been changed so all non-succesfull HTTP codes throw aMollieApiException
, so catching exception is slightly easier.
Mollie API 4.0.0.0
Breaking changes:
- Updated various namespaces of request and response models so they match the folder structure of the project.
- Updated the
BalanceClient.GetBalanceTransactionListAsync
andBalanceClient.GetPrimaryBalanceTransactionListAsync
methods to use aListResponse
type instead of a custom response type, so they are consistent with other API clients. - Removed the optional retry policy parameter from the
Mollie.Api.DependencyInjection.AddMollieApi
extensions method. A retry policy can now only be configured through theMollieOptions.RetryPolicy
property. - Renamed all API clients to consistently use singular names. For example, the
ChargebacksClient
has been renamed toChargebackClient
. - Renamed the
BalanceClient.ListBalancesAsync
method toBalanceClient.GetBalanceListAsync
so the naming is consistent with other API clients. - Renamed the
CaptureClient.GetCapturesListAsync
method toCaptureClient.GetCaptureListAsync
so the naming is consistent with other API clients. - Renamed the
ShipmentClient.GetShipmentsListAsync
method toShipmentClient.GetShipmentListAsync
so the naming is consistent with other API clients. - Renamed the
PaymentClient.DeletePaymentAsync
method toPaymentClient.CancelPaymentAsync
so the naming is consistent with the Mollie API reference. - Renamed the
RefundClient.CreateRefundAsync
method toRefundClient.CreatePaymentRefundAsync
so the naming is consistent with the Mollie API reference. - Renamed the
RefundClient.GetRefundListAsync
method toRefundClient.GetPaymentRefundListAsync
so the naming is consistent with the Mollie API reference. - Renamed the
RefundClient.GetRefundAsync
method toRefundClient.GetPaymentRefundAsync
so the naming is consistent with the Mollie API reference. - Renamed the
RefundClient.CancelRefundAsync
method toRefundClient.CancelPaymentRefundAsync
so the naming is consistent with the Mollie API reference. - Moved the
OrderClient.CreateOrderRefundAsync
and theOrderClient.GetOrderRefundListAsync
methods from theOrderClient
class to theRefundClient
class to be consistent with the Mollie API reference. - Created payment method specific return types when creating a mandate for a specific payment type. For example, when creating a
PaypalMandateRequest
, the response will now be aPaypalMandateResponse
that can contain PayPal specific information in thePaypalMandateResponse.Details
property. For a full list of payment method specific mandate response types, take a look at the updated documentation of theMandateClient
.
New features:
- Enabled nullable reference types in project. All models now indicate which properties are nullable and which properties are non-nullable. This means you no longer have to lookup this information in the Mollie API documentation.
- Added the
required
keyword for request properties that are required by the Mollie API, so you cannot forget to initialize required properties.
Mollie API 3.6.0.0
New features:
- Added support for the following properties in the PointOfSalePaymentResponseDetails:
CardNumber
,CardFingerprint
,CardAudience
,CardLabel
andCardCountryCode
. These properties are only available if the payment has been completed. - Added support for the optional
landing_page
parameter when retrieving a authorization url from theConnectClient
. The optional landing_page parameter allows you to specify if Mollie should show the login or the signup page, when the merchant is not logged in at Mollie. - Added support for the
RegistrationNumber
,VatNumber
andVatRegulation
properties in theOnboardingOrganizationRequest
class, so it is now possible to specify these properties when onboarding a new organization. - Added support for the
RedirectUrl
,CancelUrl
andWebhookUrl
properties in theOrderUpdateRequest
class, so it is now possible to specify these properties when updating a order. - Added support for setting your own custom idempotency key when sending requests to Mollie. This is supported for all API clients and methods. Example usage:
PaymentRequest paymentRequest = new PaymentRequest() {
Amount = new Amount(Currency.EUR, "100.00"),
Description = "Description",
RedirectUrl = DefaultRedirectUrl
};
using (_paymentClient.WithIdempotencyKey("my-idempotency-key"))
{
PaymentResponse response = await _paymentClient.CreatePaymentAsync(paymentRequest);
}
Technical changes:
- Downgraded Microsoft packages from version 7 to version 6, because some users reported issues when deploying to .NET6 Azure Functions hosts.
- Marked all JSON converters and factory classes that should only be used internally within the Mollie.Api package as
internal
instead ofpublic
.
Mollie API 3.5.1.0
Changes:
- Add support for the new
sort
parameter on the list payments and list orders endpoints. - Add support for the new
description
andcountriesOfActivity
properties on theProfileRequest
andProfileResponse
API's. - Add support for the TimesRemaining property to SubscriptionResponse, thanks to @intelligencecompany
- Rename the
ListSettlementCaptureAsync
method toGetSettlementCapturesListAsync
to make it more in-line with the API naming conventions, thanks to @dschierm
Mollie API 3.5.0.0
Changes:
- Added support for the
streetAdditional
property in theAddressObject
class. - Added missing
Dashboard
link in theProfileResponse
class. - Fixed bug where banktransfer specific payment method links were not deserialized.
- Fixed issue where the
CaptureResponse
class would not return the correct links in the_links
object. - Moved all documentation from the readme.md file to the Wiki.
- Updated documentation to include support for .NET8.
- Updated the example project to use .NET8