question

vladimiralekseev avatar image
vladimiralekseev asked kevnat answered

Iframe implementation

I would like to understand main steps to get a merchant's key for an iframe https://docs.clover.com/docs/using-the-clover-hosted-iframe that used to create object new Clover().

1 Step: User add some goods to a cart on my site

2 Step: User go to a payment page on my site.

3 Step: The my site redirect to the clover site for authorization.
https://docs.clover.com/docs/configuring-oauth-20#step-1-request-merchant-authorization

4 Step: After positive authorization user redirected to my site on a redirect url with the code)

5 Step: My site server generate request to a clover server to get autch_token
https://docs.clover.com/docs/obtaining-an-oauth-token

6 Step: My site server generate request to a clover server to get a merchant's key
https://docs.clover.com/reference/getapikey

7 Step: A merchant's key using to create constant clover from new Clover().

For example:
const clover = new Clover('39c7b87101f44739c823362203d21f89');

Am I right? Or there is an other way to get a merchant's key?

semi-integrations
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

·
kevnat avatar image
kevnat answered kevnat edited

Hello Vladimir,

The OAuth Access token to authorize the use of a merchant's account is different from the PAKMS (public) key retrieved from your web app and used to tokenize inputs to the iFrame.

In order to grant use of a Clover merchant account to an app, you or the merchant owner need to authorize through OAuth or retrieve an API token from the Clover dashboard. Using that token, your (now trusted e-commerce client) requests an API Key from the PAKMS endpoint: https://docs.clover.com/reference/getapikey.

That PAKMS key can then be configured in your web client and used for tokenizing the customer user's input and also to submit the request for an e-commerce charge. See 'Configuring the SDK' here: https://docs.clover.com/docs/using-the-clover-hosted-iframe#configuring-the-sdk

Thanks,

Kevin

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