# Visa payments not succesfull - Customer Topic

**URL:** <https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259>\
**Category:** Questions\
**Created:** [April 3, 2024, 9:48am UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259 "2024-04-03T09:48:59Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali.atashinbar](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@ali.atashinbar](https://developer.squareup.com/forums/u/ali.atashinbar)\
**Post date:** [April 3, 2024, 9:49am UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/1 "2024-04-03T09:49:00Z")

</div>

Hello, I am developer of “Square Payment” addon for Modern Events Calendar plugin.

My customer talk to you about visa issue and you replied:

```auto
> I can help the developers of the addon.

> if you are the devs for the addon, I can help debug the code.

Lance

Developer Success Engineer | Square, Inc.

```

How can I talk with Lance?

---

<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:** [April 3, 2024, 5:19pm UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/2 "2024-04-03T17:19:05Z")

</div>

Happy to help. What questions do you have about the application? 🙂

---

<div class="post-metadata">

**Author:** ![Lance-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/lance-square/32/2704_2.png) [@Lance-Square](https://developer.squareup.com/forums/u/Lance-Square)\
**Post date:** [April 8, 2024, 8:25pm UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/3 "2024-04-08T20:25:31Z")

</div>

HI @Ali,

Either I or Bryan can help you. You can also reply or get added into an ongoing email thread we have going on with your team.

As Bryan asked, we could use some more details on what issue. And the application id you’re having issues with.

---

<div class="post-metadata">

**Author:** ![ali.atashinbar](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@ali.atashinbar](https://developer.squareup.com/forums/u/ali.atashinbar)\
**Post date:** [April 9, 2024, 6:01am UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/4 "2024-04-09T06:01:24Z")

</div>

Hello again,

We have developed a plugin for WordPress that allows users to manage their payments from square

But one of the users reported a problem to us with this text:

> The message it shows is:  
> Different request parameters used for the same idempotency-key TBE18430  
> and then on the 2nd attempt  
> Authorization error:  
> Card\_declined\_verification\_required

The first case is probably pressing the payment button twice and this error appeared, but in the case of Authorization error, when we test, we do not see any error.

My request has 2 parts:  
1- How can I set up my developer account to see this error?

2- How should this be fixed? Of course, by reading the documents, I can understand almost what needs to be done. Most of the first case is intended so that I can see this error in the API that I am creating.

---

<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:** [April 9, 2024, 4:12pm UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/5 "2024-04-09T16:12:50Z")

</div>

Is your integration calling [verifyBuyer](https://developer.squareup.com/reference/sdks/web/payments#Payments.verifyBuyer) with [3DS](https://developer.squareup.com/docs/web-payments/sca-charge-card-on-file)? If no then you’ll need to make sure it’s calling `verifyBuyer` to pass the `verification_token` to the `CreatePayment` request. 🙂

---

<div class="post-metadata">

**Author:** ![ali.atashinbar](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@ali.atashinbar](https://developer.squareup.com/forums/u/ali.atashinbar)\
**Post date:** [April 12, 2024, 6:45am UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/6 "2024-04-12T06:45:28Z")

</div>

> [@Bryan-Square](#):
>
> verification\_token

Thank you. Verification token is just unique code? or it should has specific parameters?

---

<div class="post-metadata">

**Author:** ![Lance-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/lance-square/32/2704_2.png) [@Lance-Square](https://developer.squareup.com/forums/u/Lance-Square)\
**Post date:** [April 12, 2024, 4:12pm UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/7 "2024-04-12T16:12:59Z")

</div>

The verification token is generated by the Web Payments SDK. You’ll want to checkout [this documentation](https://developer.squareup.com/docs/web-payments/sca), and follow the steps to generate a verification token.

---

<div class="post-metadata">

**Author:** ![ali.atashinbar](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@ali.atashinbar](https://developer.squareup.com/forums/u/ali.atashinbar)\
**Post date:** [April 16, 2024, 5:38am UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/8 "2024-04-16T05:38:21Z")

</div>

Thank you. We used PHP to send request. Do you have any docs about that?

```auto
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL, 'https://connect.squareupsandbox.com/v2/payments');
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
$headers = array(
        "Content-Type: application/json",
        "Authorization: Bearer " . $access_token
);
curl_setopt($curl_handle, CURLOPT_HTTPHEADER, $headers);

$data = '{
    "amount_money": {
        "currency": "' . $currency . '",
        "amount": ' . $amount . '
    },
     "idempotency_key": "'. $transaction_id .'",
     "source_id": "'. $square_token .'",
}';

curl_setopt($curl_handle, CURLOPT_POSTFIELDS, $data);

```

---

<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:** [April 16, 2024, 4:32pm UTC](https://developer.squareup.com/forums/t/visa-payments-not-succesfull-customer-topic/14259/9 "2024-04-16T16:32:06Z")

</div>

The `verification_token` is generated on the client side like the `source_id`. You’ll first create the `source_id` from the Web Payments SDK then create the `verification_token` all on the client side. Then when you have both values you’ll pass them to your backend to make the above server side request. 🙂
