Try taking payments

Using a Zettle SDK example app in developer mode, you can test payment and refund responses for card and QRC. Follow the page to try payments and refunds for card.

Developer mode lets you quickly test the SDK in certain scenarios without a Zettle merchant account and without real transactions. For example, taking payments and making refunds for card transactions.

Note: Developer mode only provides testing responses that are difficult to reproduce. In developer mode, the UI of payment and refund flows has been simplified.

Prerequisites

Step 1: Enable developer mode

  1. Open the example app and follow README to initialise it in your developer environment.

  2. Make sure that developer mode is enabled in the example app. The example is from the iOS SDK example app.

    
    [[iZettleSDK shared] startWithAuthorizationProvider:authorizationProvider
                                    enableDeveloperMode:true];
    
    

Step 2: Test payments

  1. Launch the payment flow.

  2. Check the responses.

    The example shows test case "Wrong amount format entered" from the iOS SDK example app.

    1
    "domain": com.izettle.sdk.error
    2
    "code" : -400
    3
    "izTitle": "An error has occurred"
    4
    "izMessage" : "Invalid amount"

Step 3: Test refunds

  1. Launch the refund flow.

  2. Check the responses.

    The example shows test case "Successful refund" from the iOS SDK example app.

    1
    amount: <negative amount passed to the flow OR `-11` if full refund is triggered> (NSDecimalNumber)
    2
    transactionId: "2420db84-6041-11ed-a687-0fe1acbcd38a" (NSString)
    3
    referenceNumber: K5YBAR6HLE (NSString)
    4
    entryMode: NONE (NSString)
    5
    cardBrand: VISA (NSString)
    6
    obfuscatedPan: "**** **** **** 0119" (NSString)
    7
    panHash = D764334F7EFECCA9E991F06A681B64F4905A9A160DB109561D3DBB547BE17E3E48 (NSString)

Next step