The API doc explain this error as “The card issuer declined the request because the postal code is invalid.”, but in our production environment so far, in most cases the API can create payment successfully without postal code in the request, may i know why this error happened this time? and what our application is supposed to do when this error occurred?
Was the customer prompted to put in their postal code? The Card payment method of the Web Payments SDK automatically infers whether to display the ZIP code, postal code, or postcode based on the issuing country of the buyer’s credit card. Depending on the card that’s used, the SDK automatically removes the postal code if the card’s issuing country doesn’t require the postal code for the payment. If the customer was prompted for the postal code the bank is likely to decline the payment if one isn’t provided.
Was the customer prompted to put in their postal code? The Card payment method of the Web Payments SDK automatically infers whether to display the ZIP code, postal code, or postcode based on the issuing country of the buyer’s credit card
We didn’t know whether the customer was prompted or not, as we were absent when this error occurred.
We also didn’t know the Web Payment SDK may automatically infer those fields (thanks for pointing this out).
In our application, the payment flow is designed like these:
save the customer’s card on file in square, through Web Payment SDK
make an authorized payment in the way of charging card on file, with a small amount (the purpose is to validate whether it’s a real card or not)
provide our service to customer
make a new payment in the way of charging card on file, with a variable amount according to the service we provided to customer in 3.
cancel the authorized payment which was created in 2.
this time above 1. and 2. succeeded, and this error ADDRESS_VERIFICATION_FAILURE happened at 4., does it mean that the customer might be prompted for inputting postal code, etc. in Web Payment SDK at above step 1.? and if the postal code was not input properly, above 2. and 4. might be declined by bank?
Okay, that makes sense. The bank probably had a higher risk level with the second payment cause you charged the card again for a higher amount. Thats a common risk signal banks look for cause bad actors will often try an authorize a payment for a small amount to check that its a valid card. If the authorization goes through they ofter charge a higher amount. It would be better if you charged the full amount if possible for your use case.
so based on the error ‘ADDRESS_VERIFICATION_FAILURE’, it’s still the case that customer might be prompted to input postal code but he didn’t provide a valid one, and then based on the risk signal bank looks for, the payment was declined, is my understanding correct?