How the iOS Payments SDK works
The Zettle Payments SDK lets you take 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.
The integration with the Payments 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 Payments SDK integration.
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.
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.
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.
- See refunding payments in Manage card payments.
- See refunding payments in Manage PayPal QRC payments.
You can retrieve payments using the unique reference ID provided when taking the payment.
- See retrieving payments in Manage card payments.
- See retrieving payments in Manage PayPal QRC payments.
You can pair card readers through the Settings user interface.
See presenting settings in Manage other operations.
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.