question

gakindustries avatar image
gakindustries asked gakindustries commented

Recover merchant_id from phonegap app

I'm building a phonegap app to clover AppStore and I would like to know how can i retrieve the merchantid to get the token , or better, which is the best way to get the accesstoken for clover API. Thanks in advance, Guillermo

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

Mike M avatar image
Mike M answered gakindustries commented

If you are building a native Android app, you can take advantage of our Clover Android SDK to authenticate and retrieve an access token.

For any web apps, including PhoneGap, will require you to go through an OAuth flow: https://docs.clover.com/build/web-app...

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

gakindustries avatar image gakindustries commented ·

And how can i get merchantid using PhoneGap to follow OAuth flow and retrieve merchant access token???? Once i get merchantid I will be able to retrieve token via OAuth and later use the clover api with it, but i do not find a way to get the merchant_id once the app was downloaded by the merchant. It will be grateful if you can give me a solution to my problem. Thanks again.

0 Likes 0 ·
Mike M avatar image Mike M commented ·

Merchant ID is an optional url parameter that you can pass in order to "auto-select" the merchant if the person has multiple merchant accounts linked. For use cases like above, we are presuming that the web app has it's own account management outside of Clover's ecosystem (i.e. any product that exists across multiple platforms) to which the Clover Merchant ID would be linked to.

For your use case, all you need as a base is: https://www.clover.com/oauth/authorize?client_id={clientId}

0 Likes 0 ·

Welcome to the
Clover Developer Community