Using SumUp NuGet 0.0.8 with .NET 8, creating a checkout fails because Currency.Eur appears to serialize as "Eur" instead of "EUR".
Example:
var request = new CheckoutCreateRequest
{
CheckoutReference = "test-123",
Amount = 10.0f,
Currency = Currency.Eur,
MerchantCode = "<merchant-code>",
Description = "Test order",
ReturnUrl = "https://example.com/webhooks/sumup",
RedirectUrl = "https://example.com/checkout/complete"
};
await client.Checkouts.CreateAsync(request);
API response:
{
"error_code": "INVALID",
"message": "Currency 'Eur' or amount is invalid",
"param": "currency"
}
It looks like the SDK is using JsonStringEnumConverter(), which serializes the enum name (Eur) rather than the API value (EUR), even though the generated enum uses EnumMember(Value = "EUR").
Is this something I am missing on my side, since this would practically prevent checkouts from being created at all?