Add card payments to your app.

Do you want the power to collect card payments with your mobile app? Are you looking for a solution, which is easy to implement and to use? SumUp, Europe’s fastest growing mobile payments provider, has a solution for you: Say hello to the SumUp API.

The SumUp API provides an out-of-box solution for iOS and Android app developers to quickly add a powerful, secure and compliant payment feature to your own apps.

How does it work

  1. Your app sends a payment request to the SumUp app.

    Present your user with a means to check out. Define a payment request object in your native app, using the parameters supported by our API.

  2. User completes the customer payment in the SumUp app.

    When the user clicks the check out point, the payment request will launch the SumUp app. Select the appropriate payment option and complete the transaction with the customer's card details.

  3. Your app shows the result of the payment transaction.

    On completion of the transaction, the SumUp app will send back a result to the native app using the callback URLs supplied in the original request.

Code examples

iOS implementation

The following is an SMPPaymentRequest object example to launch SumUp Merchant App with SumUp API.

  // create request with mandatory values
     SMPPaymentRequest *request =
      [SMPPaymentRequest paymentRequestWithAmount:[
                                    NSDecimalNumber decimalNumberWithString:@"12.34"]
                                    productTitle:@"Taxi Ride"
  // set optional values
      [request setCallbackUrlPatternFail:@"your-app-scheme://failed"];
      [request setCallbackUrlPatternSuccess:@"your-app-scheme://succeeded"];
      [request setReceiptEmail:@""];
      [request setReceiptSMS:@"+3531234567890"];
  // add multiple tags
      [request addTag:@"taxi0334" forKey:@"AccountId"];
      [request addTag:@"Here" forKey:@"from"];
      [request addTag:@"There" forKey:@"to"];
  // launch SumUp Merchant App
      [request openSumUpMerchantApp];

Android implementation

The following is an activity example to launch SumUp Merchant App with SumUp API

        // create SumUpPayment with mandatory parameters
        String affiliateKey = "abcd1234wxyz";
        double productAmount = 12.34;
        String currency = "EUR";

        // reference YOUR OWN activity here that should receive the payment result
        String resultActivity = "com.example.ResultActivity";
        SumUpPayment sumUpPayment = new SumUpPayment(affiliateKey, productAmount, currency, resultActivity, this);

        // optional: add details
        sumUpPayment.setProductTitle("Taxi Ride");

        // optional: Add additional metadata
        HashMap additionalInfo = new HashMap(3);

        // start the payment process

        //IMPORTANT: Include resultActivity in AndroidManifest.xml
        <activity android:name="PaymentResult"  android:label="Payment Result">
            <action android:name="com.example.PaymentResult"></action>
            <category android:name="android.intent.category.DEFAULT"></category>
            <category android:name="android.intent.category.BROWSABLE"></category>

Supported parameters

The following table outlines the parameters supported in payment request.

Parameter M/O* Value, Type Description
productAmount M Decimal currency as string Payment request amount
currency M 3-digit ISO-code as string. Currently supported values = [ EUR | GBP] Payment request currency
affiliateKey M String Unique code assigned to the developers of the native app that identifies all transactions originating from this app. This will be assigned to you on request.
productTitle O String Title of the native store or application
receiptEmail O Email address as string This is the email address of the customer who is buying the product. If present, it is used to send an email receipt of the payment.
receiptSMS O Phone number as string, formatted with full international access code. This is the phone number the customer who is buying the product. If present, it is used to send an SMS receipt of the payment.
(iOS only)
O URL “your-app-scheme://failed”

your-app-scheme://failed?smp- status=failed&smp-message=Card%20has %20expired.
Callback URL for SumUp app to return the result of any failed payment.
(iOS only)
O URL “your-app-scheme://succeeded”

your-app-scheme://succeeded?smp- status=success&smp-message=Have%20a %20great%20day%21
Callback URL for SumUp app to return the result of any succesfull payment.
additionalInfo-* O Optional tags that can be added See examples in this document.

Explanatory Notes: * M=Mandatory parameter, O=Optional parameter.

Request a developer key

Are you interested in trying the SumUp API? Great! All you need to do is fill out this form and we'll get in touch with you as fast as we can and provide you with all the information you need.

Contact information

App specifications