# Fail /three-ds-authentication on get verification token

**URL:** <https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417>\
**Category:** Questions\
**Tags:** web-payments-sdk, cards-api\
**Created:** [August 22, 2023, 5:38pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417 "2023-08-22T17:38:43Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jgarcrol](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jgarcrol](https://developer.squareup.com/forums/u/jgarcrol)\
**Post date:** [August 22, 2023, 5:38pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/1 "2023-08-22T17:38:43Z")

</div>

Hello Square!  
I am experiencing problems with the 3D(SCA) verification of some cards. I can’t get the challenge to verify the card to come out, and consequently I can’t store it. What can it be?

**Development environment: IONIC 7 + Angular 16**  
Test in: W11 Chrome 116 (DEV - localhost)  
In PRO with Android and IOS the same problem also occurs

**APP ID: sq0idp–xTGk6WqlqOgDjOd2bwFFg**

PUT REQUEST [https://connect.squareup.com/v2/analytics/verifications/verf:\*\*\*\*\*/three-ds-authentication](https://connect.squareup.com/v2/analytics/verifications/verf: ***** /three-ds-authentication)

STATUS CODE: 400 (Bad Request)

Response:

```auto
{
    "errors": [
        {
            "category": "INVALID_REQUEST_ERROR",
            "code": "BAD_REQUEST",
            "detail": "Error authenticating with 3DS Server"
        }
    ]
}

```

And another request:

**PUT REQUEST** : [https://connect.squareup.com/v2/analytics/verifications/verf:](https://connect.squareup.com/v2/analytics/verifications/verf:)\*\*\*\*\*\*\*\*  
**STATUS CODE: 200**  
But in response…

```auto
{
    "token": " **********",
    "status": "COMPLETED",
    "challenges": [
        {
            "type": "SQUARE_THREEDS",
            "status": "COMPLETED",
            "square_three_ds_verification": {
                "status": "ERROR",
                "three_ds_server_transaction_id": " ********",
                "directory_server_id": "A000000004",
                "message_version": "2.2.0"
            }
        }
    ]
}

```

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [August 22, 2023, 6:10pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/2 "2023-08-22T18:10:40Z")

</div>

Those aren’t documented base path URLs. Is there a reason your calling them directly? 🙂

---

<div class="post-metadata">

**Author:** ![jgarcrol](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jgarcrol](https://developer.squareup.com/forums/u/jgarcrol)\
**Post date:** [August 22, 2023, 6:22pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/3 "2023-08-22T18:22:30Z")

</div>

I don’t call them directly, it’s what I’ve seen debugging from the browser. In code, follow the steps indicated in the square web documentation:

1. Tokenize card
2. Call payments.verifyBuyer
3. Call store card

Thanks!!

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [August 22, 2023, 6:25pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/4 "2023-08-22T18:25:32Z")

</div>

Okay, is there a particular card that your seeing this issue with every time? Or is this sporadic. 🙂

---

<div class="post-metadata">

**Author:** ![jgarcrol](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jgarcrol](https://developer.squareup.com/forums/u/jgarcrol)\
**Post date:** [August 22, 2023, 6:28pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/5 "2023-08-22T18:28:46Z")

</div>

It happens with some cards, mainly with MasterCard but I haven’t detected a pattern yet

I also think it may depend on the device, in IOS some cards won’t let me add them, but in the web version of my app it does…

---

<div class="post-metadata">

**Author:** ![jgarcrol](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jgarcrol](https://developer.squareup.com/forums/u/jgarcrol)\
**Post date:** [August 29, 2023, 5:54pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/6 "2023-08-29T17:54:30Z")

</div>

Hi Bryan!!

I’d like to address this matter again. I’ve already pinpointed the issue of failing card validation. It’s causing problems when I’m on **[http://localhost:4200](http://localhost:4200/)** (My development server), as well as when **I deploy the hybrid applications on Android and iOS. Is HTTPS necessary to enable card validation?** In hybrid technology-based apps like Ionic, I don’t have control over this since they run on the client’s device.

Looking forward to your response. Thank you very much.

---

<div class="post-metadata">

**Author:** ![jgarcrol](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jgarcrol](https://developer.squareup.com/forums/u/jgarcrol)\
**Post date:** [August 29, 2023, 6:09pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/7 "2023-08-29T18:09:35Z")

</div>

I attach more information

 ![image](https://global.discourse-cdn.com/square/original/2X/a/a01139d94b3246daf1ff2ec69d7f9f7824b0baa2.png)  
 ![image](https://global.discourse-cdn.com/square/original/2X/7/7fd7ee4915287f22207e27d79524d9566cbc7220.png)

With this test card:  
**Mastercard 5248 4800 0021 0026 111 Modal with Verification Code 123456**

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [August 29, 2023, 9:51pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/8 "2023-08-29T21:51:57Z")

</div>

Yes, HTTPS is required for all API calls to [Square endpoints](https://developer.squareup.com/docs/build-basics/general-considerations/tls-and-https). Make sure your website is served using HTTPS and that you’re making HTTPS calls to Square APIs. 🙂

---

<div class="post-metadata">

**Author:** ![jgarcrol](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jgarcrol](https://developer.squareup.com/forums/u/jgarcrol)\
**Post date:** [August 31, 2023, 10:45pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/9 "2023-08-31T22:45:47Z")

</div>

Okay…  
Due to technical limitations we cannot change to HTTPS, IONIC uses the file protocol for the server part and since IOS it cannot be changed to HTTPS.  
Attached is a screenshot of the official IONIC documentation

 ![image](https://global.discourse-cdn.com/square/original/2X/a/a423ca1a354b18346ea08c8b23bc725e17b0a67b.png)

> **[Capacitor Configuration | Capacitor Documentation](https://capacitorjs.com/docs/config)**
>
> Configuring Capacitor

And post talk this → [Cordova Webview Schemes/Protocols](https://www.mathew-paul.nz/posts/cordova-webview-schemes-and-protocols/)

Do you have no cases of implementation of the WEB SQUARE SDK in applications with hybrid technologies?

---

<div class="post-metadata">

**Author:** ![jgarcrol](https://avatars.discourse-cdn.com/v4/letter/j/7ba0ec/32.png) [@jgarcrol](https://developer.squareup.com/forums/u/jgarcrol)\
**Post date:** [August 31, 2023, 10:51pm UTC](https://developer.squareup.com/forums/t/fail-three-ds-authentication-on-get-verification-token/10417/10 "2023-08-31T22:51:01Z")

</div>

PD:  
On Android the solution has been this:

**capacitor.config.json**

```auto
{
  "appId": "es.appid",
  "appName": "appname",
  "webDir": "www",
  "bundledWebRuntime": false,
  "server": {
    "hostname": "app",
    "iosScheme": "https",
    "androidScheme": "https"
  }
}

```

On ios with this configuration it keeps failing 😔
