Integrating with the Clover Go SDK sample app

(Legacy Content)

Initial setup

  1. If you don't already have a sandbox developer account, create one and then log in.
  2. On the developer dashboard, click the Create App button.
  3. On the Create App modal, give your sample app a name.
1228
  1. Click Create.

OAuth flow

To integrate with Clover Go devices, you will need to initialize the CloverGoDeviceConfiguration object with the right initialization values. This includes the access token that you retrieve by going through the OAuth flow.

The access token is generated for a specific employee in order to provide the user context during a transaction.

  1. On the Sandbox Dev Dashboard side nav, click the sample app you created.

  2. On the App Settings, make sure to save your App ID and App Secret somewhere; you’ll need them for later.

2380
  1. Change the App Type to be REST Clients > Web.
1354
  1. Make sure that your app has disabled Customer Read/Write and Employees Write and enabled the rest of the permissions in App Settings > Requested Permissions.
1716

🚧

IMPORTANT

Failure to set these permissions correctly will lead to an invalid access token, which will prevent the Clover Go SDK from being initialized.

  1. Edit your app’s REST Configuration. The Site URL should be your app’s URL. But if you don’t have one set up yet, you can use https://sandbox.dev.clover.com for now. Make sure the Default OAuth Response is CODE.
1722

📘

NOTE

The developer portal does not currently accept non-http(s) URL schemes. If you have a custom URL scheme for native iOS and Android applications (such as myPaymentApp://clovergoauthresponse), send an email to [email protected] with your App ID and redirect URL request.

  1. Click the Market Listing tab and then click Preview in App Market.
1732

The app preview page opens for your test merchant.

1230
  1. If the app is not installed for your test merchant, click Connect > Accept to install the app. If the app is installed, click Open App.
    A browser tab will open with a URL containing a CODE parameter, shown in the following example:

https://sandbox.dev.clover.com/?merchant_id={MERCHANT_ID}1&employee_id={EMPLOYEE_ID}&client_id={CLIENT_ID}&code={CODE}

Save the CODE somewhere.

1368
  1. Pass in the App ID, App Secret, and CODE you saved earlier into the following URL. Do not include the curly braces:

https://sandbox.dev.clover.com/oauth/token?client_id={APP_ID}&client_secret={APP_SECRET}&code={CODE}

  1. Visit that URL in your browser and you should be provided with your access token.

📘

NOTE

If you receive an “Unknown Client ID” message, make sure the URL doesn't have any spaces in it, then visit the URL again.

📘

NOTE

Generating an OAuth code in production follows the same general steps as for sandbox. For more information, see Using OAuth 2.0.