Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in Adyen.Model.AcsWebhooks.ChallengeInfo.FlowEnum Parsing, Authentication Webhook send a not existing value #1103

Open
cedricmeleard opened this issue Jan 16, 2025 · 2 comments

Comments

@cedricmeleard
Copy link

cedricmeleard commented Jan 16, 2025

Describe the bug
The SDK (v25+) is unable to parse the Authentication webhook from Adyen. Specifically, it fails to handle the challenge.flow field when the enum value is "PWD_OTP_PHONE_FL", as this value does not exist in the SDK.

Example of failing payload part:

"authentication": {
    "acsTransId": "03d1c58f-de0a-4443-85db-eda58a0f9a7b",
    "challenge": {
        "flow": "PWD_OTP_PHONE_FL",
        "lastInteraction": "2025-01-15T23:00:12+01:00",
        "phoneNumber": "*****4770",
        "resends": 1,
        "retries": 1
    }
}

SDK Reference
In SDK v27.0.0, the Adyen.Model.AcsWebhooks.ChallengeInfo.FlowEnum enum is defined as follows:

 [JsonConverter(typeof(StringEnumConverter))]
        public enum FlowEnum
        {
            /// <summary>
            /// Enum OTPSMS for value: OTP_SMS
            /// </summary>
            [EnumMember(Value = "OTP_SMS")]
            OTPSMS = 1,

            /// <summary>
            /// Enum OOB for value: OOB
            /// </summary>
            [EnumMember(Value = "OOB")]
            OOB = 2
        }

The PWD_OTP_PHONE_FL value is missing from this enum, causing parsing failures when such webhooks are received.

To Reproduce

  1. Activate the Authentication webhook in the Adyen platform.
  2. Send a test webhook containing a challenge.flow value of "PWD_OTP_PHONE_FL".
  3. Observe the failure when the SDK attempts to parse the payload.

Expected behavior

The SDK should properly parse the challenge.flow value without error, including support for "PWD_OTP_PHONE_FL".

Additional context

This issue is reproducible on the N2F account.
Please investigate adding support for the missing value or a fallback mechanism to prevent parsing errors.

@cedricmeleard cedricmeleard changed the title Error in Adyen.Model.AcsWebhooks.ChallengeInfo.FlowEnum Webhook send not existing value Error in Adyen.Model.AcsWebhooks.ChallengeInfo.FlowEnum Parsing, Authentication Webhook send a not existing value Jan 16, 2025
@Kwok-he-Chu
Copy link
Contributor

I've opened a ticket internally to include the following enum PWD_OTP_PHONE_FL in the openapi-specs, and then we'll include in our .NET library (and other libs as well).

@Kwok-he-Chu
Copy link
Contributor

Thank you for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants