Create credentials for an SDK app

Using the Zettle payment SDKs you can build functionality for taking payments with iOS or Android apps. The authorisation code grant method with proof key for code exchange (PKCE) is used for authorisation.

In an authorisation code grant flow with PKCE, the app creates a code challenge for each merchant authorisation request. After authorisation, the app uses the received authorisation code, a code verifier, and app credentials in exchange for an access token and a refresh token from the authorisation server. The app credentials include a client ID.

To use authorisation code grant with PKCE, you need to create app credentials from the Developer Portal.

Note: An SDK app has a built-in PKCE flow for the default login. To use a custom login for the app, you need to set a PKCE flow for the custom login after you get app credentials.

Prerequisites

  • An account for the Developer Portal. If you don't have this, sign up for a developer account.

  • A working and publicly available URL. It includes a redirect URI to direct your app users back to your app, after they authorise it to access their Zettle merchant data. For example, awesomeapp://zettlelogin. You will use it to get SDK credentials for a new app.

    If the URL is located at your local server, you can make the URL publicly available using ngrok.

Get new app credentials

Follow these steps to get new app credentials.

  1. Log in to the Developer Portal.

    Note: If you have just signed up with the Developer Portal, you will stay logged in and be directed to the Create app credentials page.

  2. On your Dashboard, click Create app credentials.

    Note: If you haven't created app credentials before, you will be directed to the Create app credentials page after logging in.

    The Dashboard with the Create app credentials button to the right.

  3. On the Create app credentials page, click Payments SDK for iOS or Payments SDK for Android to open the form with app information.

  4. Fill in the form. For the OAuth Redirect URI field, fill it in with the URL that you have prepared.

    Example of form with app name, app URL, and company name. Optionally, you can add OAuth Redirect URIs to redirect merchants to your app after successful login to Zettle.

  5. Click Create credentials to create the app credentials.

  6. Save the app credentials somewhere safe.

    Example of app credentials.

Next step