question

chandra-m avatar image
chandra-m asked chandra-m answered

Error Generating 402 Payment Required for American Express, but Successful for Visa, Discover, MasterCard

Hello Clover Community,

I'm encountering an issue while trying to generate a chargesRequest using the Clover API, specifically when attempting to generate a chargesRequest for AMEX(American Express).

I'm receiving a '402' response with the message '402 Payment Required.' Interestingly, this issue does not occur when using Visa, Discover, or MC(MasterCard).

I have provided the request payloads and responses for both unsuccessful AMEX(American Express) and successful (Visa/Discover/MasterCard) cases.

I'm seeking insights, advice, or potential solutions to resolve this issue and achieve successful payment for American Express transactions.

Any assistance or recommendations on debugging and resolving this issue would be greatly appreciated. Thank you for your time and expertise!

ChargesRequestApi Endpoint: https://scl-sandbox.dev.clover.com/v1/charges

For AMEX:

=========

Response

=========

{message: "402 Payment Required",…}

error: {code: "card_declined", message: "CVV could not be verified", charge: "KS1DF4QDJCB6M",…}

charge: "KS1DF4QDJCB6M"

code: "card_declined"

declineCode: "issuer_declined"

message: "CVV could not be verified"

message: "402 Payment Required"


Request Payload

===============

{ecomind: "ecom", metadata: {existingDebtIndicator: false}, amount: "45", currency: "USD",…}

amount: "45"

currency: "USD"

ecomind: "ecom"

metadata: {existingDebtIndicator: false}

existingDebtIndicator: false

source: "clv_1TSTSkXPsbmgFu6iyD3E574E"


For Visa ,Discover,MC (successfull):

Response

=========

{

"id" : "QQZ563DJV8C8G",

"amount" : 45,

"payment_method_details" : "card",

"amount_refunded" : 0,

"currency" : "USD",

"created" : 1697200129357,

"captured" : true,

"ref_num" : "328600501790",

"auth_code" : "OK9112",

"outcome" : {

"network_status" : "approved_by_network",

"type" : "authorized"

},

"paid" : true,

"status" : "succeeded",

"source" : {

"id" : "clv_1TSTSHMb94DAyMQ8gQG5NCfH",

"brand" : "VISA",

"exp_month" : "06",

"exp_year" : "2025",

"first6" : "424242",

"last4" : "4242"

},

"ecomind" : "ecom"

}

Request Payload

===============

{ecomind: "ecom", metadata: {existingDebtIndicator: false}, amount: "45", currency: "USD",…}

amount: "45"

currency: "USD"

ecomind: "ecom"

metadata: {existingDebtIndicator: false}

source: "clv_1TSTSHMb94DAyMQ8gQG5NCfH"

API Token
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 chandra-m commented

Can you post the payload you use to token the test AMEX card


8 comments
10 |2000

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

chandra-m avatar image chandra-m commented ·

Payload

{ecomind: "ecom", metadata: {existingDebtIndicator: false}, amount: "45", currency: "USD",…}

amount: "45"

currency: "USD"

ecomind: "ecom"

metadata: {existingDebtIndicator: false}

existingDebtIndicator: false

source: "clv_1TSTSkXPsbmgFu6iyD3E574E"


0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ chandra-m commented ·
the actual token request for the Amex test card
0 Likes 0 ·
chandra-m avatar image chandra-m bryanvargas ♦♦ commented ·
0 Likes 0 ·
chandra-m avatar image chandra-m commented ·
0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ chandra-m commented ·

I digged a little deeper in the logs and see another reason why it was declined: Above maximum transaction count per card.


You can also look at the fraud settings for your test merchant to edit the number of times you can process one card

Merchant Dashbaord> Account & Setup> Fraud Tools


Is there another AMEX test card you can test:

https://docs.clover.com/docs/test-card-numbers

0 Likes 0 ·
chandra-m avatar image chandra-m bryanvargas ♦♦ commented ·

I tried with a different Amex card. I think the issue might be with the CVV of the Amex card. Is the Amex CVV number four digits? Is that correct?

0 Likes 0 ·
Show more comments
chandra-m avatar image
chandra-m answered

Receiving a '402' response with the message '402 Payment Required.' Interestingly, this issue does not occur when using Visa, Discover, or MC(MasterCard).

ChargesRequestApi Endpoint: https://sclsandbox.dev.clover.com/v1/charges

For AMEX:

=========

Response

=========

{message: "402 Payment Required",…}

error: {code: "card_declined", message: "CVV could not be verified", charge: "KS1DF4QDJCB6M",…}

charge: "KS1DF4QDJCB6M"

code: "card_declined"

declineCode: "issuer_declined"

message: "CVV could not be verified"

message: "402 Payment Required"

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