Google Pay and Apple Pay SCA

Hi Square developers

Quick questions, is there anything extra we need to do with the Apple Pay and Google Pay integration to make it SCA compatible?

We have seen a few transactions fail recently from our digital wallet integration with the error code CARD_DECLINED_VERIFICATION_REQUIRED.

Cheers, Paul

:wave: Was the verification_token included in the payment request on these failed payments? Do you have an example payment? :slightly_smiling_face:

Hey Bryan, sorry should point out it was via the in app SDK not on the website so as far as I can tell there isn’t a way to send a verifciation_token?

A recent payment that failed on the app with that error messages was made at 2022-03-21 12:19:41.260 by a user with the surname Connolly.

Do you have the payment_id that was returned for the failed payment?

Hi Bryan, we don’t capture the payment id, only the reason and location.

We have had a few more failed payments today with the same error code from the app, here is one of the Transactions in the Transaction Status screen:

23/03/2022, 13:02 Visa ending in 6523 Declined eCommerce £11.00

Okay, and they attempted to pay with Google Pay or Apple Pay?

They attempted to pay with Google Pay

Hi @Bryan-Square

Any updates on this? We were able to replicate this on our live app using Google Pay and have seen this error appear in our logs more regularly.

I heard back from the team and verifyBuyer should be called with all digital wallet payments so you can pass the verification_token in the payment request. :slightly_smiling_face:

1 Like

Is there any code examples or documentation available to show where verifyBuyer is passed into the Google Pay and Apple Pay process? I can’t see in the code where we would be able to pass this?

Here is our example with verifyBuyer for card payments entered in the Web SDK form fields. You’ll just need to make sure you call verifyBuyer to get the verification_token prior to making the call to CreatePayment with digital wallet payments. :slightly_smiling_face:

Hi @Bryan-Square
This is for the web payments SDK but the questions is regarding the In App Payments SDK. I can’t find any documentation or examples regarding SCA for this SDK. It isn’t clear what the process would be to get SCA working for Google Pay using the In App Payments SDK without documentation.

Ah, okay. Here is the In-App Payments SDK documentation for SCA. :slightly_smiling_face:

Ok grand, thanks, would be good to update the documentation for the next person to say that SCA is required for digital wallets as well as I can’t spot anything (might be obvious but wasn’t to me) :slight_smile:

So to piece the documentation together looks like we need to get the nonce as usual using requestGooglePayNonce, then call BuyerVerification.verify sending it via VerificationParameters and then try and get a verification token from this method to send back to our server along with the nonce.

Yes, that’s the flow. Also you are absolutely right about the documentation. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the product team. :slightly_smiling_face:

Fab, thanks for your help Bryan :+1:

Hi @Bryan-Square

We are still having issues with payments going through on digital wallets using the buyer verification code. It works on the test server but when we put it live we get back this error code:
CARD_DECLINED_VERIFICATION_REQUIRED

We ran a transaction at 2022-04-23 16:52 for £11 and got back the following nonce and verification code:
cnon:CBESECjJEJpH0FV8yPPJpNKepXw
verf:CBESEILJD82J9ahv6bQddNJbaAY

On our server when we pass these to the Create Payment request method we get get that error message each time:
CreatePaymentRequest.Builder(
paymentMethodNonce,
uuid,
bodyAmountMoney)
.Autocomplete(false)
.LocationId(ConfigurationManager.AppSettings[“Square.LocationId”])
.BuyerEmailAddress(email)
.VerificationToken(verificationToken)
.Build();

Are you able to check anything on your end for the reason why this transaction might fail with this error code when we are passing through the verification token?

What’s the payment_id of the failed payment? :slightly_smiling_face:

When the payment fails with an exception I don’t believe we get a payment_id back do we? Is the id in the exception?

All declined payments will return a payment_id that you can use to retrieve the declined payment. :slightly_smiling_face: