question

artprzjr avatar image
artprzjr asked artprzjr answered

Ecomm test cards for AVS success scenarios -- Not working

I am currently testing AVS on some test cards, according to https://docs.clover.com/docs/test-card-numbers, to test Address Verification Service (AVS) success scenarios use one of the following test card numbers with any U.S. zip code for the following cards:

Visa - 4761530001111126
Mastercard - 5204245250003294
Amex - 375186917371340
Discover - 6011000050617475

However, it always returns a "succeeded" response regardless if I use US or CANADA postcodes.
How am I suppose to get a failed/declined response?

Heres is an actual response if I use CANADA postcode H1J2N2 (VISA card - 4761530001111126)

{
  "id" : "NJN7K4CDPCVZA",
  "amount" : 2562,
  "payment_method_details" : "card",
  "amount_refunded" : 0,
  "currency" : "CAD",
  "created" : 1700148754159,
  "description" : "Order placed online at www.sportira.com",
  "captured" : true,
  "ref_num" : "332000501055",
  "auth_code" : "OK1639",
  "outcome" : {
    "network_status" : "approved_by_network",
    "type" : "authorized"
  },
  "paid" : true,
  "status" : "succeeded",
  "source" : {
    "id" : "clv_1TSTSKkrsUBvMkwcdhDn4qCQ",
    "address_line1_check" : "pass",
    "address_zip" : "H1J2N2",
    "address_zip_check" : "pass",
    "brand" : "VISA",
    "cvc_check" : "pass",
    "exp_month" : "11",
    "exp_year" : "2025",
    "first6" : "476153",
    "last4" : "1126"
  },
  "ecomind" : "ecom"
}


Here is an actual response using US postcode 10001 (DISCOVERY card- 6011000050617475)

{
  "id" : "XJ5EAF5SY1PC4",
  "amount" : 6525,
  "payment_method_details" : "card",
  "amount_refunded" : 0,
  "currency" : "CAD",
  "created" : 1700149034824,
  "description" : "Order placed online at www.sportira.com",
  "captured" : true,
  "ref_num" : "332000501060",
  "auth_code" : "OK4769",
  "outcome" : {
    "network_status" : "approved_by_network",
    "type" : "authorized"
  },
  "paid" : true,
  "status" : "succeeded",
  "source" : {
    "id" : "clv_1TSTSsS9zYVamarRET48C4gQ",
    "address_line1_check" : "pass",
    "address_zip" : "10001",
    "address_zip_check" : "pass",
    "brand" : "DISCOVER",
    "cvc_check" : "pass",
    "exp_month" : "11",
    "exp_year" : "2025",
    "first6" : "601100",
    "last4" : "7475"
  },
  "ecomind" : "ecom"
}

Any response would be greatly appreciated, and thanks in advance/

e-commerce api
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bryanvargas avatar image
bryanvargas answered

we have a note in our docs that they will succeed:



NOTE


By default, passing address or Card Verification Code (CVC) data with the card number results in the address and CVC checks to succeed. If not specified, the value of the checks are null. Any expiration date in the future is considered valid


Have you tried to used one of the cards under the simulate decline?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

artprzjr avatar image
artprzjr answered

I'm actually trying to test the AVS to fail, according to https://docs.clover.com/docs/test-card-numbers#ecomm-test-cards-for-avs-success-scenarios AVS service will succeed if I use any US postcode, however if I use a canadian postcode the payment still pushes through, so how can I simulate an AVS failed scenario.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community