# "VERIFY\_AVS\_FAILURE": "Postal code check failed

**URL:** <https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754>\
**Category:** Questions\
**Tags:** customers-api\
**Created:** [June 9, 2021, 2:15pm UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754 "2021-06-09T14:15:03Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cleantie](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@cleantie](https://developer.squareup.com/forums/u/cleantie)\
**Post date:** [June 9, 2021, 2:15pm UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/1 "2021-06-09T14:15:03Z")

</div>

Hi, we are using the following API to card on file , and get “VERIFY\_AVS\_FAILURE”: "Postal code check failed error.

> **[POST /v2/customers/{customer\_id}/cards - Square API Reference](https://developer.squareup.com/reference/square/customers-api/create-customer-card)**
>
> Adds a card on file to an existing customer.

However the card is added successfully in Square customer, but we don’t get the token due to AVS failure.

---

<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:** [June 9, 2021, 3:53pm UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/2 "2021-06-09T15:53:51Z")

</div>

What is the `customer_id` and application Id that was used to get this error?

---

<div class="post-metadata">

**Author:** ![cleantie](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@cleantie](https://developer.squareup.com/forums/u/cleantie)\
**Post date:** [June 9, 2021, 4:25pm UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/3 "2021-06-09T16:25:27Z")

</div>

This is from our API log file: Custid: 0000003  
Application ID  
sq0idp-QDe8hOsZpZrfMN9uTjEUGw

Merchant ID  
MLYRJMRGJ9SCS

API  
[Customers](https://developer.squareup.com/reference/square_2020-09-23/customers-api)

Endpoint Name  
[CreateCustomerCard](https://developer.squareup.com/reference/square_2020-09-23/customers-api/create-customer-card)

Status  
200

Path  
POST /v2/customers/{customer\_id}/cards

Square Version  
[2020-09-23](https://developer.squareup.com/reference/square_2020-09-23)

User Agent  
Square-DotNet-SDK/6.4.0

REFERENCE ID  
0000003

---

<div class="post-metadata">

**Author:** ![cleantie](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@cleantie](https://developer.squareup.com/forums/u/cleantie)\
**Post date:** [June 9, 2021, 9:33pm UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/4 "2021-06-09T21:33:10Z")

</div>

Hi Bryan, any advice on the issue?

---

<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:** [June 9, 2021, 11:27pm UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/5 "2021-06-09T23:27:40Z")

</div>

@cleantie I haven’t been able to find the error in our logs. I’m not seeing in AVS errors in the logs for a `CreateCustomerCard` on the application. Are you able to easily replicate the error?

---

<div class="post-metadata">

**Author:** ![cleantie](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@cleantie](https://developer.squareup.com/forums/u/cleantie)\
**Post date:** [June 9, 2021, 11:44pm UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/6 "2021-06-09T23:44:11Z")

</div>

It does every time I save the card on file, I can replicate it. Let me know what you need

---

<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:** [June 10, 2021, 12:14am UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/7 "2021-06-10T00:14:11Z")

</div>

Are you including a [billing\_address](https://developer.squareup.com/reference/square/customers-api/create-customer-card#request__property-billing_address) in the `CreateCustomerCard` call?

---

<div class="post-metadata">

**Author:** ![cleantie](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@cleantie](https://developer.squareup.com/forums/u/cleantie)\
**Post date:** [June 10, 2021, 1:16am UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/8 "2021-06-10T01:16:59Z")

</div>

We make a PUT /v2/customers/{customer\_id} then POST /v2/customers/{customer\_id}/cards.  
We do pass the card details and Posta Code e.g M2N0G3 . we alo tried M2N 0G3 format. The actual postal code matches the card address. The card is saved in Square customer file. But AVS error is returned. It must be related to Postal Code format for Canadian card.

---

<div class="post-metadata">

**Author:** ![cleantie](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@cleantie](https://developer.squareup.com/forums/u/cleantie)\
**Post date:** [June 10, 2021, 2:28am UTC](https://developer.squareup.com/forums/t/verify-avs-failure-postal-code-check-failed/2754/9 "2021-06-10T02:28:55Z")

</div>

I even tried a customer with US address REFERENCE ID 0000002, and tried our US Visa with proper Zipcode. Still getting the same error. The card is saved in Square customer file.
