braintree-web icon indicating copy to clipboard operation
braintree-web copied to clipboard

Request: Include 3DS error codes in verifyPayload

Open daelmaak opened this issue 10 months ago • 0 comments

General information

  • SDK version: 3.96.0
  • Environment: all

Issue description

When user is required to complete a challenge, and fails the challenge, we don't get the 3DS error code back in the payload produced by verifyCard.

Detailed description

After user submits the challenge, https://api.sandbox.braintreegateway.com/merchants/{merchantId}/client_api/v1/payment_methods/{methodId}/three_d_secure/authenticate_from_jwt is called. That endpoint can return response like this:

{
    "errors": [
        {
            "attribute": "three_d_secure_token",
            "message": "Failed to authenticate, please try a different form of payment.",
            "model": "transaction",
            "type": "user",
            "code": "81571"
        }
    ],
    "threeDSecureInfo": {
        "liabilityShifted": false,
        "liabilityShiftPossible": true
    }
}

This response contains the 3DS code "code": "81571" and nicely shows what went wrong. However this code is not present in the verifyPayload so we can't use it. I also didn't find any other property that'd communicate it precisely.

daelmaak avatar Apr 16 '24 10:04 daelmaak