question

bhuvanmalik007 avatar image
bhuvanmalik007 asked zalak123 answered

v1/tokens call giving "500 Internal Server Error"

Ecommerce Integration Type: API only.

The call works fine on sandbox but gives the following response on production:

{
    "message": "500 Internal Server Error",
    "error": {
        "type": "api_error",
        "code": "processing_error",
        "message": "An error occurred while processing the token request."
    }
}

No reason for the error is provided. The "apikey" as a header and the card object to be tokenized are correctly set and sent and a source token is returned on sandbox as mentioned earlier.

Are there any app permissions or anything along those lines that I could be missing?

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.

David Marginian avatar image
David Marginian Deactivated answered David Marginian Deactivated edited

A sandbox API key won't work in production. Has your app been approved? Do you have an up to date PCI AOC? The AOC has nothing to do with the endpoint not working but you should be able to provide that if you are using the tokens endpoint.

10 |2000

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

bhuvanmalik007 avatar image
bhuvanmalik007 answered gd213 commented

Thanks for the response, David. We have the production API key, the app is approved, and the PCI AOC is up to date.

6 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.

David Marginian avatar image David Marginian ♦♦ commented ·

Are you sure you aren't seeing this when you go to pay (order/pay) for the order and not on the tokens call? What is your app id (provide in a moderators only post please).

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ David Marginian ♦♦ commented ·

It doesn't look like you are encrypting the PAN correctly, also, it looks like you are passing in a tipAmount with the tokenization request (which isn't causing the problem but doesn't make a whole lot of sense).

0 Likes 0 ·
bhuvanmalik007 avatar image bhuvanmalik007 David Marginian ♦♦ commented ·

We're not sending any tipAmount in our request.
Can you please point me to the documentation where it mentions the steps to encrypt the PAN correctly?

0 Likes 0 ·
Show more comments
zalak123 avatar image
zalak123 answered

Same issue I am facing.

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