.NET SDK - 3.41.0
.NET SDK - 3.41.0
Mar 30, 2026
Idempotency resource mapping overhaul
Breaking change
Map entry order changed
The order of entries in GetMapForResource() was reorganized. Entries are matched by regex against the original request URL, and the first match wins. The most impactful reordering is that UsersCreateNaturalsSca (/sca/users/natural) and UsersCreateLegalsSca (/sca/users/legal) are now checked before UsersCreateNaturals (/users/natural) and UsersCreateLegals (/users/legal). Previously, an SCA user creation URL could be incorrectly matched by the non-SCA pattern first because /users/natural is a suffix of /sca/users/natural. The new order ensures the more specific SCA pattern takes priority.
If your code relied on a specific Resource type being returned for SCA user creation idempotency responses, verify the result is now correctly typed as UserNaturalScaDTO / UserLegalScaDTO.
Regex pattern fixes in LoadResourceObject
Two fixes were made to the regex used to match request URLs:
- Hyphen added to second parameter pattern: the placeholder for the second URL segment was changed from
[0-9a-zA-Z]+to[0-9a-zA-Z_-]+. Endpoints with hyphens in their second path parameter (e.g. resource IDs containing-) were previously unmatched and returned a rawstringasResource; they will now be deserialized. $end anchor added: the regex was not anchored to the end of the URL string. This could cause a shorter endpoint pattern to match a longer URL (e.g./users/naturalmatching/sca/users/natural). The$anchor now prevents partial suffix matches.
Added
New response-type mappings in ApiIdempotent
A large number of POST endpoint mappings were added to GetMapForResource() in ApiIdempotent. This method is used by GetAsync to deserialize the Resource field of an idempotency response into a strongly-typed object.
Why this can be a breaking change: if your code checks result.Resource for any of the endpoints below and previously handled it as a raw string (because it was unrecognized and left undeserialized), it will now be returned as a deserialized object of the mapped type. Any as string cast or ToString() call on result.Resource for these endpoints will behave differently.
Previously missing entries that were added, grouped by domain:
- Card:
card_validation - Pay-ins – PayPal:
payins_paypal_create(legacy),payins_paypal_web_create,paypal_data_collection_create - Pay-ins – Apple Pay:
apple_payins_direct_create - Pay-ins – Google Pay:
google_payins_direct_create,google_payins_direct_create_v2 - Pay-ins – alternative payment methods:
payins_mbway_web_create,payins_multibanco_web_create,payins_satispay_web_create,payins_blik_web_create,payins_klarna_web_create,payins_ideal_web_create,payins_giropay_web_create,payins_bancontact_web_create,payins_bizum_web_create,payins_swish_web_create,payins_twint_web_create - Pay-ins – recurring:
payins_recurring_registration,payins_recurring_card_direct - Pay-ins – deposit pre-authorized:
payins_create_card_pre_authorized_deposit,payins_create_deposit_preauthorized_payin_prior_to_complement,payins_create_deposit_preauthorized_payin_complement - Pay-ins – metadata:
get_payment_method_metadata - Payouts:
payouts_eligibility - Users:
users_create_kyc_page,users_enroll_sca,users_consent - Banking aliases:
banking_alias_create_iban - Client:
client_bankaccount,client_payout - Disputes:
disputes_document_page_create - UBO:
ubo_create - Conversions:
create_instant_conversion,create_quoted_conversion,create_client_wallets_instant_conversion,create_client_wallets_quoted_conversion,create_conversion_quote - Virtual accounts:
virtual_account_create - Identity verifications:
identity_verification_create - Recipients:
recipient_validate - Pay-in intents:
pay_in_intent_authorization_create,pay_in_intent_capture_create,pay_in_intent_cancel,pay_in_intent_refund_create,pay_in_intent_refund_reverse,pay_in_intent_dispute_create,settlement_cancel
idempotentKey parameter on previously missing methods
The optional idempotentKey parameter was missing from the following methods and has now been added:
ApiPayIns.GetPaymentMethodMetadataAsync(PaymentMethodMetadataPostDTO, string idempotentKey = null)ApiCards.ValidateAsync(string cardId, CardValidationPostDTO, string idempotentKey = null)ApiBankingAliases.CreateIbanAsync(string walletId, BankingAliasIbanPostDTO, string idempotentKey = null)
Changed
ExecutionDate nullable on CardPreAuthorizedDepositPayInDTO
CardPreAuthorizedDepositPayInDTO.ExecutionDate was declared as DateTime (non-nullable). It is now DateTime? (nullable).
Idempotency tests
All idempotency tests were consolidated and expanded in ApiIdempotencyTest. Tests that were previously scattered across ApiPayInsTest, ApiCardsTest, ApiConversionsTest, ApiDepositsTest, ApiDisputesTest, ApiClientsTest, ApiUboDeclarationTests, and ApiUsersTest have been moved and updated. New test cases were added for every mapping introduced in this release, including all new acquiring POST endpoints (marked [Ignore("to be tested manually")] as they require real payment credentials).
Klarna discount property
Added
Discount property on LineItem (Klarna)
Added an optional Discount property (int?) to the LineItem entity, representing the discount applied to a line item. This field is used when creating Klarna pay-ins.
Affected class: MangoPay.SDK.Entities.LineItem
Payconiq removal
Breaking change
Deprecated Payconiq PayIn removed
Payconiq pay-ins have been discontinued since 4 December 2025. All related SDK support has been removed.
Removed classes:
PayInPayconiqDTO(MangoPay.SDK.Entities.GET)PayInPayconiqPostDTO(MangoPay.SDK.Entities.POST)
Removed enum value:
PayInPaymentType.PAYCONIQ
Removed API methods:
ApiPayIns.CreatePayconiqAsync
Removed MethodKey values:
PayinsPayconiqCreate
Why this is a breaking change: any code referencing PayInPayconiqDTO, PayInPayconiqPostDTO, PayInPaymentType.PAYCONIQ, or ApiPayIns.CreatePayconiqAsync will no longer compile and must be removed.