question

brokenoval avatar image
brokenoval asked David Marginian commented

Ecomm Payment failing with 402

Hi guys,


So we are tokenizing using the iFrame and receiving a customer token.


Then hitting the `https://scl.clover.com/v1/charges ` endpoint for a "FIRST" time "CARDHOLDER" initiated payment using the token generated from the iFrame.


{
    "amount": 500,
    "currency": "cad",
    "source": "{token from iFrame}",
    "description": "{merchant name}",
    "ecomind": "ecom",
    "stored_credentials": {
        "sequence": "FIRST",
        "initiator": "CARDHOLDER",
        "is_scheduled": false,
        "installment_info": null
    }
}


We're then getting a 402 response like this from Clover (I got this one by retrying from POSTman so not 100% sure this is the exact error object for the initial transaction):


{
    "message": "402 Payment Required",
    "error": {
        "code": "card_declined",
        "message": "CVV is not provided",
        "charge": "D16HM3HQ7P1X6",
        "declineCode": "issuer_declined"
    }
}


This is working OK in Sandbox. Can you tell what's going wrong?

Whats the best way to investigate failed payments like this? Is there a log or anything that we can look up that "charge" id?


Thanks!

Payments
7 comments
10 |2000 characters needed characters left characters exceeded

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

The initial payment must be made within 10 minutes of tokenization. Outside of that 10 minute window the CVV will no longer be available and the payment will fail. I'm not sure what your flow is but perhaps that is the issue.
0 Likes 0 ·
brokenoval avatar image brokenoval David Marginian ♦♦ ·
No, it's immediate, happens within a second or two
0 Likes 0 ·
brokenoval avatar image brokenoval brokenoval ·

I'm generating an idempotency_key with each request to the /charges endpoint - is there any way you can use this to find out what's happening for a specific transaction? I just generated one a few seconds ago: 87339ab4-ce6d-4daa-bf3d-1d7aed0f9622

0 Likes 0 ·
Show more comments

0 Answers

· Write an Answer

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