question

410smokeshop avatar image
410smokeshop asked 410smokeshop commented

Difficulty integrating SDK Hosted Iframe

Hello,

I'm facing challenges when trying to follow the developer docs when trying to integrate https://docs.clover.com/clover-platform/docs/using-the-clover-hosted-iframe . I am trying to set up e-commerce payment capabilities on my merchant site. I have a Clover developer account with a draft application tied to a test merchant account. I generated an access token via the "Edit Rest Configuration" -> "Example OAuth Request". I have tried calling both https://api.clover.com/pakms/apikey and https://apisandbox.dev.clover.com/pakms/apikey using that access token and am receiving "401 Unauthorized". Am I doing something wrong to create a public key needed for the SDK? Does this only work with published Clover Apps? Any guidance on how to successfully create a public key for the SDK would be greatly appreciated. Thanks.

Payments
10 |2000

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

1 Answer

David Marginian avatar image
David Marginian Deactivated answered 410smokeshop commented

It appears you only created your application in production, so using apisandbox.dev.clover.com will not work. The token being generated from the dashboard is only valid for merchant's directly tied to your developer account. I am guessing that you are trying to use it with your live merchant account, that won't work. Currently, yes, you would need to have a public application and you would need to install that application on your live merchant and then go through the OAuth flow to obtain a valid token - https://docs.clover.com/clover-platform/docs/using-oauth-20. You can contact appmarketbusiness@clover.com for more information.

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

410smokeshop avatar image 410smokeshop commented ·

Is it possible to create an app in sandbox? I have not seen a way to do that.

Also, I did not try with my live production merchant account, but rather tried with the test merchant account tied to my developer account. I imagine that is all in the same environment so I'm not sure why I'm still seeing a 401 error.

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

Yes, it is possible to create an app in sandbox. The process is the same. You probably need to go through the OAuth flow and use a real token, not a test token.

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

Ok. Thanks so much for the guidance. Is there any documentation about setting up an app in sandbox? I've setup a sandbox account with a sandbox merchant that I have tested transactions on. However, when visiting the url path in sandbox for the developer dashboard (https://sandbox.dev.clover.com/developer-home) I receive Page Not Found. Is there a step I may have missed when setting up my sandbox account?

0 Likes 0 ·
Show more comments
Show more comments

Welcome to the
Clover Developer Community