question

Reagan Ammann avatar image
Reagan Ammann asked dgfgje answered

API Key Expected by /tokens?

Learning how to tokenize a credit card via:

https://docs.clover.com/reference/create-card-token

and keep getting a "401: Unauthorized" error. What is the API expecting here?

1693603111541.png

I've tried all manner of API keys generated in my sandbox environment.


API Token
1693603111541.png (6.1 KiB)
10 |2000

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

Reagan Ammann avatar image
Reagan Ammann answered

nevermind, just found this:

1693604717243.png


1693604717243.png (70.5 KiB)
10 |2000

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

Reagan Ammann avatar image
Reagan Ammann answered

arggh, still can't get it. I've created an app and linked it to my test merchant, but what does this mean exactly?

"Set the authorization: Bearer header value as an OAuth-generated auth_token for a test merchant with specific permissions"

10 |2000

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

Reagan Ammann avatar image
Reagan Ammann answered Reagan Ammann commented

arggh^2, seems like obtaining the necessary token is far from a trivial process. I'm a merchant and all i want to do is enable customers to sign up for our recurring payments plan online. Seems like I can add customers to the payment plan easy enough, but the customer needs to have a card on file. Getting that card on file seems like an exorbitant amount of work. Is there a simpler way of accomplishing that without creating an app?

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

bryanvargas avatar image bryanvargas ♦♦ commented ·
I would recommend thoroughly reading our docs to get setup. You need to get a API key(PAKMS key) to tokenize a card. Also if you are a merchant you should be able to use your merchant generated token. I would recommend reaching out to support to navigate you to your ecommerce tokens to use.
0 Likes 0 ·
Reagan Ammann avatar image Reagan Ammann bryanvargas ♦♦ commented ·

Many thanks for your reply. Have worked though the docs as much as I can. I'm stuck at generating OAuth token as outlined here. Have ping'd the server with the required fields and get back:

"Invalid OAuth credentials"

You mention being able to use my 'merchant generated token'. In which step? Do I use the API Key generated in the Dashboard as the OAuth token? When I do that using this utility, I get a similar "401 Unauthorized" error.

0 Likes 0 ·
Reagan Ammann avatar image Reagan Ammann Reagan Ammann commented ·

Think I got it. For others possibly wondering: used an IFRAME token from the "Ecommerce API Tokens" area.

0 Likes 0 ·
dgfgje avatar image
dgfgje answered

I noticed the issue with the API Key Expected by /tokens? post, and it seems like something that the experts at "storyviewe" could help with. Ensuring a proper API key integration is crucial for smooth operations. It'd be great to explore their insights on resolving this matter effectively.

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