How the iOS payment SDK works

The Zettle payment SDK lets you accept in-store payments and issue refunds from any iOS/Android app. The Zettle SDK is embedded in the Zettle app (Zettle POS and payment SDK). The SDK is designed for easy implementation and usage, to provide the best possible everyday payment experiences for merchants.

An overview showing the relationship between the client device, the payment SDKs, and available payment-related services.

Integration scenarios

The integration with the payment SDK is a self-service-process that you can go through without any dependency, to get quickly up-and-running. On the Developer Portal, you create an account and then create app credentials. When done, you receive a demo account that can be used to test the SDK before going live. See Get started.

Typical integration scenarios:

  • You have a service that runs a POS system, and you want to integrate Zettle as a payment provider.
  • You have an e-commerce solution and want to integrate this with Zettle to support both online and in-person sales.

The following describes some concepts to understand to get the most out of your Zettle payment SDK integration.

Important concepts

Authentication

You can authenticate with the SDK in the following ways:

  • Authentication fully managed by the SDK. In this case the SDK provides an authentication user interface, and handles the authentication process entirely.

  • Authentication through a pre-authorised refresh token. If you have an access token and a refresh token, you can authorise users through a token-based process. You can use the proof key for code exchange (PKCE) flow to get the required tokens.

See Initialisation.

Payments

A key payment concept in the current SDK is that you need to provide a unique ID (named reference). When integrating, this is your only way of retrieving the payment again within the SDK, for example to refund or retrieve a payment. Ensure that you provide the logic to create and store these IDs in your integration.

Refunding payments

Given that you have a reference ID, you can refund payments fully or partially. Here the SDK has a built-in safety procedure to ensure an authorised person is doing the refund. The procedure includes verification of your password with Zettle through a provided user interface.

You have the option to bypass the default user interface by providing the elevated tokens when refunding.

Retrieving payments

You can retrieve payments using the unique reference ID provided when taking the payment.

Pairing card readers

You can pair card readers through the Settings user interface.

See presenting settings in Manage other operations.

Activation

To be able to use QRC in the SDK it has to be activated. When the feature has been activated, a unique QR code is generated for each transaction. You can directly trigger the user interface for activation.

See QRC activation in Manage PayPal QRC payments.