CARD_DECLINED_VERIFICATION_REQUIRED Error and no SCA popup

Hi,

I’m using the Web Payments SDK with the new card.tokenize(verificationDetails) flow.

Here is the verification data I’m passing:

const verificationDetails = {
  amount: Number(overall_total).toFixed(2),
  currencyCode: 'EUR',
  intent: 'CHARGE',
  customerInitiated: true,
  sellerKeyedIn: false,
  billingContact: {
    givenName: 'Test',
    familyName: 'User',
    email: '[email protected]'
  }
};

Issue I’m seeing:

  • For some EU cards, SCA (3DS) is triggered during tokenization and have successful payment

  • For some other EU cards, no SCA popup is shown

  • Tokenization still succeeds

  • But backend payment fails with:
    CARD_DECLINED_VERIFICATION_REQUIRED

Can you please help me with this issue? Also What is the recommended way to handle this scenario?

Thanks.

Hi, could you please provide more information on how you’re testing? Is this in the sandbox environment? If so, which test credit cards are being used?

Thank you!

The sandbox environment is working fine. We had tasted with all the test cards and it worked ie. successful SCA popup and the transaction. We are getting this issue in production with our customers in EU.

@mousa-square Please let me know if you need any other information than above.

@nikhar Can you share your application ID as well as a payment ID example where you got this error?

Hi @josh-square , Our app ID is sq0idp-qAQzwto7YMrYbIGi_dlRww.

I have listed a few payment_ids below, but this issue is occurring more frequently and across many transactions:

NuuRmK8hoI2QlgLpqPC3yp9ktTSZY
fr0dx67mvgxCiISbXdfgyj4aBSVZY
XbEMjWTHL7H6xHODGO5w13EPviBZY
52deXq6HneDIICDEtTnHgufIkK9YY
LlSvfwPvPRmI6glGqTZfkmLsQ0dZY
nXQPK1uKNiAvD4fruJNAVfgBEAZZY

@nikhar Thanks! I’m checking with the team on what we can do here.

Hi @josh-square , Do you have any updates for me? If you need anything else from me, please let me know.

Hi @nikhar, yes I got an update from the team today! It looks like the issue is that the Web Payments SDK was instantiated with a different Location ID than was used to process the payment, which is causing these to be declined.

You’ll need the location ID in your Web Payments SDK initialization…

const payments = Square.payments(APPLICATION_ID, LOCATION_ID);

to match the location ID used in your CreatePayment request.

Thanks for the update @josh-square ! This explains my case.

I am passing the Location ID in the Web Payments SDK initialization:

const payments = Square.payments(APPLICATION_ID, LOCATION_ID);

But I noticed I am not explicitly passing location_id in my POST request to the Payments API (CreatePayment).

It sounds like that could be the gap causing the mismatch you described. Am I understanding correctly that adding location_id to the CreatePayment(Payments API) payload, matching the SDK Location ID, is likely the fix?

@nikhar Yes, that should be the fix! If you’re not passing in the location_id explicitly in your CreatePayment request, it will default to your account’s main location. By the sounds of it, that’s probably a different location than what’s being used to initialize the Web Payments SDK.

Thank you @josh-square ! I will get back to you. Will keep this convo open.